A helper class to work with linput_t related functions.
More...
|
| | __init__ (self, *args) |
| | init(self, pycapsule=None) -> loader_input_t
|
| |
| "void" | close (self, *args) |
| | close(self) Closes the file
|
| |
| "bool" | open (self, *args) |
| | open(self, filename, remote=False) -> bool Opens a file (or a remote file)
|
| |
| "void" | set_linput (self, *args) |
| | set_linput(self, linput) Links the current loader_input_t instance to a linput_t instance
|
| |
| "linput_t *" | get_linput (self, *args) |
| | get_linput(self) -> linput_t *
|
| |
| "bool" | open_memory (self, *args) |
| | open_memory(self, start, size=0) -> bool Create a linput for process memory (By internally calling idaapi.create_memory_linput()) This linput will use dbg->read_memory() to read data
|
| |
| "int64" | seek (self, *args) |
| | seek(self, pos, whence=SEEK_SET) -> int64 Set input source position
|
| |
| "int64" | tell (self, *args) |
| | tell(self) -> int64 Returns the current position
|
| |
| "PyObject *" | getz (self, *args) |
| | getz(self, sz, fpos=-1) -> PyObject * Returns a zero terminated string at the given position
|
| |
| "PyObject *" | gets (self, *args) |
| | gets(self, len) -> str Reads a line from the input file.
|
| |
| "PyObject *" | read (self, *args) |
| | read(self, size) -> bytes or None Reads from the file.
|
| |
| "bool" | opened (self, *args) |
| | opened(self) -> bool Checks if the file is opened or not
|
| |
| "PyObject *" | readbytes (self, *args) |
| | readbytes(self, size, big_endian) -> PyObject * Similar to read() but it respect the endianness
|
| |
| "int" | file2base (self, *args) |
| | file2base(self, pos, ea1, ea2, patchable) -> int Load portion of file into the database This function will include (ea1..ea2) into the addressing space of the program (make it enabled)
|
| |
| "int64" | size (self, *args) |
| | size(self) -> int64
|
| |
| "PyObject *" | filename (self, *args) |
| | filename(self) -> PyObject *
|
| |
| "PyObject *" | get_byte (self, *args) |
| | get_byte(self) -> PyObject * Reads a single byte from the file.
|
| |
|
| | thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") |
| |
This class is also used by file loaders scripts.
◆ __init__()
| __init__ |
( |
| self, |
|
|
* | args ) |
◆ close()
| "void" close |
( |
| self, |
|
|
* | args ) |
◆ file2base()
| "int" file2base |
( |
| self, |
|
|
* | args ) |
- Parameters
-
| pos | position in the file |
| ea1 | ..ea2): range of destination linear addresses |
| ea1 | ..ea2): range of destination linear addresses |
| patchable | should the kernel remember correspondance of file offsets to linear addresses. |
- Returns
- : 1-ok,0-read error, a warning is displayed
◆ filename()
| "PyObject *" filename |
( |
| self, |
|
|
* | args ) |
◆ from_capsule()
| "loader_input_t *" from_capsule |
( |
* | args | ) |
|
|
static |
◆ from_fp()
| "loader_input_t *" from_fp |
( |
* | args | ) |
|
|
static |
◆ from_linput()
| "loader_input_t *" from_linput |
( |
* | args | ) |
|
|
static |
◆ get_byte()
| "PyObject *" get_byte |
( |
| self, |
|
|
* | args ) |
Returns None if EOF or the read byte
◆ get_linput()
| "linput_t *" get_linput |
( |
| self, |
|
|
* | args ) |
◆ gets()
| "PyObject *" gets |
( |
| self, |
|
|
* | args ) |
Returns the read line or None
- Parameters
-
◆ getz()
| "PyObject *" getz |
( |
| self, |
|
|
* | args ) |
- Parameters
-
| sz | maximum size of the string |
| fpos | if != -1 then seek will be performed before reading |
- Returns
- : The string or None on failure.
◆ open()
| "bool" open |
( |
| self, |
|
|
* | args ) |
- Parameters
-
| filename | char const * |
| remote | bool |
- Returns
- : Boolean
◆ open_memory()
| "bool" open_memory |
( |
| self, |
|
|
* | args ) |
- Parameters
-
| start | starting address of the input |
| size | size of the memory range to represent as linput if unknown, may be passed as 0 |
◆ opened()
| "bool" opened |
( |
| self, |
|
|
* | args ) |
◆ read()
| "PyObject *" read |
( |
| self, |
|
|
* | args ) |
Returns the buffer or None
- Parameters
-
◆ readbytes()
| "PyObject *" readbytes |
( |
| self, |
|
|
* | args ) |
- Parameters
-
| size | size_t |
| big_endian | bool |
◆ seek()
| "int64" seek |
( |
| self, |
|
|
* | args ) |
- Parameters
-
- Returns
- : the new position (not 0 as fseek!)
◆ set_linput()
| "void" set_linput |
( |
| self, |
|
|
* | args ) |
◆ size()
| "int64" size |
( |
| self, |
|
|
* | args ) |
◆ tell()
| "int64" tell |
( |
| self, |
|
|
* | args ) |
◆ thisown
| thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") |
|
static |
The documentation for this class was generated from the following file: