|
IDAPython 9.0
|
Public Member Functions | |
| __init__ (self, pycapsule=None) | |
| close (self) | |
| open (self, filename, remote=False) | |
| set_linput (self, linput) | |
| 'linput_t *' | get_linput (self) |
| open_memory (self, ea_t start, int size) | |
| seek (self, int offset, whence=SEEK_SET) | |
| tell (self) | |
| getz (self, int size, int fpos=-1) | |
| gets (self, int len) | |
| read (self, int size=-1) | |
| opened (self) | |
| readbytes (self, int size, bool big_endian) | |
| file2base (self, int pos, ea_t ea1, ea_t ea2, bool patchable) | |
| 'int64' | size (self) |
| 'PyObject *' | filename (self) |
| get_byte (self) | |
Static Public Member Functions | |
| 'loader_input_t *' | from_linput ('linput_t *' linput) |
| 'loader_input_t *' | from_capsule ('PyObject *' pycapsule) |
| from_fp (fp) | |
Properties | |
| thisown | |
A helper class to work with linput_t related functions. This class is also used by file loaders scripts.
| __init__ | ( | self, | |
| pycapsule = None ) |
| close | ( | self | ) |
Closes the file
Load portion of file into the database
This function will include (ea1..ea2) into the addressing space of the
program (make it enabled)
@param li: pointer ot input source
@param pos: position in the file
@param (ea1..ea2): range of destination linear addresses
@param patchable: should the kernel remember correspondance of
file offsets to linear addresses.
@return: 1-ok,0-read error, a warning is displayed
| 'PyObject *' filename | ( | self | ) |
|
static |
|
static |
A static method to construct an instance from a FILE* @param fp: a FILE pointer @return: a new instance, or None
|
static |
| get_byte | ( | self | ) |
Reads a single byte from the file. Returns None if EOF or the read byte
| 'linput_t *' get_linput | ( | self | ) |
| gets | ( | self, | |
| int | len ) |
Reads a line from the input file. Returns the read line or None @param len: the maximum line length @return: a str, or None
| getz | ( | self, | |
| int | size, | ||
| int | fpos = -1 ) |
Returns a zero terminated string at the given position @param size: maximum size of the string @param fpos: if != -1 then seek will be performed before reading @return: The string or None on failure.
| open | ( | self, | |
| filename, | |||
| remote = False ) |
Opens a file (or a remote file) @param filename: the file name @param remote: whether the file is local, or remote @return: Boolean
| open_memory | ( | self, | |
| ea_t | start, | ||
| int | size ) |
Create a linput for process memory (By internally calling idaapi.create_memory_linput())
This linput will use dbg->read_memory() to read data
@param start: starting address of the input
@param size: size of the memory range to represent as linput
if unknown, may be passed as 0
| opened | ( | self | ) |
Checks if the file is opened or not
| read | ( | self, | |
| int | size = -1 ) |
Read up to size bytes (all data if size is negative). Return an empty bytes object on EOF. @param size: the maximum number of bytes to read @return a bytes object
| readbytes | ( | self, | |
| int | size, | ||
| bool | big_endian ) |
Similar to read() but it respect the endianness @param size: the maximum number of bytes to read @param big_endian: endianness @return a str, or None
| seek | ( | self, | |
| int | offset, | ||
| whence = SEEK_SET ) |
Set input source position @param offset: the seek offset @param whence: the position to seek from @return: the new position (not 0 as fseek!)
| set_linput | ( | self, | |
| linput ) |
Links the current loader_input_t instance to a linput_t instance @param linput: the linput_t to link to
| 'int64' size | ( | self | ) |
| tell | ( | self | ) |
Returns the current position
|
static |