sharedcache.sharedcache module

Class

Description

binaryninja.sharedcache.sharedcache.CacheImage

binaryninja.sharedcache.sharedcache.CacheRegion

binaryninja.sharedcache.sharedcache.CacheSymbol

binaryninja.sharedcache.sharedcache.SharedCacheController

Function

Description

binaryninja.sharedcache.sharedcache.image_from_api

binaryninja.sharedcache.sharedcache.image_to_api

binaryninja.sharedcache.sharedcache.region_from_api

binaryninja.sharedcache.sharedcache.region_to_api

binaryninja.sharedcache.sharedcache.symbol_from_api

binaryninja.sharedcache.sharedcache.symbol_to_api

CacheImage

class CacheImage[source]

Bases: object

CacheImage(name: str, header_address: int, region_starts: [<class ‘int’>])

__init__(name: str, header_address: int, region_starts: [<class 'int'>]) None
Parameters:
  • name (str) –

  • header_address (int) –

  • region_starts ([<class 'int'>]) –

Return type:

None

header_address: int
name: str
region_starts: [<class 'int'>]

CacheRegion

class CacheRegion[source]

Bases: object

CacheRegion(region_type: binaryninja.sharedcache.sharedcache_enums.SharedCacheRegionType, name: str, start: int, size: int, image_start: int, flags: ctypes.c_int)

__init__(region_type: SharedCacheRegionType, name: str, start: int, size: int, image_start: int, flags: c_int) None
Parameters:
  • region_type (SharedCacheRegionType) –

  • name (str) –

  • start (int) –

  • size (int) –

  • image_start (int) –

  • flags (c_int) –

Return type:

None

flags: c_int
image_start: int
name: str
region_type: SharedCacheRegionType
size: int
start: int

CacheSymbol

class CacheSymbol[source]

Bases: object

CacheSymbol(symbol_type: ctypes.c_int, address: int, name: str)

__init__(symbol_type: c_int, address: int, name: str) None
Parameters:
  • symbol_type (c_int) –

  • address (int) –

  • name (str) –

Return type:

None

address: int
name: str
symbol_type: c_int

SharedCacheController

class SharedCacheController[source]

Bases: object

__init__(view: BinaryView)[source]

Retrieve the shared cache controller for a given view. Call is_valid to check if the controller is valid.

Parameters:

view (BinaryView) –

apply_image(view: BinaryView, image: CacheImage) bool[source]
Parameters:
Return type:

bool

apply_region(view: BinaryView, region: CacheRegion) bool[source]
Parameters:
Return type:

bool

get_image_at(address: int) CacheImage | None[source]
Parameters:

address (int) –

Return type:

CacheImage | None

get_image_containing(address: int) CacheImage | None[source]
Parameters:

address (int) –

Return type:

CacheImage | None

get_image_dependencies(image: CacheImage) [<class 'str'>][source]

Returns a list of image names that this image depends on.

Parameters:

image (CacheImage) –

Return type:

[<class ‘str’>]

get_image_with_name(name: str) CacheImage | None[source]
Parameters:

name (str) –

Return type:

CacheImage | None

get_region_at(address: int) CacheRegion | None[source]
Parameters:

address (int) –

Return type:

CacheRegion | None

get_region_containing(address: int) CacheRegion | None[source]
Parameters:

address (int) –

Return type:

CacheRegion | None

get_symbol_at(address: int) CacheSymbol | None[source]
Parameters:

address (int) –

Return type:

CacheSymbol | None

get_symbol_with_name(name: str) CacheSymbol | None[source]
Parameters:

name (str) –

Return type:

CacheSymbol | None

is_image_loaded(image: CacheImage) bool[source]
Parameters:

image (CacheImage) –

Return type:

bool

is_region_loaded(region: CacheRegion) bool[source]
Parameters:

region (CacheRegion) –

Return type:

bool

is_valid() bool[source]
Return type:

bool

property images: [<class 'binaryninja.sharedcache.sharedcache.CacheImage'>]
property loaded_images: [<class 'binaryninja.sharedcache.sharedcache.CacheImage'>]

Get a list of images that are currently loaded in the view.

property loaded_regions: [<class 'binaryninja.sharedcache.sharedcache.CacheRegion'>]

Get a list of regions that are currently loaded in the view.

property regions: [<class 'binaryninja.sharedcache.sharedcache.CacheRegion'>]
property symbols: [<class 'binaryninja.sharedcache.sharedcache.CacheSymbol'>]

image_from_api

image_from_api(image: BNSharedCacheImage) CacheImage[source]
Parameters:

image (BNSharedCacheImage) –

Return type:

CacheImage

image_to_api

image_to_api(image: CacheImage) BNSharedCacheImage[source]
Parameters:

image (CacheImage) –

Return type:

BNSharedCacheImage

region_from_api

region_from_api(region: BNSharedCacheRegion) CacheRegion[source]
Parameters:

region (BNSharedCacheRegion) –

Return type:

CacheRegion

region_to_api

region_to_api(region: CacheRegion) BNSharedCacheRegion[source]
Parameters:

region (CacheRegion) –

Return type:

BNSharedCacheRegion

symbol_from_api

symbol_from_api(symbol: BNSharedCacheSymbol) CacheSymbol[source]
Parameters:

symbol (BNSharedCacheSymbol) –

Return type:

CacheSymbol

symbol_to_api

symbol_to_api(symbol: CacheSymbol) BNSharedCacheSymbol[source]
Parameters:

symbol (CacheSymbol) –

Return type:

BNSharedCacheSymbol