class documentation

class Location:

View In Hierarchy

Useful OSSI information related to an address, such as the nearest symbol or the base address.

Warnings

Must not be directly constructed but retrieved through the following examples.

Examples

>>> # From a Transition
>>> transition.context_before().ossi.location(addr)  # from the context before the transition
>>> transition.context_after().ossi.location(addr)   # from the context after the transition
>>> # From a Context
>>> context.ossi.location()      # from the current value in the pc register
>>> context.ossi.location(addr)  # from an address
Method __init__ Undocumented
Method __repr__ Undocumented
Method __str__ Undocumented
Property address Property: The address in memory.
Property base_address Property: The address where the binary is loaded in memory (aka base address).
Property binary Property: The related binary.
Property rva Property: The relative virtual address (rva) inside the binary.
Property symbol Property: The nearest symbol, if exists.
Property symbol_offset Property: The offset from the begining of the nearest symbol.
Instance Variable _datasource Undocumented
Instance Variable _symbol_context Undocumented
def __init__(self, _datasource, _symbol_context):

Undocumented

Parameters
_datasource:DataSourceUndocumented
_symbol_context:_reven_api.SymbolContextUndocumented
def __repr__(self):

Undocumented

Returns
strUndocumented
def __str__(self):

Undocumented

Returns
strUndocumented
@property
address: int =

Property: The address in memory.

Examples

>>> hex(location.address)
'0xfffff800c99455b0'

Information

Returns
An integer.
@property
base_address: int =

Property: The address where the binary is loaded in memory (aka base address).

Examples

>>> hex(location.base_address)
'0xfffff800c9801000'

Information

Returns
An integer.
@property
binary: Binary =

Property: The related binary.

Examples

>>> print(location.binary)
'c:/windows/system32/ntoskrnl.exe'

Information

Returns
A Binary.
@property
rva: int =

Property: The relative virtual address (rva) inside the binary.

The rva is the offset from the base address of the binary loaded in memory.

Examples

>>> hex(symbol.rva)
'0x1445b0'

Information

Returns
An integer.
@property
symbol: _Optional[Symbol] =

Property: The nearest symbol, if exists.

If the location is not linked to a symbol, None is returned.

Examples

>>> location.symbol.name
'KiIsrLinkage'
>>> hex(location.symbol.rva)
'0x1445a0'
>>> print(location.symbol)
'ntoskrnl!KiIsrLinkage'

Information

Returns
A Symbol or None
@property
symbol_offset: int =

Property: The offset from the begining of the nearest symbol.

Examples

>>> hex(symbol.offset)
'0x10'

Information

Returns
An integer.
Raises
RuntimeErrorif the location is not linked to a symbol.
_datasource =

Undocumented

_symbol_context =

Undocumented