Package winappdbg :: Module disasm :: Class Engine
[hide private]
[frames] | no frames]

Class Engine

source code


Base class for disassembly engine adaptors.

Instance Methods [hide private]
 
__init__(self, arch=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
str
_validate_arch(self, arch=None)
Returns: Name of the processor architecture.
source code
 
_import_dependencies(self)
Loads the dependencies for this disassembler.
source code
list of tuple( long, int, str, str )
decode(self, address, code)
Returns: List of tuples.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
str name = '<insert engine name here>'
Engine name to use with the Disassembler class.
str desc = '<insert engine description here>'
User friendly name of the disassembler engine.
str url = '<insert download url here>'
Download URL.
set(str) supported = set([])
Set of supported processor architectures.
Instance Variables [hide private]
str arch
Name of the processor architecture.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, arch=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • arch (str) - Name of the processor architecture. If not provided the current processor architecture is assumed. For more details see win32.version._get_arch.
Raises:
  • NotImplementedError - This disassembler doesn't support the requested processor architecture.
Overrides: object.__init__

_validate_arch(self, arch=None)

source code 
Parameters:
  • arch (str) - Name of the processor architecture. If not provided the current processor architecture is assumed. For more details see win32.version._get_arch.
Returns: str
Name of the processor architecture. If not provided the current processor architecture is assumed. For more details see win32.version._get_arch.
Raises:
  • NotImplementedError - This disassembler doesn't support the requested processor architecture.

_import_dependencies(self)

source code 

Loads the dependencies for this disassembler.

Raises:
  • ImportError - This disassembler cannot find or load the necessary dependencies to make it work.

decode(self, address, code)

source code 
Parameters:
  • address (int) - Memory address where the code was read from.
  • code (str) - Machine code to disassemble.
Returns: list of tuple( long, int, str, str )
List of tuples. Each tuple represents an assembly instruction and contains:
  • Memory address of instruction.
  • Size of instruction in bytes.
  • Disassembly line of instruction.
  • Hexadecimal dump of instruction.
Raises:
  • NotImplementedError - This disassembler could not be loaded. This may be due to missing dependencies.

Class Variable Details [hide private]

supported

Set of supported processor architectures. For more details see win32.version._get_arch.
Type:
set(str)
Value:
set([])