angr.angrdb

class angr.angrdb.AngrDB

Bases: object

AngrDB provides a storage solution for an angr project, its knowledge bases, and some other types of data. It is designed to use an SQL-based database as the storage backend.

ALL_TABLES = ['objects']
VERSION = 3
COMPATIBLE_VERSIONS = (1, 2, 3)
__init__(project=None, nullpool=False)
open_db(db_str='sqlite:///:memory:')
static session_scope(Session)
static save_info(session, key, value)

Save an information entry to the database.

Parameters:
  • session

  • key

  • value

Returns:

static loaded_type_collection_names()

Primary names of all loaded type collections.

Return type:

list[str]

static load_type_collections(names)

Make sure the type collections names are loaded; warn about the ones that cannot be found.

Return type:

None

Parameters:

names (list[str])

static get_info(session, key)

Get an information entry from the database.

Parameters:
  • session

  • key

Returns:

update_dbinfo(session, extra_info=None)

Update the information in database.

Parameters:
Returns:

get_dbinfo(session, extra_info=None)

Get database information.

Parameters:
Returns:

A dict of information entries.

db_compatible(version)

Checks if the given database version is compatible with the current AngrDB class.

Parameters:

version (int) – The version of the database.

Returns:

True if compatible, False otherwise.

Return type:

bool

invalidate()
dump(db_path, kbs=None, extra_info=None)
Parameters:
load(db_path, kb_names=None, other_kbs=None, extra_info=None)
Parameters:

Submodules

db

models

serializers

v1

angrDb Version 1 compatibility logic.

v2