Module ida_idaapi :: Class loader_input_t
[frames] | no frames]

Class loader_input_t

object --+
         |
        loader_input_t

Proxy of C++ loader_input_t class.

A helper class to work with linput_t related functions. This class is also used by file loaders scripts.

Instance Methods
loader_input_t
__init__(self, pycapsule=None)
Closes the file
 
__repr__(self)
repr(x)
 
__swig_destroy__(self)
 
close(self)
int
file2base(self, pos, ea1, ea2, patchable)
Load portion of file into the database This function will include (ea1..ea2) into the addressing space of the program (make it enabled)
PyObject *
filename(self)
PyObject *
get_char(self)
linput_t *
get_linput(self)
PyObject *
gets(self, len)
Reads a line from the input file.
PyObject *
getz(self, sz, fpos=-1)
Returns a zero terminated string at the given position
bool
open(self, filename, remote=False)
Opens a file (or a remote file)
bool
open_memory(self, start, size=0)
Create a linput for process memory (By internally calling idaapi.create_memory_linput()) This linput will use dbg->read_memory() to read data
bool
opened(self)
Checks if the file is opened or not
PyObject *
read(self, size)
Reads from the file.
PyObject *
readbytes(self, size, big_endian)
Similar to read() but it respect the endianness
int64
seek(self, pos, whence=SEEK_SET)
Set input source position
 
set_linput(self, linput)
Links the current loader_input_t instance to a linput_t instance
int64
size(self)
int64
tell(self)
Returns the current position

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods
loader_input_t
from_capsule(pycapsule)
loader_input_t
from_fp(fp)
A static method to construct an instance from a FILE*
loader_input_t
from_linput(linput)
Properties
  __idc_cvt_id__
loader_input_t___idc_cvt_id___get(self) -> int
  thisown
The membership flag

Inherited from object: __class__

Method Details

__init__(self, pycapsule=None)
(Constructor)

 

Closes the file

Returns: loader_input_t
Overrides: object.__init__

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

file2base(self, pos, ea1, ea2, patchable)

 

Load portion of file into the database This function will include (ea1..ea2) into the addressing space of the program (make it enabled)

Parameters:
  • li - pointer ot input source
  • pos - position in the file
  • (ea1..ea2) - range of destination linear addresses
  • patchable - should the kernel remember correspondance of file offsets to linear addresses.
Returns: int
1-ok,0-read error, a warning is displayed

gets(self, len)

 

Reads a line from the input file. Returns the read line or None

Returns: PyObject *

getz(self, sz, fpos=-1)

 

Returns a zero terminated string at the given position

Parameters:
  • sz - maximum size of the string
  • fpos - if != -1 then seek will be performed before reading
Returns: PyObject *
The string or None on failure.

open(self, filename, remote=False)

 

Opens a file (or a remote file)

Returns: bool
Boolean

open_memory(self, start, size=0)

 

Create a linput for process memory (By internally calling idaapi.create_memory_linput()) This linput will use dbg->read_memory() to read data

Parameters:
  • start - starting address of the input
  • size - size of the memory range to represent as linput if unknown, may be passed as 0
Returns: bool

read(self, size)

 

Reads from the file. Returns the buffer or None

Returns: PyObject *

seek(self, pos, whence=SEEK_SET)

 

Set input source position

Returns: int64
the new position (not 0 as fseek!)

Property Details

__idc_cvt_id__

loader_input_t___idc_cvt_id___get(self) -> int

Get Method:
unreachable.loader_input_t___idc_cvt_id___get(self)
Set Method:
unreachable.loader_input_t___idc_cvt_id___set(self, __idc_cvt_id__)

thisown

The membership flag

Get Method:
unreachable(x)
Set Method:
unreachable(x, v)