IDAPython 8.4
|
Classes | |
class | IDAPython_displayhook |
class | loader_input_t |
A helper class to work with linput_t related functions. More... | |
class | object_t |
Helper class used to initialize empty objects. More... | |
class | plugin_t |
Base class for all scripted plugins. More... | |
class | plugmod_t |
Base class for all scripted multi-plugins. More... | |
class | py_clinked_object_t |
This is a utility and base class for C linked objects. More... | |
class | pyidc_cvt_helper__ |
This is a special helper object that helps detect which kind of object is this python object wrapping and how to convert it back and from IDC. More... | |
class | PyIdc_cvt_int64__ |
Helper class for explicitly representing VT_INT64 values. More... | |
class | PyIdc_cvt_refclass__ |
Helper class for representing references to immutable objects. More... | |
class | pyidc_opaque_object_t |
This is the base class for all Python<->IDC opaque objects. More... | |
Functions | |
require (modulename, package=None) | |
Load, or reload a module. | |
_replace_module_function (replacement) | |
replfun (func) | |
_qvector_front (self) | |
_qvector_back (self) | |
_bounded_getitem_iterator (self) | |
as_cstr (val) | |
Returns a C str from the passed value. | |
as_UTF16 (s) | |
Convenience function to convert a string into appropriate unicode format. | |
as_uint32 (v) | |
Returns a number as an unsigned int32 number. | |
as_int32 (v) | |
Returns a number as a signed int32 number. | |
as_signed (v, nbits=32) | |
Returns a number as signed. | |
TRUNC (ea) | |
Truncate EA for the current application bitness. | |
copy_bits (v, s, e=-1) | |
Copy bits from a value. | |
struct_unpack (buffer, signed=False, offs=0) | |
Unpack a buffer given its length and offset using struct.unpack_from(). | |
IDAPython_ExecSystem (cmd) | |
Executes a command with popen(). | |
IDAPython_FormatExc (etype, value=None, tb=None, limit=None) | |
This function is used to format an exception given the values returned by a PyErr_Fetch() | |
IDAPython_ExecScript (path, g, print_error=True) | |
Run the specified script. | |
IDAPython_LoadProcMod (path, g, print_error=True) | |
Load processor module. | |
IDAPython_UnLoadProcMod (script, g, print_error=True) | |
Unload processor module. | |
_listify_types (*classes) | |
notify_when (when, callback) | |
Register a callback that will be called when an event happens. | |
_make_one_time_warning_message (bad_attr, new_attr) | |
_make_missed_695bwcompat_property (bad_attr, new_attr, has_setter) | |
"PyObject *" | parse_command_line3 (*args) |
parse_command_line3(cmdline) -> PyObject * | |
"idainfo *" | get_inf_structure (*args) |
get_inf_structure() -> idainfo Returns the global variable 'inf' (an instance of idainfo structure, see ida.hpp) | |
"int" | set_script_timeout (*args) |
set_script_timeout(timeout) -> int Changes the script timeout value. | |
"void" | disable_script_timeout (*args) |
disable_script_timeout() Disables the script timeout and hides the script wait box. | |
"void" | enable_extlang_python (*args) |
enable_extlang_python(enable) Enables or disables Python extlang. | |
"void" | enable_python_cli (*args) |
enable_python_cli(enable) | |
"PyObject *" | format_basestring (*args) |
format_basestring(_in) -> str | |
"void" | pygc_refresh (*args) |
pygc_refresh(_self) | |
"PyObject *" | pygc_create_groups (*args) |
pygc_create_groups(_self, groups_infos) -> [int, ...] or None | |
"PyObject *" | pygc_delete_groups (*args) |
pygc_delete_groups(_self, groups, new_current) -> bool | |
"PyObject *" | pygc_set_groups_visibility (*args) |
pygc_set_groups_visibility(_self, groups, expand, new_current) -> bool | |
"TWidget *" | pycim_get_widget (*args) |
pycim_get_widget(_self) -> TWidget * | |
"void" | pycim_view_close (*args) |
pycim_view_close(_self) | |
"loader_input_t *" | loader_input_t_from_linput (*args) |
loader_input_t_from_linput(linput) -> loader_input_t | |
"loader_input_t *" | loader_input_t_from_capsule (*args) |
loader_input_t_from_capsule(pycapsule) -> loader_input_t | |
"loader_input_t *" | loader_input_t_from_fp (*args) |
loader_input_t_from_fp(fp) -> loader_input_t | |
Variables | |
BADADDR = _ida_idaapi.BADADDR | |
BADADDR32 = _ida_idaapi.BADADDR32 | |
BADADDR64 = _ida_idaapi.BADADDR64 | |
BADSEL = _ida_idaapi.BADSEL | |
SIZE_MAX = _ida_idaapi.SIZE_MAX | |
tuple | integer_types = (int, long) |
tuple | string_types = (str, unicode) |
long_type = long | |
int | SEEK_SET = 0 |
int | SEEK_CUR = 1 |
int | SEEK_END = 2 |
int | PLUGIN_MOD = 0x0001 |
int | PLUGIN_DRAW = 0x0002 |
int | PLUGIN_SEG = 0x0004 |
int | PLUGIN_UNL = 0x0008 |
int | PLUGIN_HIDE = 0x0010 |
int | PLUGIN_DBG = 0x0020 |
int | PLUGIN_PROC = 0x0040 |
int | PLUGIN_FIX = 0x0080 |
int | PLUGIN_MULTI = 0x0100 |
int | PLUGIN_SKIP = 0 |
int | PLUGIN_OK = 1 |
int | PLUGIN_KEEP = 2 |
int | PY_ICID_INT64 = 0 |
int | PY_ICID_BYREF = 1 |
int | PY_ICID_OPAQUE = 2 |
int | ST_OVER_DEBUG_SEG = 0x01 |
int | ST_OVER_LIB_FUNC = 0x02 |
as_unicode = as_UTF16 | |
IDAPython_Completion = __IDAPython_Completion_Util() | |
int | NW_OPENIDB = 0x0001 |
int | NW_CLOSEIDB = 0x0002 |
int | NW_INITIDA = 0x0004 |
int | NW_TERMIDA = 0x0008 |
int | NW_REMOVE = 0x0010 |
_notify_when_dispatcher = None | |
_IDAPython_displayhook = IDAPython_displayhook() | |
displayhook | |
HBF_CALL_WITH_NEW_EXEC = _ida_idaapi.HBF_CALL_WITH_NEW_EXEC | |
HBF_VOLATILE_METHOD_SET = _ida_idaapi.HBF_VOLATILE_METHOD_SET | |
at = cls.__getitem__ | |
append = cls.push_back | |
|
protected |
Helper function, to be set as __iter__ method for qvector-, or array-based classes.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
as_cstr | ( | val | ) |
The passed value can be of type refclass (returned by a call to buffer() or byref()) It scans for the first \x00 and returns the string value up to that point.
as_int32 | ( | v | ) |
as_signed | ( | v, | |
nbits = 32 ) |
The number of bits are specified by the user. The MSB holds the sign.
as_uint32 | ( | v | ) |
as_UTF16 | ( | s | ) |
copy_bits | ( | v, | |
s, | |||
e = -1 ) |
v | the value |
s | starting bit (0-based) |
e | ending bit |
"void" disable_script_timeout | ( | * | args | ) |
Calling L{set_script_timeout} will not have any effects until the script is compiled and executed again
"void" enable_extlang_python | ( | * | args | ) |
When enabled, all expressions will be evaluated by Python.
enable | Set to True to enable, False otherwise |
"void" enable_python_cli | ( | * | args | ) |
enable | bool |
"PyObject *" format_basestring | ( | * | args | ) |
_in | PyObject * |
"idainfo *" get_inf_structure | ( | * | args | ) |
IDAPython_ExecScript | ( | path, | |
g, | |||
print_error = True ) |
This function is used by the low-level plugin code.
IDAPython_ExecSystem | ( | cmd | ) |
IDAPython_FormatExc | ( | etype, | |
value = None, | |||
tb = None, | |||
limit = None ) |
IDAPython_LoadProcMod | ( | path, | |
g, | |||
print_error = True ) |
IDAPython_UnLoadProcMod | ( | script, | |
g, | |||
print_error = True ) |
"loader_input_t *" loader_input_t_from_capsule | ( | * | args | ) |
pycapsule | PyObject * |
"loader_input_t *" loader_input_t_from_fp | ( | * | args | ) |
fp | FILE * |
"loader_input_t *" loader_input_t_from_linput | ( | * | args | ) |
linput | linput_t * |
notify_when | ( | when, | |
callback ) |
when | one of NW_XXXX constants |
callback | This callback prototype varies depending on the 'when' parameter: The general callback format: def notify_when_callback(nw_code) In the case of NW_OPENIDB: def notify_when_callback(nw_code, is_old_database) |
"PyObject *" parse_command_line3 | ( | * | args | ) |
cmdline | char const * |
"TWidget *" pycim_get_widget | ( | * | args | ) |
self | PyObject * |
"void" pycim_view_close | ( | * | args | ) |
self | PyObject * |
"PyObject *" pygc_create_groups | ( | * | args | ) |
self | PyObject * |
groups_infos | PyObject * |
"PyObject *" pygc_delete_groups | ( | * | args | ) |
self | PyObject * |
groups | PyObject * |
new_current | PyObject * |
"void" pygc_refresh | ( | * | args | ) |
self | PyObject * |
"PyObject *" pygc_set_groups_visibility | ( | * | args | ) |
self | PyObject * |
groups | PyObject * |
expand | PyObject * |
new_current | PyObject * |
replfun | ( | func | ) |
require | ( | modulename, | |
package = None ) |
When under heavy development, a user's tool might consist of multiple modules. If those are imported using the standard 'import' mechanism, there is no guarantee that the Python implementation will re-read and re-evaluate the module's Python code. In fact, it usually doesn't. What should be done instead is 'reload()'-ing that module.
This is a simple helper function that will do just that: In case the module doesn't exist, it 'import's it, and if it does exist, 'reload()'s it.
The importing module (i.e., the module calling require()) will have the loaded module bound to its globals(), under the name 'modulename'. (If require() is called from the command line, the importing module will be 'main'.)
For more information, see: http://www.hexblog.com/?p=749.
"int" set_script_timeout | ( | * | args | ) |
The script wait box dialog will be hidden and shown again when the timeout elapses. See also L{disable_script_timeout}.
timeout | This value is in seconds. If this value is set to zero then the script will never timeout. |
struct_unpack | ( | buffer, | |
signed = False, | |||
offs = 0 ) |
This function will know how to unpack the given buffer by using the lookup table '__struct_unpack_table' If the buffer is of unknown length then None is returned. Otherwise the unpacked value is returned.
TRUNC | ( | ea | ) |
|
protected |
|
protected |
append = cls.push_back |
as_unicode = as_UTF16 |
at = cls.__getitem__ |
BADADDR = _ida_idaapi.BADADDR |
BADADDR32 = _ida_idaapi.BADADDR32 |
BADADDR64 = _ida_idaapi.BADADDR64 |
BADSEL = _ida_idaapi.BADSEL |
displayhook |
HBF_CALL_WITH_NEW_EXEC = _ida_idaapi.HBF_CALL_WITH_NEW_EXEC |
HBF_VOLATILE_METHOD_SET = _ida_idaapi.HBF_VOLATILE_METHOD_SET |
IDAPython_Completion = __IDAPython_Completion_Util() |
tuple integer_types = (int, long) |
long_type = long |
int NW_CLOSEIDB = 0x0002 |
int NW_INITIDA = 0x0004 |
int NW_OPENIDB = 0x0001 |
int NW_REMOVE = 0x0010 |
int NW_TERMIDA = 0x0008 |
int PLUGIN_DBG = 0x0020 |
int PLUGIN_DRAW = 0x0002 |
int PLUGIN_FIX = 0x0080 |
int PLUGIN_HIDE = 0x0010 |
int PLUGIN_KEEP = 2 |
int PLUGIN_MOD = 0x0001 |
int PLUGIN_MULTI = 0x0100 |
int PLUGIN_OK = 1 |
int PLUGIN_PROC = 0x0040 |
int PLUGIN_SEG = 0x0004 |
int PLUGIN_SKIP = 0 |
int PLUGIN_UNL = 0x0008 |
int PY_ICID_BYREF = 1 |
int PY_ICID_INT64 = 0 |
int PY_ICID_OPAQUE = 2 |
int SEEK_CUR = 1 |
int SEEK_END = 2 |
int SEEK_SET = 0 |
SIZE_MAX = _ida_idaapi.SIZE_MAX |
int ST_OVER_DEBUG_SEG = 0x01 |
int ST_OVER_LIB_FUNC = 0x02 |
tuple string_types = (str, unicode) |