Module ida_loader
[frames] | no frames]

Module ida_loader

IDA Plugin SDK API wrapper: loader

Classes
  qvector_snapshotvec_t
Proxy of C++ qvector<(p.snapshot_t)> class
  loader_t
Proxy of C++ loader_t class
  idp_name_t
Proxy of C++ idp_name_t class
  idp_desc_t
Proxy of C++ idp_desc_t class
  plugin_info_t
Proxy of C++ plugin_info_t class
  snapshot_t
Proxy of C++ snapshot_t class
Functions
bool
load_binary_file(filename, li, _neflags, fileoff, basepara, binoff, nbytes)
int
process_archive(temp_file, li, module_name, neflags, defmember, loader)
int
gen_file(otype, fp, ea1, ea2, flags)
int
file2base(li, pos, ea1, ea2, patchable)
int
base2file(fp, pos, ea1, ea2)
bool
extract_module_from_archive(filename, bufsize, temp_file_ptr, is_remote)
filetype_t
get_basic_file_type(li)
size_t
get_file_type_name()
int
load_ids_module(fname)
char const *
get_plugin_options(plugin)
plugin_t *
find_plugin(name, load_if_needed=False)
bool
load_and_run_plugin(name, arg)
qoff64_t
get_fileregion_offset(ea)
ea_t
get_fileregion_ea(offset)
int
gen_exe_file(fp)
int
reload_file(file, is_remote)
bool
build_snapshot_tree(root)
int
flush_buffers()
bool
is_trusted_idb()
bool
save_database(outfile, flags, root=None, attr=None)
bool
is_database_flag(dbfl)
 
set_database_flag(dbfl, cnd=True)
 
clr_database_flag(dbfl)
char const *
get_path(pt)
 
set_path(pt, path)
int
mem2base(py_mem, ea, fpos=-1)
Load database from the memory.
PyObject *
load_plugin(name)
Loads a plugin
bool
run_plugin(plg, arg)
Runs a plugin
Variables
  LDRF_RELOAD = 1
  LDRF_REQ_PROC = 2
  ACCEPT_ARCHIVE = 8192
  ACCEPT_CONTINUE = 16384
  ACCEPT_FIRST = 32768
  NEF_SEGS = 1
  NEF_RSCS = 2
  NEF_NAME = 4
  NEF_MAN = 8
  NEF_FILL = 16
  NEF_IMPS = 32
  NEF_FIRST = 128
  NEF_CODE = 256
  NEF_RELOAD = 512
  NEF_FLAT = 1024
  NEF_MINI = 2048
  NEF_LOPT = 4096
  NEF_LALL = 8192
  LOADER_EXT = 'so'
  PLUGIN_EXT = 'so'
  IDP_EXT = 'so'
  LOADER_DLL = '*.so'
  OFILE_MAP = 0
  OFILE_EXE = 1
  OFILE_IDC = 2
  OFILE_LST = 3
  OFILE_ASM = 4
  OFILE_DIF = 5
  GENFLG_MAPSEG = 1
  GENFLG_MAPNAME = 2
  GENFLG_MAPDMNG = 4
  GENFLG_MAPLOC = 8
  GENFLG_IDCTYPE = 8
  GENFLG_ASMTYPE = 16
  GENFLG_GENHTML = 32
  GENFLG_ASMINC = 64
  FILEREG_PATCHABLE = 1
  FILEREG_NOTPATCHABLE = 0
  PLUGIN_DLL = '*.so'
  MODULE_ENTRY_LOADER = '_LDSC'
  MODULE_ENTRY_PLUGIN = '_PLUGIN'
  MODULE_ENTRY_IDP = '_LPH'
  IDP_DLL = '*.so'
  MAX_DATABASE_DESCRIPTION = 128
  SSF_AUTOMATIC = 1
  SSUF_DESC = 1
  SSUF_PATH = 2
  SSUF_FLAGS = 4
  DBFL_KILL = 1
  DBFL_COMP = 2
  DBFL_BAK = 4
  DBFL_TEMP = 8
  PATH_TYPE_CMD = 0
  PATH_TYPE_IDB = 1
  PATH_TYPE_ID0 = 2
  __package__ = None
Function Details

mem2base(py_mem, ea, fpos=-1)

 

Load database from the memory.

Parameters:
  • mem - the buffer
  • ea - start linear addresses
  • fpos - position in the input file the data is taken from. if == -1, then no file position correspond to the data.
Returns: int
  • Returns zero if the passed buffer was not a string
  • Otherwise 1 is returned

load_plugin(name)

 

Loads a plugin

Returns: PyObject *
  • None if plugin could not be loaded
  • An opaque object representing the loaded plugin

run_plugin(plg, arg)

 

Runs a plugin

Parameters:
  • plg - A plugin object (returned by load_plugin())
Returns: bool
Boolean