Module pychrysalide.format
Documentation
Python module for Chrysalide.format
Sub modules
- pychrysalide.format.axml
- pychrysalide.format.bootimg
- pychrysalide.format.dex
- pychrysalide.format.elf
Classes
Class BinFormat
PyChrysalide binary format
Hierarchy
builtins.object ╰── gi._gobject.GObject ╰── pychrysalide.format.BinFormat
Methods
add_error(self, type, addr, desc)
Extend the list of detected disassembling errors.
add_symbol(self, symbol)
Register a new symbol for the format.
find_next_symbol_at(self, addr)
Find the symbol next to the one found at a given address.
find_symbol_at(self, addr)
Find a symbol at a given address.
find_symbol_by_label(self, label)
Find a symbol by its label.
register_code_point(self, pt, entry)
Register a virtual address as entry point or basic point.
remove_symbol(self, symbol)
Unregister a symbol from the format.
resolve_symbol(self, addr, strict)
Search a position inside a routine by a given address.
Attributes
content
Content of the binary format.
description
Human description of the binary format.
errors
List of all detected errors which occurred while loading the binary.
name
Internal name of the binary format.
symbols
Iterable list of all symbols found in the binary format.
Constants
BFE_SPECIFICATION = BFE_SPECIFICATION
BFE_STRUCTURE = BFE_STRUCTURE
Class BinSymbol
PyChrysalide binary symbol
Hierarchy
builtins.object ╰── gi._gobject.GObject ╰── pychrysalide.format.BinSymbol
Interfaces: pychrysalide.glibext.LineGenerator
Methods
__eq__(self, value)
Return self==value.
__ge__(self, value)
Return self>=value.
__gt__(self, value)
Return self>value.
__le__(self, value)
Return self<=value.
__lt__(self, value)
Return self
__ne__(self, value)
Return self!=value.
set_alt_label(self, alt)
Set an alternative label for the symbol.
Attributes
label
Label of the symbol, provided by the internal component or by an alternative label.
range
Range covered by the symbol.
status
Status of the symbol's visibility.
target_type
Type of the current symbol.
Data
__hash__ = None
Constants
SSS_INTERNAL = SSS_INTERNAL
SSS_EXPORTED = SSS_EXPORTED
SSS_IMPORTED = SSS_IMPORTED
SSS_DYNAMIC = SSS_DYNAMIC
STP_DATA = STP_DATA
STP_ROUTINE = STP_ROUTINE
STP_CODE_LABEL = STP_CODE_LABEL
STP_OBJECT = STP_OBJECT
STP_ENTRY_POINT = STP_ENTRY_POINT
STP_RO_STRING = STP_RO_STRING
STP_DYN_STRING = STP_DYN_STRING
STP_COUNT = STP_COUNT
Class DbCollection
PyChrysalide collection for DataBase collection
Hierarchy
builtins.object ╰── gi._gobject.GObject ╰── pychrysalide.analysis.db.DbCollection
Class DbItem
PyChrysalide item for DataBase collection
Hierarchy
builtins.object ╰── gi._gobject.GObject ╰── pychrysalide.analysis.db.DbItem
Attributes
volatile
Define if a Database item can be forgotten.
Class ExeFormat
PyChrysalide executable format
Hierarchy
builtins.object ╰── gi._gobject.GObject ╰── pychrysalide.format.BinFormat ╰── pychrysalide.format.ExeFormat
Methods
register_user_portion(self, portion)
Remember a given user-defined binary portion as part of the executable format content.
translate_address_into_vmpa(self, addr)
Translate a physical offset to a full location.
translate_offset_into_vmpa(self, off)
Translate a physical offset to a full location.
Class FlatFormat
PyChrysalide flat format
Hierarchy
builtins.object ╰── gi._gobject.GObject ╰── pychrysalide.format.BinFormat ╰── pychrysalide.format.ExeFormat ╰── pychrysalide.format.FlatFormat
Methods
set_machine(self, machine)
Set the architecture linked to the flat format.
Class StrSymbol
PyChrysalide string symbol
Hierarchy
builtins.object ╰── gi._gobject.GObject ╰── pychrysalide.format.BinSymbol ╰── pychrysalide.format.StrSymbol
Interfaces: pychrysalide.arch.ProxyFeeder, pychrysalide.glibext.LineGenerator
Methods
__eq__(self, value)
Return self==value.
__ge__(self, value)
Return self>=value.
__gt__(self, value)
Return self>value.
__le__(self, value)
Return self<=value.
__lt__(self, value)
Return self
__ne__(self, value)
Return self!=value.
Attributes
encoding
Encoding of the string.
raw
String content as raw data.
utf8
String content as UTF-8 data.
Data
__hash__ = None
Constants
SET_ASCII = SET_ASCII
SET_UTF_8 = SET_UTF_8
SET_MUTF_8 = SET_MUTF_8
SET_GUESS = SET_GUESS
Class SymIterator
Iterator for Chrysalide symbols registered in a given format.
Hierarchy
builtins.object ╰── pychrysalide.format.SymIterator
Methods
__iter__(self)
Implement iter(self).
__next__(self)
Implement next(self).