Module ida_nalt
[frames] | no frames]

Module ida_nalt

IDA Plugin SDK API wrapper: nalt

Classes
  array_parameters_t
Proxy of C++ array_parameters_t class.
  custom_data_type_ids_fids_array
Proxy of C++ wrapped_array_t< int16,8 > class.
  custom_data_type_ids_t
Proxy of C++ custom_data_type_ids_t class.
  enum_const_t
Proxy of C++ enum_const_t class.
  opinfo_t
Proxy of C++ opinfo_t class.
  printop_t
Proxy of C++ printop_t class.
  refinfo_t
Proxy of C++ refinfo_t class.
  strpath_ids_array
Proxy of C++ wrapped_array_t< tid_t,32 > class.
  strpath_t
Proxy of C++ strpath_t class.
  switch_info_t
Proxy of C++ switch_info_t class.
Functions
int
add_encoding(encoding)
Add a new encoding (e.g.
 
clr__bnot0(ea)
 
clr__bnot1(ea)
 
clr__invsign0(ea)
 
clr__invsign1(ea)
 
clr_abits(ea, bits)
 
clr_align_flow(ea)
 
clr_colored_item(ea)
 
clr_fixed_spd(ea)
 
clr_has_lname(ea)
 
clr_has_ti(ea)
 
clr_has_ti0(ea)
 
clr_has_ti1(ea)
 
clr_libitem(ea)
 
clr_lzero0(ea)
 
clr_lzero1(ea)
 
clr_noret(ea)
 
clr_notcode(ea)
Clear not-code mark.
 
clr_notproc(ea)
 
clr_retfp(ea)
 
clr_terse_struc(ea)
 
clr_tilcmt(ea)
 
clr_usemodsp(ea)
 
clr_usersp(ea)
 
clr_userti(ea)
 
clr_zstroff(ea)
str
dbg_get_input_path()
Get debugger input file name/path (see 'LFLG_DBG_NOPATH' )
 
del_absbase(ea)
 
del_aflags(ea)
 
del_alignment(ea)
 
del_array_parameters(ea)
 
del_custom_data_type_ids(ea)
bool
del_encoding(idx)
Delete an encoding (1-based)
 
del_ind_purged(ea)
bool
del_item_color(ea)
 
del_op_tinfo(ea, n)
bool
del_refinfo(ea, n)
 
del_source_linnum(ea)
 
del_str_type(ea)
 
del_switch_info(ea)
 
del_switch_parent(ea)
 
del_tinfo(ea)
 
delete_imports()
Delete all imported modules information.
nodeidx_t
ea2node(ea)
Get netnode for the specified address.
char const *
encoding_from_strtype(strtype)
Get encoding name for this strtype.
int
enum_import_names(mod_index, py_cb)
Enumerate imports from a specific module.
int
find_custom_refinfo(name)
Get id of a custom refinfo type.
 
get_abi_name(*args)
ea_t
get_absbase(ea)
uint32
get_aflags(ea)
uint32
get_alignment(ea)
str
get_archive_path()
Get archive file path from which input file was extracted.
ssize_t
get_array_parameters(out, ea)
str
get_asm_inc_file()
Get name of the include file.
int
get_custom_data_type_ids(cdis, ea)
custom_refinfo_handler_t const *
get_custom_refinfo(crid)
Get definition of a registered custom refinfo type.
int
get_default_encoding_idx(bpu)
Get default encoding index for a specific string type.
int
get_encoding_bpu(idx)
Get the amount of bytes per unit (e.g., 2 for UTF-16, 4 for UTF-32) for the encoding with the given index.
char const *
get_encoding_name(idx)
Get encoding name for specific index (1-based).
int
get_encoding_qty()
Get total number of encodings (counted from 0)
ea_t
get_gotea()
netnode
get_ids_modnode()
Get ids modnode.
ea_t
get_imagebase()
Get image base address.
PyObject *
get_import_module_name(mod_index)
Returns the name of an imported module given its index
uint
get_import_module_qty()
Get number of import modules.
ea_t
get_ind_purged(ea)
str
get_input_file_path()
Get full path of the input file.
bgcolor_t
get_item_color(ea)
bool
get_op_tinfo(tif, ea, n)
int
get_outfile_encoding_idx()
Get the index of the encoding used when producing files 0 means no that the IDB's default 1 byte-per-unit encoding is used
bool
get_refinfo(ri, ea, n)
reftype_t
get_reftype_by_size(size)
Get REF_...
str
get_root_filename()
Get file name only of the input file.
uval_t
get_source_linnum(ea)
uchar
get_str_encoding_idx(strtype)
Get index of the string encoding for this string.
char
get_str_term1(strtype)
char
get_str_term2(strtype)
uint32
get_str_type(ea)
uchar
get_str_type_code(strtype)
int
get_strtype_bpu(strtype)
 
get_switch_info(*args)
ea_t
get_switch_parent(ea)
bool
get_tinfo(tif, ea)
netnode
getnode(ea)
bool
has_lname(ea)
bool
has_ti(ea)
bool
has_ti0(ea)
bool
has_ti1(ea)
 
hide_border(ea)
 
hide_item(ea)
bool
is__bnot0(ea)
bool
is__bnot1(ea)
bool
is__invsign0(ea)
bool
is__invsign1(ea)
bool
is_align_flow(ea)
bool
is_colored_item(ea)
bool
is_finally_visible_item(ea)
Is instruction visible?
bool
is_fixed_spd(ea)
bool
is_hidden_border(ea)
bool
is_hidden_item(ea)
bool
is_libitem(ea)
bool
is_lzero0(ea)
bool
is_lzero1(ea)
bool
is_noret(ea)
bool
is_notcode(ea)
Is the address marked as not-code?
bool
is_notproc(ea)
bool
is_pascal(strtype)
bool
is_reftype_target_optional(type)
Can the target be calculated using operand value?
bool
is_retfp(ea)
bool
is_terse_struc(ea)
bool
is_tilcmt(ea)
bool
is_usersp(ea)
bool
is_userti(ea)
bool
is_visible_item(ea)
Test visibility of item at given ea.
bool
is_zstroff(ea)
ea_t
node2ea(ndx)
bool
rename_encoding(idx, encoding)
Change name for an encoding (1-based)
uint32
retrieve_input_file_crc32()
Get input file crc32 stored in the database.
str
retrieve_input_file_md5()
Get input file md5.
str
retrieve_input_file_sha256()
Get input file sha256.
uint32
retrieve_input_file_size()
Get size of input file in bytes.
 
set__bnot0(ea)
 
set__bnot1(ea)
 
set__invsign0(ea)
 
set__invsign1(ea)
 
set_abits(ea, bits)
 
set_absbase(ea, x)
 
set_aflags(ea, flags)
 
set_align_flow(ea)
 
set_alignment(ea, x)
bool
set_archive_path(file)
Set archive file path from which input file was extracted.
 
set_array_parameters(ea, _in)
bool
set_asm_inc_file(file)
Set name of the include file.
 
set_colored_item(ea)
 
set_custom_data_type_ids(ea, cdis)
bool
set_default_encoding_idx(bpu, idx)
set default encoding for a string type
 
set_fixed_spd(ea)
 
set_gotea(gotea)
 
set_has_lname(ea)
 
set_has_ti(ea)
 
set_has_ti0(ea)
 
set_has_ti1(ea)
 
set_ids_modnode(id)
Set ids modnode.
 
set_imagebase(base)
Set image base address.
 
set_item_color(ea, color)
 
set_libitem(ea)
 
set_lzero0(ea)
 
set_lzero1(ea)
 
set_noret(ea)
 
set_notcode(ea)
Mark address so that it cannot be converted to instruction.
 
set_notproc(ea)
bool
set_op_tinfo(ea, n, tif)
bool
set_outfile_encoding_idx(idx)
set encoding to be used when producing files
bool
set_refinfo(ea, n, type, target=BADADDR, base=0, tdelta=0)
bool
set_refinfo_ex(ea, n, ri)
 
set_retfp(ea)
 
set_root_filename(file)
Set full path of the input file.
 
set_source_linnum(ea, lnnum)
 
set_str_type(ea, x)
 
set_switch_info(ea, _in)
 
set_switch_parent(ea, x)
 
set_terse_struc(ea)
 
set_tilcmt(ea)
bool
set_tinfo(ea, tif)
 
set_usemodsp(ea)
 
set_usersp(ea)
 
set_userti(ea)
 
set_visible_item(ea, visible)
Change visibility of item at given ea.
 
set_zstroff(ea)
switch_info_t
switch_info_t__from_ptrval__(ptrval)
 
unhide_border(ea)
 
unhide_item(ea)
bool
uses_modsp(ea)
int
validate_idb_names(do_repair)
Variables
  AFL_ALIGNFLOW = 16777216
  AFL_BNOT0 = 256
  AFL_BNOT1 = 512
  AFL_COLORED = 262144
  AFL_FIXEDSPD = 8388608
  AFL_HIDDEN = 16
  AFL_LIB = 1024
  AFL_LINNUM = 1
  AFL_LNAME = 16384
  AFL_LZERO0 = 65536
  AFL_LZERO1 = 131072
  AFL_MANUAL = 32
  AFL_NOBRD = 64
  AFL_NORET = 4194304
  AFL_NOTCODE = 268435456
  AFL_NOTPROC = 536870912
  AFL_PUBNAM = 4
  AFL_RETFP = 67108864
  AFL_SIGN0 = 1048576
  AFL_SIGN1 = 2097152
  AFL_TERSESTR = 524288
  AFL_TI = 2048
  AFL_TI0 = 4096
  AFL_TI1 = 8192
  AFL_TILCMT = 32768
  AFL_USEMODSP = 134217728
  AFL_USERSP = 2
  AFL_USERTI = 33554432
  AFL_WEAKNAM = 8
  AFL_ZSTROFF = 128
  AP_ALLOWDUPS = 1
  AP_ARRAY = 8
  AP_IDXBASEMASK = 240
  AP_IDXBIN = 48
  AP_IDXDEC = 0
  AP_IDXHEX = 16
  AP_IDXOCT = 32
  AP_INDEX = 4
  AP_SIGNED = 2
  BPU_1B = 1
  BPU_2B = 2
  BPU_4B = 4
  MAXSTRUCPATH = 32
  NALT_ABSBASE = 10
  NALT_AFLAGS = 8
  NALT_ALIGN = 17
  NALT_COLOR = 20
  NALT_CREF_FROM = 'x'
  NALT_CREF_TO = 'X'
  NALT_DREF_FROM = 'd'
  NALT_DREF_TO = 'D'
  NALT_ENUM0 = 11
  NALT_ENUM1 = 12
  NALT_GR_LAYX = 'p'
  NALT_LINNUM = 9
  NALT_PURGE = 15
  NALT_STRTYPE = 16
  NALT_STRUCT = 3
  NALT_SWITCH = 1
  NSUP_ARGEAS = 30
  NSUP_ARRAY = 5
  NSUP_CMT = 0
  NSUP_CUSTDT = 28
  NSUP_FOP1 = 2
  NSUP_FOP2 = 3
  NSUP_FOP3 = 7
  NSUP_FOP4 = 18
  NSUP_FOP5 = 19
  NSUP_FOP6 = 20
  NSUP_FOP7 = 31
  NSUP_FOP8 = 32
  NSUP_FTAILS = 28672
  NSUP_GROUP = 32768
  NSUP_GROUPS = 29
  NSUP_GR_INFO = 'g'
  NSUP_GR_LAYT = 'l'
  NSUP_JINFO = 4
  NSUP_LLABEL = 20480
  NSUP_MANUAL = 8192
  NSUP_OMFGRP = 6
  NSUP_OPTYPES = 36864
  NSUP_OREF0 = 12
  NSUP_OREF1 = 13
  NSUP_OREF2 = 14
  NSUP_OREF3 = 24
  NSUP_OREF4 = 25
  NSUP_OREF5 = 26
  NSUP_OREF6 = 35
  NSUP_OREF7 = 36
  NSUP_ORIGFMD = 1085440
  NSUP_POINTS = 4096
  NSUP_REF0 = 9
  NSUP_REF1 = 10
  NSUP_REF2 = 11
  NSUP_REF3 = 21
  NSUP_REF4 = 22
  NSUP_REF5 = 23
  NSUP_REF6 = 33
  NSUP_REF7 = 34
  NSUP_REGARG = 24576
  NSUP_REGVAR = 16384
  NSUP_REPCMT = 1
  NSUP_SEGTRANS = 17
  NSUP_STROFF0 = 15
  NSUP_STROFF1 = 16
  NSUP_SWITCH = 8
  NSUP_TYPEINFO = 12288
  NSUP_XREFPOS = 27
  PATCH_TAG = 'P'
  POF_VALID_AFLAGS = 2
  POF_VALID_TI = 1
  REFINFO_CUSTOM = 64
  REFINFO_NOBASE = 128
  REFINFO_PASTEND = 32
  REFINFO_RVAOFF = 16
  REFINFO_SIGNEDOP = 512
  REFINFO_SUBTRACT = 256
  REFINFO_TYPE = 15
  REF_HIGH16 = 6
  REF_HIGH8 = 5
  REF_LAST = 10
  REF_LOW16 = 4
  REF_LOW8 = 3
  REF_OFF16 = 1
  REF_OFF32 = 2
  REF_OFF64 = 9
  REF_OFF8 = 10
  RIDX_ABINAME = 1350
  RIDX_ARCHIVE_PATH = 1351
  RIDX_C_MACROS = 66
  RIDX_DBG_BINPATHS = 1328
  RIDX_DUALOP_GRAPH = 1300
  RIDX_DUALOP_TEXT = 1301
  RIDX_FILE_FORMAT_NAME = 1
  RIDX_GROUPS = 64
  RIDX_H_PATH = 65
  RIDX_IDA_VERSION = 1303
  RIDX_INCLUDE = 1100
  RIDX_MD5 = 1302
  RIDX_NOTEPAD = 68
  RIDX_PROBLEMS = 1352
  RIDX_SELECTED_EXTLANG = 1327
  RIDX_SELECTORS = 2
  RIDX_SHA256 = 1349
  RIDX_SMALL_IDC = 1200
  RIDX_SMALL_IDC_OLD = 67
  RIDX_SRCDBG_PATHS = 1306
  RIDX_SRCDBG_UNDESIRED = 1353
  RIDX_STR_ENCODINGS = 1305
  STRENC_DEFAULT = 0
  STRENC_NONE = 255
  STRLYT_MASK = 252
  STRLYT_PASCAL1 = 1
  STRLYT_PASCAL2 = 2
  STRLYT_PASCAL4 = 3
  STRLYT_SHIFT = 2
  STRLYT_TERMCHR = 0
  STRTYPE_C = 0
  STRTYPE_C_16 = 1
  STRTYPE_C_32 = 2
  STRTYPE_LEN2 = 8
  STRTYPE_LEN2_16 = 9
  STRTYPE_LEN4 = 12
  STRTYPE_LEN4_16 = 13
  STRTYPE_PASCAL = 4
  STRTYPE_PASCAL_16 = 5
  STRTYPE_TERMCHR = 0
  STRWIDTH_1B = 0
  STRWIDTH_2B = 1
  STRWIDTH_4B = 2
  STRWIDTH_MASK = 3
  SWIG_PYTHON_LEGACY_BOOL = 1
  SWI_CUSTOM = 16384
  SWI_DEFRET = 1048576
  SWI_DEF_IN_TBL = 32
  SWI_ELBASE = 512
  SWI_HXNOLOWCASE = 262144
  SWI_INDIRECT = 65536
  SWI_J32 = 4
  SWI_JMPINSN = 4194304
  SWI_JMP_INV = 64
  SWI_JSIZE = 1024
  SWI_RESERVED = 16
  SWI_SELFREL = 2097152
  SWI_SEPARATE = 4096
  SWI_SHIFT_MASK = 384
  SWI_SIGNED = 8192
  SWI_SPARSE = 1
  SWI_STDTBL = 524288
  SWI_SUBTRACT = 131072
  SWI_V32 = 2
  SWI_VERSION = 8388608
  SWI_VSIZE = 2048
  SWI_VSPLIT = 8
  V695_REF_OFF8 = 0
  V695_REF_VHIGH = 7
  V695_REF_VLOW = 8
  __package__ = None
  cvar = ??
Function Details

add_encoding(encoding)

 

Add a new encoding (e.g. "UTF-8").

Parameters:
  • encoding, (C++ - const char *)
Returns: int
its index (1-based) if it's already in the list, return its index

clr_notcode(ea)

 

Clear not-code mark.

Parameters:
  • ea, (C++ - ea_t)

del_encoding(idx)

 

Delete an encoding (1-based)

Parameters:
  • idx, (C++ - int)
Returns: bool

ea2node(ea)

 

Get netnode for the specified address.

Parameters:
  • ea, (C++ - ea_t)
Returns: nodeidx_t

encoding_from_strtype(strtype)

 

Get encoding name for this strtype.

Parameters:
  • strtype, (C++ - int32)
Returns: char const *

enum_import_names(mod_index, py_cb)

 

Enumerate imports from a specific module. Please refer to ex_imports.py example.

Parameters:
  • mod_index - The module index
  • callback - A callable object that will be invoked with an ea, name (could be None) and ordinal.
Returns: int
1-finished ok, -1 on error, otherwise callback return value (<=0)

find_custom_refinfo(name)

 

Get id of a custom refinfo type.

Parameters:
  • name, (C++ - const char *)
Returns: int

get_custom_refinfo(crid)

 

Get definition of a registered custom refinfo type.

Parameters:
  • crid, (C++ - int)
Returns: custom_refinfo_handler_t const *

get_default_encoding_idx(bpu)

 

Get default encoding index for a specific string type.

Parameters:
  • bpu - the amount of bytes per unit (e.g., 1 for ASCII, CP1252, UTF-8..., 2 for UTF-16, 4 for UTF-32) 0 means no specific encoding is set - byte values are displayed without conversion. (C++: int)
Returns: int

get_encoding_bpu(idx)

 

Get the amount of bytes per unit (e.g., 2 for UTF-16, 4 for UTF-32) for the encoding with the given index.

Parameters:
  • idx - the encoding index (C++: int)
Returns: int
the number of bytes per units (1/2/4); -1 means error

get_encoding_name(idx)

 

Get encoding name for specific index (1-based).

Parameters:
  • idx, (C++ - int)
Returns: char const *
NULL if idx is out of bounds

get_import_module_name(mod_index)

 

Returns the name of an imported module given its index

Returns: PyObject *
None or the module name

get_reftype_by_size(size)

 

Get REF_... constant from size Supported sizes: 1,2,4,8,16 For other sizes returns reftype_t(-1)

Parameters:
  • size, (C++ - size_t)
Returns: reftype_t

get_str_encoding_idx(strtype)

 

Get index of the string encoding for this string.

Parameters:
  • strtype, (C++ - int32)
Returns: uchar

is_finally_visible_item(ea)

 

Is instruction visible?

Parameters:
  • ea, (C++ - ea_t)
Returns: bool

is_notcode(ea)

 

Is the address marked as not-code?

Parameters:
  • ea, (C++ - ea_t)
Returns: bool

is_reftype_target_optional(type)

 

Can the target be calculated using operand value?

Parameters:
  • type, (C++ - reftype_t)
Returns: bool

is_visible_item(ea)

 

Test visibility of item at given ea.

Parameters:
  • ea, (C++ - ea_t)
Returns: bool

rename_encoding(idx, encoding)

 

Change name for an encoding (1-based)

Parameters:
  • idx, (C++ - int)
  • encoding, (C++ - const char *)
Returns: bool

retrieve_input_file_crc32()

 

Get input file crc32 stored in the database. it can be used to check that the input file has not been changed.

Returns: uint32

set_archive_path(file)

 

Set archive file path from which input file was extracted.

Parameters:
  • file, (C++ - const char *)
Returns: bool

set_asm_inc_file(file)

 

Set name of the include file.

Parameters:
  • file, (C++ - const char *)
Returns: bool

set_default_encoding_idx(bpu, idx)

 

set default encoding for a string type

Parameters:
  • bpu - the amount of bytes per unit (C++: int)
  • idx - the encoding index idx can be 0 to disable encoding conversion (C++: int)
Returns: bool

set_ids_modnode(id)

 

Set ids modnode.

Parameters:
  • id, (C++ - netnode)

set_imagebase(base)

 

Set image base address.

Parameters:
  • base, (C++ - ea_t)

set_notcode(ea)

 

Mark address so that it cannot be converted to instruction.

Parameters:
  • ea, (C++ - ea_t)

set_outfile_encoding_idx(idx)

 

set encoding to be used when producing files

Parameters:
  • idx - the encoding index idx can be 0 to use the IDB's default 1 -byte-per-unit encoding (C++: int)
Returns: bool

set_root_filename(file)

 

Set full path of the input file.

Parameters:
  • file, (C++ - const char *)

set_visible_item(ea, visible)

 

Change visibility of item at given ea.

Parameters:
  • ea, (C++ - ea_t)
  • visible, (C++ - bool)