| Trees | Indices | Help |
|
|---|
|
|
This is a placeholder module used to document all the IDA SDK functions that are wrapped manually. You still need to import 'idaapi' and not this module to use the functions
| Classes | |
|
data_type_t Custom data type definition. |
|
|
data_format_t Information about a data format |
|
|
loader_input_t A helper class to work with linput_t related functions. |
|
|
qfile_t A helper class to work with FILE related functions. |
|
|
BasicBlock Basic block class. |
|
|
FlowChart Flowchart class used to determine basic blocks. |
|
|
GraphViewer This class wraps the user graphing facility provided by the graph.hpp file |
|
|
pyidc_opaque_object_t This is the base class for all Python<->IDC opaque objects |
|
|
py_clinked_object_t This is a utility and base class for C linked objects |
|
|
object_t Helper class used to initialize empty objects |
|
|
plugin_t Base class for all scripted plugins. |
|
|
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. |
|
|
PyIdc_cvt_int64__ Helper class for explicitly representing VT_INT64 values |
|
|
PyIdc_cvt_refclass__ Helper class for representing references to immutable objects |
|
|
Appcall_array__ This class is used with Appcall.array() method |
|
|
Appcall_callable__ Helper class to issue appcalls using a natural syntax:... |
|
|
Appcall_consts__ Helper class used by Appcall.Consts attribute It is used to retrieve constants via attribute access |
|
| Appcall__ | |
| IDP_Hooks | |
|
Choose Choose - class for choose() with callbacks |
|
|
Choose2 Choose2 wrapper class. |
|
|
cli_t cli_t wrapper class. |
|
|
simplecustviewer_t The base class for implementing simple custom viewers |
|
| switch_info_ex_t | |
|
NearestName Utility class to help find the nearest name in a given ea/name dictionary |
|
|
op_t Class representing operands |
|
|
insn_t Class representing instructions |
|
|
processor_t Base class for all processor module scripts |
|
| Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| Variables | |
DTP_NODUP = 0x0001
|
|
SEEK_SET = 0
|
|
SEEK_CUR = 1
|
|
SEEK_END = 2
|
|
PLUGIN_MOD = 0x0001
|
|
PLUGIN_DRAW = 0x0002
|
|
PLUGIN_SEG = 0x0004
|
|
PLUGIN_UNL = 0x0008
|
|
PLUGIN_HIDE = 0x0010
|
|
PLUGIN_DBG = 0x0020
|
|
PLUGIN_PROC = 0x0040
|
|
PLUGIN_FIX = 0x0080
|
|
PLUGIN_SKIP = 0
|
|
PLUGIN_OK = 1
|
|
PLUGIN_KEEP = 2
|
|
PY_ICID_INT64 = 0int64 object |
|
PY_ICID_BYREF = 1byref object |
|
PY_ICID_OPAQUE = 2opaque object |
|
IDAPython_Completion = __IDAPython_Completion_Util()
|
|
NW_OPENIDB = 0x0001Notify when the database is opened. |
|
NW_CLOSEIDB = 0x0002Notify when the database is closed. |
|
NW_INITIDA = 0x0004Notify when the IDA starts. |
|
NW_TERMIDA = 0x0008Notify when the IDA terminates. |
|
NW_REMOVE = 0x0010Use this flag with other flags to uninstall a notifywhen callback |
|
Appcall = Appcall__()
|
|
DP_LEFT = 0x0001
|
|
DP_TOP = 0x0002
|
|
DP_RIGHT = 0x0004
|
|
DP_BOTTOM = 0x0008
|
|
DP_INSIDE = 0x0010
|
|
DP_BEFORE = 0x0020
|
|
DP_RAW = 0x0040
|
|
DP_FLOATING = 0x0080
|
|
COLOR_ADDR_SIZE = 16 if _idaapi.BADADDR== 0xFFFFFFFFFFFFFFFFL
|
|
SCOLOR_FG_MAX = '\x28'
|
|
SCOLOR_OPND1 = chr(cvar.COLOR_ADDR+ 1)
|
|
SCOLOR_OPND2 = chr(cvar.COLOR_ADDR+ 2)
|
|
SCOLOR_OPND3 = chr(cvar.COLOR_ADDR+ 3)
|
|
SCOLOR_OPND4 = chr(cvar.COLOR_ADDR+ 4)
|
|
SCOLOR_OPND5 = chr(cvar.COLOR_ADDR+ 5)
|
|
SCOLOR_OPND6 = chr(cvar.COLOR_ADDR+ 6)
|
|
SCOLOR_UTF8 = chr(cvar.COLOR_ADDR+ 10)
|
|
PALETTE_SIZE = cvar.COLOR_FG_MAX+ _idaapi.COLOR_BG_MAX
|
|
SWI_SPARSE = 0x1sparse switch ( value table present ) otherwise lowcase present |
|
SWI_V32 = 0x232-bit values in table |
|
SWI_J32 = 0x432-bit jump offsets |
|
SWI_VSPLIT = 0x8value table is split (only for 32-bit values) |
|
SWI_DEFAULT = 0x10default case is present |
|
SWI_END_IN_TBL = 0x20switchend in table (default entry) |
|
SWI_JMP_INV = 0x40jumptable is inversed (last entry is for first entry in values table) |
|
SWI_SHIFT_MASK = 0x180use formula (element*shift + elbase) to find jump targets |
|
SWI_ELBASE = 0x200elbase is present (if not and shift!=0, endof(jumpea) is used) |
|
SWI_JSIZE = 0x400jump offset expansion bit |
|
SWI_VSIZE = 0x800value table element size expansion bit |
|
SWI_SEPARATE = 0x1000do not create an array of individual dwords |
|
SWI_SIGNED = 0x2000jump table entries are signed |
|
SWI_CUSTOM = 0x4000custom jump table - ph.create_switch_xrefs will be called to create code xrefs for the table. |
|
SWI_EXTENDED = 0x8000this is switch_info_ex_t |
|
SWI2_INDIRECT = 0x0001value table elements are used as indexes into the jump table |
|
SWI2_SUBTRACT = 0x0002table values are subtracted from the elbase instead of being addded |
|
CUSTOM_CMD_ITYPE = 0x8000
|
|
REG_SPOIL = 0x80000000
|
|
REAL_ERROR_FORMAT = -1
|
|
REAL_ERROR_RANGE = -2
|
|
REAL_ERROR_BADDATA = -3
|
|
OP_FP_BASED = 0x00000000
|
|
OP_SP_BASED = 0x00000001
|
|
OP_SP_ADD = 0x00000000
|
|
OP_SP_SUB = 0x00000002
|
|
PLFM_386 = 0x0
|
|
PLFM_Z80 = 0x1
|
|
PLFM_I860 = 0x2
|
|
PLFM_8051 = 0x3
|
|
PLFM_TMS = 0x4
|
|
PLFM_6502 = 0x5
|
|
PLFM_PDP = 0x6
|
|
PLFM_68K = 0x7
|
|
PLFM_JAVA = 0x8
|
|
PLFM_6800 = 0x9
|
|
PLFM_ST7 = 0x10
|
|
PLFM_MC6812 = 0x11
|
|
PLFM_MIPS = 0x12
|
|
PLFM_ARM = 0x13
|
|
PLFM_TMSC6 = 0x14
|
|
PLFM_PPC = 0x15
|
|
PLFM_80196 = 0x16
|
|
PLFM_Z8 = 0x17
|
|
PLFM_SH = 0x18
|
|
PLFM_NET = 0x19
|
|
PLFM_AVR = 0x20
|
|
PLFM_H8 = 0x21
|
|
PLFM_PIC = 0x22
|
|
PLFM_SPARC = 0x23
|
|
PLFM_ALPHA = 0x24
|
|
PLFM_HPPA = 0x25
|
|
PLFM_H8500 = 0x26
|
|
PLFM_TRICORE = 0x27
|
|
PLFM_DSP56K = 0x28
|
|
PLFM_C166 = 0x29
|
|
PLFM_ST20 = 0x30
|
|
PLFM_IA64 = 0x31
|
|
PLFM_I960 = 0x32
|
|
PLFM_F2MC = 0x33
|
|
PLFM_TMS320C54 = 0x34
|
|
PLFM_TMS320C55 = 0x35
|
|
PLFM_TRIMEDIA = 0x36
|
|
PLFM_M32R = 0x37
|
|
PLFM_NEC_78K0 = 0x38
|
|
PLFM_NEC_78K0S = 0x39
|
|
PLFM_M740 = 0x40
|
|
PLFM_M7700 = 0x41
|
|
PLFM_ST9 = 0x42
|
|
PLFM_FR = 0x43
|
|
PLFM_MC6816 = 0x44
|
|
PLFM_M7900 = 0x45
|
|
PLFM_TMS320C3 = 0x46
|
|
PLFM_KR1878 = 0x47
|
|
PLFM_AD218X = 0x48
|
|
PLFM_OAKDSP = 0x49
|
|
PLFM_TLCS900 = 0x50
|
|
PLFM_C39 = 0x51
|
|
PLFM_CR16 = 0x52
|
|
PLFM_MN102L00 = 0x53
|
|
PLFM_TMS320C1X = 0x54
|
|
PLFM_NEC_V850X = 0x55
|
|
PLFM_SCR_ADPT = 0x56
|
|
PLFM_EBC = 0x57
|
|
PLFM_MSP430 = 0x58
|
|
PR_SEGS = 0x000001
|
|
PR_USE32 = 0x000002
|
|
PR_DEFSEG32 = 0x000004
|
|
PR_RNAMESOK = 0x000008
|
|
PR_ADJSEGS = 0x000020
|
|
PR_DEFNUM = 0x0000C0
|
|
PRN_HEX = 0x000000
|
|
PRN_OCT = 0x000040
|
|
PRN_DEC = 0x000080
|
|
PRN_BIN = 0x0000C0
|
|
PR_WORD_INS = 0x000100
|
|
PR_NOCHANGE = 0x000200
|
|
PR_ASSEMBLE = 0x000400
|
|
PR_ALIGN = 0x000800
|
|
PR_TYPEINFO = 0x001000
|
|
PR_USE64 = 0x002000
|
|
PR_SGROTHER = 0x004000
|
|
PR_STACK_UP = 0x008000
|
|
PR_BINMEM = 0x010000
|
|
PR_SEGTRANS = 0x020000
|
|
PR_CHK_XREF = 0x040000
|
|
PR_NO_SEGMOVE = 0x080000
|
|
PR_FULL_HIFXP = 0x100000
|
|
PR_USE_ARG_TYPES = 0x200000
|
|
PR_SCALE_STKVARS = 0x400000
|
|
PR_DELAYED = 0x800000
|
|
PR_ALIGN_INSN = 0x1000000
|
|
PR_PURGING = 0x2000000
|
|
PR_CNDINSNS = 0x4000000
|
|
PR_USE_TBYTE = 0x8000000
|
|
PR_DEFSEG64 = 0x10000000
|
|
UA_MAXOP = 6The maximum number of operands in the insn_t structure |
|
cmd = insn_t(_idaapi.py_get_global_cmd_link())cmd is a global variable of type insn_t. |
|
CF_STOP = 0x00001
|
|
CF_CALL = 0x00002
|
|
CF_CHG1 = 0x00004
|
|
CF_CHG2 = 0x00008
|
|
CF_CHG3 = 0x00010
|
|
CF_CHG4 = 0x00020
|
|
CF_CHG5 = 0x00040
|
|
CF_CHG6 = 0x00080
|
|
CF_USE1 = 0x00100
|
|
CF_USE2 = 0x00200
|
|
CF_USE3 = 0x00400
|
|
CF_USE4 = 0x00800
|
|
CF_USE5 = 0x01000
|
|
CF_USE6 = 0x02000
|
|
CF_JUMP = 0x04000
|
|
CF_SHFT = 0x08000
|
|
CF_HLL = 0x10000
|
|
o_void = 0
|
|
o_reg = 1
|
|
o_mem = 2
|
|
o_phrase = 3
|
|
o_displ = 4
|
|
o_imm = 5
|
|
o_far = 6
|
|
o_near = 7
|
|
o_idpspec0 = 8
|
|
o_idpspec1 = 9
|
|
o_idpspec2 = 10
|
|
o_idpspec3 = 11
|
|
o_idpspec4 = 12
|
|
o_idpspec5 = 13
|
|
o_last = 14
|
|
dt_byte = 0
|
|
dt_word = 1
|
|
dt_dword = 2
|
|
dt_float = 3
|
|
dt_double = 4
|
|
dt_tbyte = 5
|
|
dt_packreal = 6
|
|
dt_qword = 7
|
|
dt_byte16 = 8
|
|
dt_code = 9
|
|
dt_void = 10
|
|
dt_fword = 11
|
|
dt_bitfild = 12
|
|
dt_string = 13
|
|
dt_unicode = 14
|
|
dt_3byte = 15
|
|
dt_ldbl = 16
|
|
OF_NO_BASE_DISP = 0x80
|
|
OF_OUTER_DISP = 0x40
|
|
PACK_FORM_DEF = 0x20
|
|
OF_NUMBER = 0x10
|
|
OF_SHOW = 0x08
|
|
INSN_MACRO = 0x01
|
|
INSN_MODMAC = 0x02
|
|
IDPOPT_STR = 1
|
|
IDPOPT_NUM = 2
|
|
IDPOPT_BIT = 3
|
|
IDPOPT_FLT = 4
|
|
IDPOPT_I64 = 5
|
|
IDPOPT_OK = 0
|
|
IDPOPT_BADKEY = 1
|
|
IDPOPT_BADTYPE = 2
|
|
IDPOPT_BADVALUE = 3
|
|
ph = __ph()
|
|
| Function Details |
Get the specified number of bytes of the program into the buffer.
|
Registers a custom data type.
|
Unregisters a custom data type.
|
Registers a custom data format with a given data type.
|
Unregisters a custom data format
|
Returns a dictionary populated with the data format values or None on failure.
|
Returns a dictionary populated with the data type values or None on failure.
|
Registers multiple data types and formats at once. To register one type/format at a time use register_custom_data_type/register_custom_data_format It employs a special table of types and formats described below: The 'formats' is a list of tuples. If a tuple has one element then it is the format to be registered with dtid=0 If the tuple has more than one element, then tuple[0] is the data type and tuple[1:] are the data formats. For example: many_formats = [ (pascal_data_type(), pascal_data_format()), (simplevm_data_type(), simplevm_data_format()), (makedword_data_format(),), (simplevm_data_format(),) ] The first two tuples describe data types and their associated formats. The last two tuples describe two data formats to be used with built-in data types. |
Returns the manual memory regions
|
Checks if a debugger is loaded
|
Refreshes the debugger memory
|
Enumerate files in the specified directory while the callback returns 0.
|
Returns a C str from the passed value. The passed value can be of type refclass (returned by a call to buffer() or byref()) It scans for the first and returns the string value up to that point. |
Returns a number as signed. The number of bits are specified by the user. The MSB holds the sign. |
Copy bits from a value
|
Unpack a buffer given its length and offset using struct.unpack_from(). 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. |
Run the specified script. It also addresses http://code.google.com/p/idapython/issues/detail?id=42 This function is used by the low-level plugin code. |
Parses a space separated string (quotes and escape character are supported)
|
Changes the script timeout value.
|
Enables or disables Python extlang. When enabled, all expressions will be evaluated by Python.
|
This is an IDC function exported from the Python plugin. It is used to evaluate Python statements from IDC.
|
Register a callback that will be called when an event happens.
@param when: one of NW_XXXX constants
@param 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)
@return: Boolean
|
This function returns the register definition from the currently loaded debugger. Basically, it returns an array of structure similar to to idd.hpp / register_info_t
|
Returns the segment register base value
|
Reads from the debugee's memory at the specified ea
|
Writes a buffer to the debugee's memory
|
This function returns the current debugger's name.
|
This function returns the memory configuration of a debugged process.
|
This function can be used to check if the debugger can be queried:
|
Assemble an instruction to a buffer (display a warning if an error is found)
|
Returns the currently highlighted identifier
|
Asks for a long text
|
Converts a string express to EA. The expression evaluator may be called as well.
|
Deletes a menu item previously added with add_menu_item()
|
Adds a menu item
@param menupath: path to the menu item after or before which the insertion will take place
@param name: name of the menu item (~x~ is used to denote Alt-x hot letter)
@param hotkey: hotkey for the menu item (may be empty)
@param flags: one of SETMENU_... consts
@param callback: function which gets called when the user selects the menu item.
The function callback is of the form:
def callback(*args):
pass
@param args: tuple containing the arguments
@return: None or a menu context (to be used by del_menu_item())
|
Sets the dock orientation of a window relatively to another window.
@param src: Source docking control
@param dest: Destination docking control
@param orient: One of DOR_XXXX constants
@param left, top, right, bottom: These parameter if DOR_FLOATING is used, or if you want to specify the width of docked windows
@return: Boolean
Example:
set_dock_pos('Structures', 'Enums', DOR_RIGHT) <- docks the Structures window to the right of Enums window
|
User-defined line-prefixes are displayed just after the autogenerated
line prefixes. In order to use them, the plugin should call the
following function to specify its width and contents.
@param width: the width of the user-defined prefix
@param callback: a get_user_defined_prefix callback to get the contents of the prefix.
Its arguments:
ea - linear address
lnnum - line number
indent - indent of the line contents (-1 means the default instruction)
indent and is used for instruction itself. see explanations for printf_line()
line - the line to be generated. the line usually contains color tags this argument
can be examined to decide whether to generated the prefix
bufsize- the maximum allowed size of the output buffer
It returns a buffer of size < bufsize
In order to remove the callback before unloading the plugin, specify the width = 0 or the callback = None
|
Remove color escape sequences from a string
|
Generate disassembly lines (many lines) and put them into a buffer
|
Checks if the given character requires escaping
|
Utility function to create a colored line
|
Load database from the memory.
|
Loads a plugin
|
Runs a plugin
|
Returns the name of an imported module given its index
|
Returns the a switch_info_ex_t structure containing the information about the switch. Please refer to the SDK sample 'uiswitch'
|
This function creates xrefs from the indirect jump. Usually there is no need to call this function directly because the kernel will call it for switch tables Note: Custom switch information are not supported yet.
|
Create switch table from the switch information
|
Saves the switch information in the database Please refer to the SDK sample 'uiswitch'
|
Enumerate imports from a specific module. Please refer to ex_imports.py example.
|
Returns the size of a type
|
Returns the type of an item
|
Unpacks from the database at 'ea' to an object. Please refer to unpack_object_from_bv() |
Unpacks a buffer into an object. Returns the error_t returned by idaapi.pack_object_to_idb
|
Write a typed object to the database. Raises an exception if wrong parameters were passed or conversion fails Returns the error_t returned by idaapi.pack_object_to_idb
|
Packs a typed object to a string
|
This function initialize an output buffer with the given size. It should be called before using any out_xxxx() functions.
|
Decodes the preceding instruction. Please check ua.hpp / decode_preceding_insn()
|
Output immediate value
|
Get pointer to stack variable
|
Automatically add stack variable if doesn't exist Processor modules should use ua_stkvar2()
|
Apply type information to a stack variable
|
Output operand value as a commented character constant
|
Create or modify a stack variable in the function frame. Please check ua.hpp / ua_stkvar2()
|
Add xrefs for offset operand of the current instruction Please check ua.hpp / ua_add_off_drefs()
|
Add xrefs for offset operand of the current instruction Please check ua.hpp / ua_add_off_drefs2()
|
Output a name expression
|
| Variables Details |
NW_OPENIDBNotify when the database is opened. Its callback is of the form: def notify_when_callback(nw_code, is_old_database)
|
NW_CLOSEIDBNotify when the database is closed. Its callback is of the form: def notify_when_callback(nw_code)
|
NW_INITIDANotify when the IDA starts. Its callback is of the form: def notify_when_callback(nw_code)
|
NW_TERMIDANotify when the IDA terminates. Its callback is of the form: def notify_when_callback(nw_code)
|
COLOR_ADDR_SIZE
|
SWI_CUSTOMcustom jump table - ph.create_switch_xrefs will be called to create code xrefs for the table. it must return 2. custom jump table must be created by the module
|
cmdcmd is a global variable of type insn_t. It is contains information about the last decoded instruction. This variable is also filled by processor modules when they decode instructions.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Fri Oct 01 17:03:03 2010 | http://epydoc.sourceforge.net |