Module ida_pro
[frames] | no frames]

Module ida_pro

IDA Plugin SDK API wrapper: pro

Classes
  boolvec_t
Proxy of C++ qvector< bool > class.
  channel_redir_t
Proxy of C++ channel_redir_t class.
  ea_array
Proxy of C++ ea_array class.
  ea_pointer
Proxy of C++ ea_pointer class.
  eavec_t
Proxy of C++ qvector< unsigned int > class.
  instant_dbgopts_t
Proxy of C++ instant_dbgopts_t class.
  int64vec_t
Proxy of C++ qvector< long long > class.
  int_pointer
Proxy of C++ int_pointer class.
  intvec_t
Proxy of C++ qvector< int > class.
  longlongvec_t
Proxy of C++ qvector< long long > class.
  qmutex_locker_t
Proxy of C++ qmutex_locker_t class.
  qrefcnt_obj_t
Proxy of C++ qrefcnt_obj_t class.
  sel_array
Proxy of C++ sel_array class.
  sel_pointer
Proxy of C++ sel_pointer class.
  sizevec_t
Proxy of C++ qvector< size_t > class.
  strvec_t
Proxy of C++ qvector< simpleline_t > class.
  sval_pointer
Proxy of C++ sval_pointer class.
  svalvec_t
Proxy of C++ qvector< int > class.
  tid_array
Proxy of C++ tid_array class.
  uchar_array
Proxy of C++ uchar_array class.
  uint64vec_t
Proxy of C++ qvector< unsigned long long > class.
  uintvec_t
Proxy of C++ qvector< unsigned int > class.
  ulonglongvec_t
Proxy of C++ qvector< unsigned long long > class.
  uval_array
Proxy of C++ uval_array class.
  uvalvec_t
Proxy of C++ qvector< unsigned int > class.
Functions
int
check_process_exit(handle, exit_code, msecs=-1)
Check whether process has terminated or not.
 
clear_bits(bitmap, low, high)
Clear bits between [low, high) in 'bitmap'.
ea_array
ea_array_frompointer(t)
ea_pointer
ea_pointer_frompointer(t)
uint64
extend_sign(v, nbytes, sign_extend)
Sign-, or zero-extend the value 'v' to occupy 64 bits.
int_pointer
int_pointer_frompointer(t)
enum tty_control_t
is_control_tty(fd)
Check if the current process is the owner of the TTY specified by 'fd' (typically an opened descriptor to /dev/tty).
bool
is_main_thread()
Are we running in the main thread?
int
log2ceil(d64)
calculate ceil(log2(d64)) or floor(log2(d64)), it returns 0 if d64 == 0
int
log2floor(d64)
bool
parse_dbgopts(ido, r_switch)
Parse the -r command line switch (for instant debugging).
int64
qatoll(nptr)
 
qcontrol_tty()
Make the current terminal the controlling terminal of the calling process.The current terminal is supposed to be /dev/tty
 
qdetach_tty()
If the current terminal is the controlling terminal of the calling process, give up this controlling terminal.The current terminal is supposed to be /dev/tty
 
qexit(code)
Call qatexit functions, shut down UI and kernel, and exit.
bool
qstrvec_t_add(_self, s)
PyObject *
qstrvec_t_addressof(_self, idx)
bool
qstrvec_t_assign(_self, other)
bool
qstrvec_t_clear(_self, qclear)
PyObject *
qstrvec_t_create()
bool
qstrvec_t_destroy(py_obj)
bool
qstrvec_t_from_list(_self, py_list)
PyObject *
qstrvec_t_get(_self, idx)
qstrvec_t *
qstrvec_t_get_clink(_self)
PyObject *
qstrvec_t_get_clink_ptr(_self)
bool
qstrvec_t_insert(_self, idx, s)
bool
qstrvec_t_remove(_self, idx)
bool
qstrvec_t_set(_self, idx, s)
size_t
qstrvec_t_size(_self)
bool
quote_cmdline_arg(arg)
Quote a command line argument if it contains escape characters.
void *
qvector_reserve(vec, old, cnt, elsize)
Change capacity of given qvector.
int
readbytes(h, res, size, mf)
Read at most 4 bytes from file.
 
reloc_value(value, size, delta, mf)
bool
relocate_relobj(_relobj, ea, mf)
sel_array
sel_array_frompointer(t)
sel_pointer
sel_pointer_frompointer(t)
 
set_bits(bitmap, low, high)
Set bits between [low, high) in 'bitmap'.
PyObject *
str2user(str)
Insert C-style escape characters to string
sval_pointer
sval_pointer_frompointer(t)
tid_array
tid_array_frompointer(t)
uchar_array
uchar_array_frompointer(t)
uval_array
uval_array_frompointer(t)
int
writebytes(h, l, size, mf)
Write at most 4 bytes to file.
Variables
  BADMEMSIZE = 9223372036854775807
  CEF_RETERR = 1
  CP_BOM = 65279
  CP_ELLIPSIS = 8230
  CP_REPLCHAR = 65533
  CP_UTF16 = 1200
  CP_UTF8 = 65001
  ENC_MUTF8 = 'MUTF-8'
  ENC_UTF16 = 'UTF-16'
  ENC_UTF16BE = 'UTF-16BE'
  ENC_UTF16LE = 'UTF-16LE'
  ENC_UTF32 = 'UTF-32'
  ENC_UTF32BE = 'UTF-32BE'
  ENC_UTF32LE = 'UTF-32LE'
  ENC_UTF8 = 'UTF-8'
  ENC_WIN1252 = 'windows-1252'
  FMT_64 = 'll'
  FMT_EA = ''
  FMT_Z = 'zu'
  FMT_ZS = 'zd'
  IDA_SDK_VERSION = 740
  IDBDEC_ESCAPE = 1
  IOREDIR_APPEND = 4
  IOREDIR_INPUT = 1
  IOREDIR_OUTPUT = 2
  IOREDIR_QUOTED = 8
  MAXSTR = 1024
  MAX_UTF8_SEQ_LEN = 8
  QWCONTINUED = 8
  QWNOHANG = 1
  SUBSTCHAR = '_'
  SWIG_PYTHON_LEGACY_BOOL = 1
  TCT_NOT_OWNER = 2
  TCT_OWNER = 1
  TCT_UNKNOWN = 0
  UTF16BE_BOM = '\xfe\xff'
  UTF16LE_BOM = '\xff\xfe'
  UTF32BE_BOM = ''
  UTF32LE_BOM = '\xff\xfe'
  UTF8_BOM = '\xef\xbb\xbf'
  UTF8_ELLIPSIS = '\xe2\x80\xa6'
  UTF8_REPLCHAR = '\xef\xbf\xbd'
  __MF__ = 0
  __package__ = None
Function Details

check_process_exit(handle, exit_code, msecs=-1)

 

Check whether process has terminated or not.

Parameters:
  • handle - process handle to wait for (C++: void *)
  • exit_code - pointer to the buffer for the exit code (C++: int *)
Returns: int

clear_bits(bitmap, low, high)

 

Clear bits between [low, high) in 'bitmap'.

Parameters:
  • bitmap, (C++ - uchar *)
  • low, (C++ - size_t)
  • high, (C++ - size_t)

extend_sign(v, nbytes, sign_extend)

 

Sign-, or zero-extend the value 'v' to occupy 64 bits. The value 'v' is considered to be of size 'nbytes'.

Parameters:
  • v, (C++ - uint64)
  • nbytes, (C++ - int)
  • sign_extend, (C++ - bool)
Returns: uint64

is_control_tty(fd)

 

Check if the current process is the owner of the TTY specified by 'fd' (typically an opened descriptor to /dev/tty).

Parameters:
  • fd, (C++ - int)
Returns: enum tty_control_t

log2ceil(d64)

 

calculate ceil(log2(d64)) or floor(log2(d64)), it returns 0 if d64 == 0

Parameters:
  • d64, (C++ - uint64)
Returns: int

parse_dbgopts(ido, r_switch)

 

Parse the -r command line switch (for instant debugging). r_switch points to the value of the -r switch. Example: [email protected]+

Parameters:
  • ido, (C++ - struct instant_dbgopts_t *)
  • r_switch, (C++ - const char *)
Returns: bool
true-ok, false-parse error

qexit(code)

 

Call qatexit functions, shut down UI and kernel, and exit.

Parameters:
  • code - exit code (C++: int)

quote_cmdline_arg(arg)

 

Quote a command line argument if it contains escape characters. For example, *.c will be converted into "*.c" because * may be inadvertently expanded by the shell

Parameters:
  • arg, (C++ - qstring *)
Returns: bool
true: modified 'arg'

qvector_reserve(vec, old, cnt, elsize)

 

Change capacity of given qvector.

Parameters:
  • vec - a pointer to a qvector (C++: void *)
  • old - a pointer to the qvector's array (C++: void *)
  • cnt - number of elements to reserve (C++: size_t)
  • elsize - size of each element (C++: size_t)
Returns: void *
a pointer to the newly allocated array

readbytes(h, res, size, mf)

 

Read at most 4 bytes from file.

Parameters:
  • h - file handle (C++: int)
  • res - value read from file (C++: uint32 *)
  • size - size of value in bytes (1,2,4) (C++: int)
  • mf - is MSB first? (C++: bool)
Returns: int
0 on success, nonzero otherwise

set_bits(bitmap, low, high)

 

Set bits between [low, high) in 'bitmap'.

Parameters:
  • bitmap, (C++ - uchar *)
  • low, (C++ - size_t)
  • high, (C++ - size_t)

str2user(str)

 

Insert C-style escape characters to string

Returns: PyObject *
new string with escape characters inserted

writebytes(h, l, size, mf)

 

Write at most 4 bytes to file.

Parameters:
  • h - file handle (C++: int)
  • l - value to write (C++: uint32)
  • size - size of value in bytes (1,2,4) (C++: int)
  • mf - is MSB first? (C++: bool)
Returns: int
0 on success, nonzero otherwise