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
|
|
get_many_bytes(ea)
Get the specified number of bytes of the program into the buffer. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_custom_data_format(dtid,
dfid)
Returns a dictionary populated with the data format values or None on
failure. |
|
|
|
|
get_custom_data_type(dtid)
Returns a dictionary populated with the data type values or None on
failure. |
|
|
|
|
|
|
|
unregister_data_types_and_formats(formats)
As opposed to register_data_types_and_formats(), this function
unregisters multiple data types and formats at once. |
|
|
|
|
|
|
|
|
|
|
|
|
|
enumerate_files(path,
fname,
callback)
Enumerate files in the specified directory while the callback returns
0. |
|
|
|
|
enumerate_system_files(subdir,
fname,
callback)
Similar to enumerate_files() however it searches inside IDA directory
or its subdirectories |
|
|
|
|
| get_fchunk_referer(ea,
idx) |
|
|
|
|
as_cstr(val)
Returns a C str from the passed value. |
|
|
|
|
as_unicode(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. |
|
|
|
|
|
|
|
struct_unpack(buffer,
signed=False,
offs=0)
Unpack a buffer given its length and offset using
struct.unpack_from(). |
|
|
|
|
|
|
|
parse_command_line(cmdline)
Parses a space separated string (quotes and escape character are
supported) |
|
|
|
|
get_inf_structure()
Returns the global variable 'inf' (an instance of idainfo structure,
see ida.hpp) |
|
|
|
|
|
|
|
|
|
|
|
|
|
notify_when(when,
callback)
Register a callback that will be called when an event happens. |
|
|
|
|
dbg_get_registers()
This function returns the register definition from the currently
loaded debugger. |
|
|
|
|
|
|
|
dbg_read_memory(ea,
sz)
Reads from the debugee's memory at the specified ea |
|
|
|
|
|
|
|
dbg_get_name()
This function returns the current debugger's name. |
|
|
|
|
|
|
|
dbg_can_query()
This function can be used to check if the debugger can be queried: |
|
|
|
|
AssembleLine(ea,
cs,
ip,
use32,
line)
Assemble an instruction to a buffer (display a warning if an error is
found) |
|
|
|
|
ph_get_id()
Returns the 'ph.id' field |
|
|
|
|
ph_get_version()
Returns the 'ph.version' |
|
|
|
|
ph_get_flag()
Returns the 'ph.flag' |
|
|
|
|
ph_get_cnbits()
Returns the 'ph.cnbits' |
|
|
|
|
ph_get_dnbits()
Returns the 'ph.dnbits' |
|
|
|
|
ph_get_regFirstSreg()
Returns the 'ph.regFirstSreg' |
|
|
|
|
ph_get_regLastSreg()
Returns the 'ph.regLastSreg' |
|
|
|
|
ph_get_segreg_size()
Returns the 'ph.segreg_size' |
|
|
|
|
ph_get_regCodeSreg()
Returns the 'ph.regCodeSreg' |
|
|
|
|
ph_get_regDataSreg()
Returns the 'ph.regDataSreg' |
|
|
|
|
ph_get_high_fixup_bits()
Returns the 'ph.high_fixup_bits' |
|
|
|
|
ph_get_icode_return()
Returns the 'ph.icode_return' |
|
|
|
|
ph_get_instruc_start()
Returns the 'ph.instruc_start' |
|
|
|
|
ph_get_instruc_end()
Returns the 'ph.instruc_end' |
|
|
|
|
ph_get_tbyte_size()
Returns the 'ph.tbyte_size' field as defined in he processor module |
|
|
|
|
ph_get_instruc()
Returns a list of tuples (instruction_name, instruction_feature)
containing the instructions list as defined in he processor module |
|
|
|
|
ph_get_regnames()
Returns the list of register names as defined in the processor module |
|
|
|
|
|
|
|
|
|
|
|
|
|
asktext(max_text,
defval,
prompt)
Asks for a long text |
|
|
|
|
str2ea(addr)
Converts a string express to EA. |
|
|
|
|
del_menu_item(menu_ctx)
Deletes a menu item previously added with add_menu_item() |
|
|
|
|
add_menu_item(menupath,
name,
hotkey,
flags,
callback,
args)
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_... |
|
|
|
|
tag_remove(colstr)
Remove color escape sequences from a string |
|
|
|
|
generate_disassembly(ea,
max_lines,
as_stack,
notags)
Generate disassembly lines (many lines) and put them into a buffer |
|
|
|
|
|
|
|
COLSTR(str,
tag)
Utility function to create a colored line |
|
|
|
|
mem2base(mem,
ea,
fpos)
Load database from the memory. |
|
|
|
|
|
|
|
|
|
|
|
|
|
get_switch_info_ex(ea)
Returns the a switch_info_ex_t structure containing the information
about the switch. |
|
|
|
|
|
|
|
|
|
|
set_switch_info_ex(ea,
switch_info_ex)
Saves the switch information in the database Please refer to the SDK
sample 'uiswitch' |
|
|
|
|
del_switch_info_ex(ea)
Deletes stored switch information |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pack_object_to_idb(obj,
ti,
tp,
fields,
ea,
pio_flags=0)
Write a typed object to the database. |
|
|
|
|
pack_object_to_bv(obj,
ti,
tp,
fields,
ea,
pio_flags=0)
Packs a typed object to a string |
|
|
|
|
init_output_buffer(size=MAXSTR)
This function initialize an output buffer with the given size. |
|
|
|
|
term_output_buffer()
Use this function to terminate an output buffer. |
|
|
|
|
|
|
|
OutValue(op,
outflags=0)
Output immediate value |
|
|
|
|
|
|
|
add_stkvar3(op,
v,
flags)
Automatically add stack variable if doesn't exist Processor modules
should use ua_stkvar2() |
|
|
|
|
|
|
|
OutImmChar(op,
outflags=0)
Output operand value as a commented character constant |
|
|
|
|
ua_stkvar2(op,
outflags=0)
Create or modify a stack variable in the function frame. |
|
|
|
|
ua_add_off_drefs(op,
type)
Add xrefs for offset operand of the current instruction Please check
ua.hpp / ua_add_off_drefs() |
|
|
|
|
ua_add_off_drefs2(op,
type,
outf)
Add xrefs for offset operand of the current instruction Please check
ua.hpp / ua_add_off_drefs2() |
|
|
|
|
|
|
|
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 = 0
int64 object
|
|
|
PY_ICID_BYREF = 1
byref object
|
|
|
PY_ICID_OPAQUE = 2
opaque object
|
|
|
NW_OPENIDB = 0x0001
Notify when the database is opened.
|
|
|
NW_CLOSEIDB = 0x0002
Notify when the database is closed.
|
|
|
NW_INITIDA = 0x0004
Notify when the IDA starts.
|
|
|
NW_TERMIDA = 0x0008
Notify when the IDA terminates.
|
|
|
NW_REMOVE = 0x0010
Use 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 = 0x1
sparse switch ( value table present ) otherwise lowcase present
|
|
|
SWI_V32 = 0x2
32-bit values in table
|
|
|
SWI_J32 = 0x4
32-bit jump offsets
|
|
|
SWI_VSPLIT = 0x8
value table is split (only for 32-bit values)
|
|
|
SWI_DEFAULT = 0x10
default case is present
|
|
|
SWI_END_IN_TBL = 0x20
switchend in table (default entry)
|
|
|
SWI_JMP_INV = 0x40
jumptable is inversed (last entry is for first entry in values table)
|
|
|
SWI_SHIFT_MASK = 0x180
use formula (element*shift + elbase) to find jump targets
|
|
|
SWI_ELBASE = 0x200
elbase is present (if not and shift!=0, endof(jumpea) is used)
|
|
|
SWI_JSIZE = 0x400
jump offset expansion bit
|
|
|
SWI_VSIZE = 0x800
value table element size expansion bit
|
|
|
SWI_SEPARATE = 0x1000
do not create an array of individual dwords
|
|
|
SWI_SIGNED = 0x2000
jump table entries are signed
|
|
|
SWI_CUSTOM = 0x4000
custom jump table - ph.create_switch_xrefs will be called to create
code xrefs for the table.
|
|
|
SWI_EXTENDED = 0x8000
this is switch_info_ex_t
|
|
|
SWI2_INDIRECT = 0x0001
value table elements are used as indexes into the jump table
|
|
|
SWI2_SUBTRACT = 0x0002
table 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 = 6
The 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()
|