IDB representation

Some useful information are link to the IDB loaded by IDA, those information are accessible through static methods of the BipIdb class. Those information include things such as the base address of the image, the minium and maximum address mapped in the IDB and so on. A few helper functions are also defined directly at the top level of bipidb.py for making it more easy to script.

BipIdb API

class bip.base.BipIdb

Class for representing the idb loaded by IDA, this has the goal to provide access to things specific to the IDB.

Currently this contain only static methods.

static ptr_size()

Return the number of bits in a pointer.

Return type:int
static min_ea()

Return the lowest mapped address of the IDB.

static max_ea()

Return the highest mapped address of the IDB.

static image_base()

Return the base address of the image loaded in the IDB.

This is different from min_ea() which is the lowest mapped address.

static current_addr()

Return current screen address.

Returns:The current address selected.
static relea(addr)

Calculate the relative address compare to the IDA image base. The calcul done is ADDR - IMGBASE.

The opposite of this function is absea().

Parameters:addr (int) – The absolute address to translate.
Returns:The offset from image base corresponding to addr.
Return type:int
static absea(offset)

Calculate the absolute address from an offset of the image base. The calcul done is OFFSET + IMGBASE .

The opposite of this function is relea().

Parameters:offset (int) – The offset from the beginning of the image base to translate.
Returns:The absolute address corresponding to the offset.
Return type:int
__weakref__

list of weak references to the object (if defined)

Helper functions

bip.base.min_ea()

Return the lowest mapped address of the IDB. Wrapper on BipIdb.min_ea().

bip.base.max_ea()

Return the highest mapped address of the IDB. Wrapper on BipIdb.max_ea().

bip.base.Here()

Return current screen address.

Returns:The current address.