IDAPython 8.4
|
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 |
Proxy of C++ choose_ioport_parser_t class. More... | |
class | file_enumerator_t |
Proxy of C++ file_enumerator_t class. More... | |
class | generic_linput_t |
Proxy of C++ generic_linput_t class. More... | |
class | ioports_fallback_t |
Proxy of C++ ioports_fallback_t class. More... | |
Functions | |
"char const *" | idadir (*args) |
idadir(subdir) -> char const * Get IDA directory (if subdir==nullptr) or the specified subdirectory (see IDA subdirectories) | |
"char const *" | getsysfile (*args) |
getsysfile(filename, subdir) -> str Search for IDA system file. | |
"char const *" | get_user_idadir (*args) |
get_user_idadir() -> char const * Get user ida related directory. | |
"qstrvec_t *" | get_ida_subdirs (*args) |
get_ida_subdirs(subdir, flags=0) -> int Get list of directories in which to find a specific IDA resource (see IDA subdirectories). | |
"size_t" | get_special_folder (*args) |
get_special_folder(csidl) -> str Get a folder location by CSIDL (see Common CSIDLs). | |
"int" | enumerate_files2 (*args) |
enumerate_files2(answer, answer_size, path, fname, fv) -> int | |
"FILE *" | fopenWT (*args) |
fopenWT(file) -> FILE * Open a new file for write in text mode, deny write. | |
"FILE *" | fopenWB (*args) |
fopenWB(file) -> FILE * Open a new file for write in binary mode, deny read/write. | |
"FILE *" | fopenRT (*args) |
fopenRT(file) -> FILE * Open a file for read in text mode, deny none. | |
"FILE *" | fopenRB (*args) |
fopenRB(file) -> FILE * Open a file for read in binary mode, deny none. | |
"FILE *" | fopenM (*args) |
fopenM(file) -> FILE * Open a file for read/write in binary mode, deny write. | |
"FILE *" | fopenA (*args) |
fopenA(file) -> FILE * Open a file for append in text mode, deny none. | |
"ssize_t" | read_ioports2 (*args) |
read_ioports2(ports, device, file, callback=None) -> ssize_t | |
"bool" | choose_ioport_device2 (*args) |
choose_ioport_device2(_device, file, parse_params) -> bool | |
"size_t" | qlgetz (*args) |
qlgetz(li, fpos) -> str Read a zero-terminated string from the input. | |
"linput_t *" | open_linput (*args) |
open_linput(file, remote) -> linput_t * Open loader input. | |
"linput_t *" | create_generic_linput (*args) |
create_generic_linput(gl) -> linput_t * Create a generic linput | |
"linput_t *" | create_memory_linput (*args) |
create_memory_linput(start, size) -> linput_t * Create a linput for process memory. | |
"linput_type_t" | get_linput_type (*args) |
get_linput_type(li) -> linput_type_t Get linput type. | |
"void" | eclose (*args) |
eclose(fp) | |
"PyObject *" | enumerate_files (*args) |
enumerate_files(path, fname, callback) -> PyObject * Enumerate files in the specified directory while the callback returns 0. | |
"linput_t *" | create_bytearray_linput (*args) |
create_bytearray_linput(s) -> linput_t * Trivial memory linput. | |
"void" | close_linput (*args) |
close_linput(li) Close loader input. | |
Variables | |
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 | |
"bool" choose_ioport_device2 | ( | * | args | ) |
_device | qstring * |
file | char const * |
parse_params | choose_ioport_parser_t * |
"void" close_linput | ( | * | args | ) |
li | (C++: linput_t *) |
"linput_t *" create_bytearray_linput | ( | * | args | ) |
s | qstring const & |
"linput_t *" create_generic_linput | ( | * | args | ) |
gl | (C++: generic_linput_t *) linput description. this object will be destroyed by close_linput() using "delete gl;" |
"linput_t *" create_memory_linput | ( | * | args | ) |
This linput will use read_dbg_memory() to read data.
start | (C++: ea_t) starting address of the input |
size | (C++: asize_t) size of the memory area to represent as linput if unknown, may be passed as 0 |
"void" eclose | ( | * | args | ) |
fp | FILE * |
"PyObject *" enumerate_files | ( | * | args | ) |
path | directory to enumerate files in |
fname | mask of file names to enumerate |
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. |
"int" enumerate_files2 | ( | * | args | ) |
answer | char * |
answer_size | size_t |
path | char const * |
fname | char const * |
fv | file_enumerator_t & |
"FILE *" fopenA | ( | * | args | ) |
file | (C++: const char *) char const * |
"FILE *" fopenM | ( | * | args | ) |
file | (C++: const char *) char const * |
"FILE *" fopenRB | ( | * | args | ) |
file | (C++: const char *) char const * |
"FILE *" fopenRT | ( | * | args | ) |
file | (C++: const char *) char const * |
"FILE *" fopenWB | ( | * | args | ) |
If a file exists, it will be removed.
file | (C++: const char *) char const * |
"FILE *" fopenWT | ( | * | args | ) |
If a file exists, it will be removed.
file | (C++: const char *) char const * |
"qstrvec_t *" get_ida_subdirs | ( | * | args | ) |
The order of the resulting list is as follows:
subdir | (C++: const char *) name of the resource to list |
flags | (C++: int) Subdirectory modification flags bits |
"linput_type_t" get_linput_type | ( | * | args | ) |
li | (C++: linput_t *) |
"size_t" get_special_folder | ( | * | args | ) |
Path should be of at least MAX_PATH size
csidl | (C++: int) |
"char const *" get_user_idadir | ( | * | args | ) |
"char const *" getsysfile | ( | * | args | ) |
This function searches for a file in:
filename | (C++: const char *) name of file to search |
subdir | (C++: const char *) if specified, the file is looked for in the specified subdirectory of the ida directory first (see IDA subdirectories) |
"char const *" idadir | ( | * | args | ) |
subdir | (C++: const char *) char const * |
"linput_t *" open_linput | ( | * | args | ) |
file | (C++: const char *) char const * |
remote | (C++: bool) |
"size_t" qlgetz | ( | * | args | ) |
If fpos == -1 then no seek will be performed.
li | (C++: linput_t *) |
fpos | (C++: int64) |
"ssize_t" read_ioports2 | ( | * | args | ) |
ports | ioports_t * |
device | qstring * |
file | char const * |
callback | ioports_fallback_t * |
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 |
PLG_SUBDIR = _ida_diskio.PLG_SUBDIR |
SIG_SUBDIR = _ida_diskio.SIG_SUBDIR |
THM_SUBDIR = _ida_diskio.THM_SUBDIR |
TIL_SUBDIR = _ida_diskio.TIL_SUBDIR |