|
IDAPython 9.0
|
File I/O functions for IDA. You should not use standard C file I/O functions in modules. Use functions from this header, pro.h and fpro.h instead. This file also declares a call_system() function.
Classes | |
| class | choose_ioport_parser_t |
| class | file_enumerator_t |
| class | generic_linput_t |
| class | ioports_fallback_t |
Functions | |
| str | idadir (str subdir) |
| str | getsysfile (str filename, str subdir) |
| str | get_user_idadir () |
| 'qstrvec_t *' | get_ida_subdirs (str subdir, int flags=0) |
| str | get_special_folder (int csidl) |
| 'FILE *' | fopenWT (str file) |
| 'FILE *' | fopenWB (str file) |
| 'FILE *' | fopenRT (str file) |
| 'FILE *' | fopenRB (str file) |
| 'FILE *' | fopenM (str file) |
| 'FILE *' | fopenA (str file) |
| 'ssize_t' | read_ioports ('ioports_t *' ports, str device, str file, 'ioports_fallback_t' callback=None) |
| bool | choose_ioport_device2 (str _device, str file, 'choose_ioport_parser_t' parse_params) |
| str | qlgetz ('linput_t *' li, 'int64' fpos) |
| 'linput_t *' | open_linput (str file, bool remote) |
| 'linput_t *' | create_generic_linput ('generic_linput_t' gl) |
| 'linput_t *' | create_memory_linput (ida_idaapi.ea_t start, 'asize_t' size) |
| 'linput_type_t' | get_linput_type ('linput_t *' li) |
| enumerate_files (path, fname, callback) | |
| 'linput_t *' | create_bytearray_linput (str s) |
| None | close_linput ('linput_t *' li) |
Variables | |
| VAULT_CACHE_SUBDIR = _ida_diskio.VAULT_CACHE_SUBDIR | |
| VAULT_CACHE_FNAME = _ida_diskio.VAULT_CACHE_FNAME | |
| CFG_SUBDIR = _ida_diskio.CFG_SUBDIR | |
| IDC_SUBDIR = _ida_diskio.IDC_SUBDIR | |
| IDS_SUBDIR = _ida_diskio.IDS_SUBDIR | |
| IDP_SUBDIR = _ida_diskio.IDP_SUBDIR | |
| LDR_SUBDIR = _ida_diskio.LDR_SUBDIR | |
| SIG_SUBDIR = _ida_diskio.SIG_SUBDIR | |
| TIL_SUBDIR = _ida_diskio.TIL_SUBDIR | |
| PLG_SUBDIR = _ida_diskio.PLG_SUBDIR | |
| THM_SUBDIR = _ida_diskio.THM_SUBDIR | |
| IDA_SUBDIR_IDP = _ida_diskio.IDA_SUBDIR_IDP | |
| IDA_SUBDIR_IDADIR_FIRST = _ida_diskio.IDA_SUBDIR_IDADIR_FIRST | |
| IDA_SUBDIR_ONLY_EXISTING = _ida_diskio.IDA_SUBDIR_ONLY_EXISTING | |
| CSIDL_APPDATA = _ida_diskio.CSIDL_APPDATA | |
| CSIDL_LOCAL_APPDATA = _ida_diskio.CSIDL_LOCAL_APPDATA | |
| CSIDL_PROGRAM_FILES = _ida_diskio.CSIDL_PROGRAM_FILES | |
| CSIDL_PROGRAM_FILES_COMMON = _ida_diskio.CSIDL_PROGRAM_FILES_COMMON | |
| CSIDL_PROGRAM_FILESX86 = _ida_diskio.CSIDL_PROGRAM_FILESX86 | |
| LINPUT_NONE = _ida_diskio.LINPUT_NONE | |
| LINPUT_LOCAL = _ida_diskio.LINPUT_LOCAL | |
| LINPUT_RFILE = _ida_diskio.LINPUT_RFILE | |
| LINPUT_PROCMEM = _ida_diskio.LINPUT_PROCMEM | |
| LINPUT_GENERIC = _ida_diskio.LINPUT_GENERIC | |
| LOC_CLOSE = _ida_diskio.LOC_CLOSE | |
| LOC_UNMAKE = _ida_diskio.LOC_UNMAKE | |
| LOC_KEEP = _ida_diskio.LOC_KEEP | |
| bool choose_ioport_device2 | ( | str | _device, |
| str | file, | ||
| 'choose_ioport_parser_t' | parse_params ) |
| None close_linput | ( | 'linput_t *' | li | ) |
| 'linput_t *' create_bytearray_linput | ( | str | s | ) |
| 'linput_t *' create_generic_linput | ( | 'generic_linput_t' | gl | ) |
| 'linput_t *' create_memory_linput | ( | ida_idaapi.ea_t | start, |
| 'asize_t' | size ) |
| enumerate_files | ( | path, | |
| fname, | |||
| callback ) |
Enumerate files in the specified directory while the callback returns 0.
@param path: directory to enumerate files in
@param fname: mask of file names to enumerate
@param callback: a callable object that takes the filename as
its first argument and it returns 0 to continue
enumeration or non-zero to stop enumeration.
@return:
None in case of script errors
tuple(code, fname) : If the callback returns non-zero
| 'FILE *' fopenA | ( | str | file | ) |
| 'FILE *' fopenM | ( | str | file | ) |
| 'FILE *' fopenRB | ( | str | file | ) |
| 'FILE *' fopenRT | ( | str | file | ) |
| 'FILE *' fopenWB | ( | str | file | ) |
| 'FILE *' fopenWT | ( | str | file | ) |
| 'qstrvec_t *' get_ida_subdirs | ( | str | subdir, |
| int | flags = 0 ) |
Get list of directories in which to find a specific IDA resource (see IDA subdirectories). The order of the resulting list is as follows:
[$IDAUSR/subdir (0..N entries)]
$IDADIR/subdir
@param subdir: name of the resource to list (can be nullptr)
@param flags: Subdirectory modification flags bits
@returns number of directories appended to 'dirs'
| 'linput_type_t' get_linput_type | ( | 'linput_t *' | li | ) |
| str get_special_folder | ( | int | csidl | ) |
Get a folder location by CSIDL (see Common CSIDLs). Path should be of at least MAX_PATH size
| str get_user_idadir | ( | ) |
Get user ida related directory.
if $IDAUSR is defined:
- the first element in $IDAUSR
else
- default user directory ($HOME/.idapro or %APPDATA%Hex-Rays/IDA Pro)
| str getsysfile | ( | str | filename, |
| str | subdir ) |
Search for IDA system file. This function searches for a file in:
0. each directory specified by IDAUSR%
1. ida directory [+ subdir]
and returns the first match.
@param filename: name of file to search
@param subdir: if specified, the file is looked for in the specified subdirectory of the ida directory first (see IDA subdirectories)
@returns nullptr if not found, otherwise a pointer to full file name.
| str idadir | ( | str | subdir | ) |
Get IDA directory (if subdir==nullptr) or the specified subdirectory (see IDA subdirectories)
| 'linput_t *' open_linput | ( | str | file, |
| bool | remote ) |
| str qlgetz | ( | 'linput_t *' | li, |
| 'int64' | fpos ) |
| 'ssize_t' read_ioports | ( | 'ioports_t *' | ports, |
| str | device, | ||
| str | file, | ||
| 'ioports_fallback_t' | callback = None ) |
| CFG_SUBDIR = _ida_diskio.CFG_SUBDIR |
| CSIDL_APPDATA = _ida_diskio.CSIDL_APPDATA |
| CSIDL_LOCAL_APPDATA = _ida_diskio.CSIDL_LOCAL_APPDATA |
| CSIDL_PROGRAM_FILES = _ida_diskio.CSIDL_PROGRAM_FILES |
| CSIDL_PROGRAM_FILES_COMMON = _ida_diskio.CSIDL_PROGRAM_FILES_COMMON |
| CSIDL_PROGRAM_FILESX86 = _ida_diskio.CSIDL_PROGRAM_FILESX86 |
| IDA_SUBDIR_IDADIR_FIRST = _ida_diskio.IDA_SUBDIR_IDADIR_FIRST |
| IDA_SUBDIR_IDP = _ida_diskio.IDA_SUBDIR_IDP |
| IDA_SUBDIR_ONLY_EXISTING = _ida_diskio.IDA_SUBDIR_ONLY_EXISTING |
| IDC_SUBDIR = _ida_diskio.IDC_SUBDIR |
| IDP_SUBDIR = _ida_diskio.IDP_SUBDIR |
| IDS_SUBDIR = _ida_diskio.IDS_SUBDIR |
| LDR_SUBDIR = _ida_diskio.LDR_SUBDIR |
| LINPUT_GENERIC = _ida_diskio.LINPUT_GENERIC |
| LINPUT_LOCAL = _ida_diskio.LINPUT_LOCAL |
| LINPUT_NONE = _ida_diskio.LINPUT_NONE |
| LINPUT_PROCMEM = _ida_diskio.LINPUT_PROCMEM |
| LINPUT_RFILE = _ida_diskio.LINPUT_RFILE |
| LOC_CLOSE = _ida_diskio.LOC_CLOSE |
| LOC_KEEP = _ida_diskio.LOC_KEEP |
| LOC_UNMAKE = _ida_diskio.LOC_UNMAKE |
| PLG_SUBDIR = _ida_diskio.PLG_SUBDIR |
| SIG_SUBDIR = _ida_diskio.SIG_SUBDIR |
| THM_SUBDIR = _ida_diskio.THM_SUBDIR |
| TIL_SUBDIR = _ida_diskio.TIL_SUBDIR |
| VAULT_CACHE_FNAME = _ida_diskio.VAULT_CACHE_FNAME |
| VAULT_CACHE_SUBDIR = _ida_diskio.VAULT_CACHE_SUBDIR |