Package winappdbg :: Module textio :: Class HexDump
[hide private]
[frames] | no frames]

Class HexDump

source code


Static functions for hexadecimal dumps.

Instance Methods [hide private]

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

Class Methods [hide private]
str
integer(cls, integer)
Returns: Text output.
source code
str
address(cls, address)
Returns: Text output.
source code
str
hexline(cls, data, separator=' ', width=None)
Dump a line of hexadecimal numbers from binary data.
source code
str
hexblock(cls, data, address=None, separator=' ', width=8)
Dump a block of hexadecimal numbers from binary data.
source code
str
hexblock_cb(cls, callback, data, address=None, width=16, cb_args=(), cb_kwargs={})
Dump a block of binary data using a callback function to convert each line of text.
source code
str
hexblock_byte(cls, data, address=None, separator=' ', width=16)
Dump a block of hexadecimal BYTEs from binary data.
source code
str
hexblock_word(cls, data, address=None, separator=' ', width=8)
Dump a block of hexadecimal WORDs from binary data.
source code
str
hexblock_dword(cls, data, address=None, separator=' ', width=4)
Dump a block of hexadecimal DWORDs from binary data.
source code
str
hexblock_qword(cls, data, address=None, separator=' ', width=2)
Dump a block of hexadecimal QWORDs from binary data.
source code
Static Methods [hide private]
str
printable(data)
Replace unprintable characters with dots.
source code
str
hexadecimal(data, separator='')
Convert binary data to a string of hexadecimal numbers.
source code
str
hexa_word(data, separator=' ')
Convert binary data to a string of hexadecimal WORDs.
source code
str
hexa_dword(data, separator=' ')
Convert binary data to a string of hexadecimal DWORDs.
source code
str
hexa_qword(data, separator=' ')
Convert binary data to a string of hexadecimal QWORDs.
source code
Class Variables [hide private]
int integer_size = 8
Size in characters of an outputted integer.
int address_size = 8
Size in characters of an outputted address.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

integer(cls, integer)
Class Method

source code 
Parameters:
  • integer (int) - Integer.
Returns: str
Text output.

address(cls, address)
Class Method

source code 
Parameters:
  • address (int) - Memory address.
Returns: str
Text output.

printable(data)
Static Method

source code 

Replace unprintable characters with dots.

Parameters:
  • data (str) - Binary data.
Returns: str
Printable text.

hexadecimal(data, separator='')
Static Method

source code 

Convert binary data to a string of hexadecimal numbers.

Parameters:
  • data (str) - Binary data.
  • separator (str) - Separator between the hexadecimal representation of each character.
Returns: str
Hexadecimal representation.

hexa_word(data, separator=' ')
Static Method

source code 

Convert binary data to a string of hexadecimal WORDs.

Parameters:
  • data (str) - Binary data.
  • separator (str) - Separator between the hexadecimal representation of each WORD.
Returns: str
Hexadecimal representation.

hexa_dword(data, separator=' ')
Static Method

source code 

Convert binary data to a string of hexadecimal DWORDs.

Parameters:
  • data (str) - Binary data.
  • separator (str) - Separator between the hexadecimal representation of each DWORD.
Returns: str
Hexadecimal representation.

hexa_qword(data, separator=' ')
Static Method

source code 

Convert binary data to a string of hexadecimal QWORDs.

Parameters:
  • data (str) - Binary data.
  • separator (str) - Separator between the hexadecimal representation of each QWORD.
Returns: str
Hexadecimal representation.

hexline(cls, data, separator=' ', width=None)
Class Method

source code 

Dump a line of hexadecimal numbers from binary data.

Parameters:
  • data (str) - Binary data.
  • separator (str) - Separator between the hexadecimal representation of each character.
  • width (int) - (Optional) Maximum number of characters to convert per text line. This value is also used for padding.
Returns: str
Multiline output text.

hexblock(cls, data, address=None, separator=' ', width=8)
Class Method

source code 

Dump a block of hexadecimal numbers from binary data. Also show a printable text version of the data.

Parameters:
  • data (str) - Binary data.
  • address (str) - Memory address where the data was read from.
  • separator (str) - Separator between the hexadecimal representation of each character.
  • width (int) - (Optional) Maximum number of characters to convert per text line.
Returns: str
Multiline output text.

hexblock_cb(cls, callback, data, address=None, width=16, cb_args=(), cb_kwargs={})
Class Method

source code 

Dump a block of binary data using a callback function to convert each line of text.

Parameters:
  • callback (function) - Callback function to convert each line of data.
  • data (str) - Binary data.
  • address (str) - (Optional) Memory address where the data was read from.
  • cb_args (str) - (Optional) Arguments to pass to the callback function.
  • cb_kwargs (str) - (Optional) Keyword arguments to pass to the callback function.
  • width (int) - (Optional) Maximum number of bytes to convert per text line.
Returns: str
Multiline output text.

hexblock_byte(cls, data, address=None, separator=' ', width=16)
Class Method

source code 

Dump a block of hexadecimal BYTEs from binary data.

Parameters:
  • data (str) - Binary data.
  • address (str) - Memory address where the data was read from.
  • separator (str) - Separator between the hexadecimal representation of each BYTE.
  • width (int) - (Optional) Maximum number of BYTEs to convert per text line.
Returns: str
Multiline output text.

hexblock_word(cls, data, address=None, separator=' ', width=8)
Class Method

source code 

Dump a block of hexadecimal WORDs from binary data.

Parameters:
  • data (str) - Binary data.
  • address (str) - Memory address where the data was read from.
  • separator (str) - Separator between the hexadecimal representation of each WORD.
  • width (int) - (Optional) Maximum number of WORDs to convert per text line.
Returns: str
Multiline output text.

hexblock_dword(cls, data, address=None, separator=' ', width=4)
Class Method

source code 

Dump a block of hexadecimal DWORDs from binary data.

Parameters:
  • data (str) - Binary data.
  • address (str) - Memory address where the data was read from.
  • separator (str) - Separator between the hexadecimal representation of each DWORD.
  • width (int) - (Optional) Maximum number of DWORDs to convert per text line.
Returns: str
Multiline output text.

hexblock_qword(cls, data, address=None, separator=' ', width=2)
Class Method

source code 

Dump a block of hexadecimal QWORDs from binary data.

Parameters:
  • data (str) - Binary data.
  • address (str) - Memory address where the data was read from.
  • separator (str) - Separator between the hexadecimal representation of each QWORD.
  • width (int) - (Optional) Maximum number of QWORDs to convert per text line.
Returns: str
Multiline output text.

Class Variable Details [hide private]

integer_size

Size in characters of an outputted integer. This value is platform dependent.
Type:
int
Value:
8

address_size

Size in characters of an outputted address. This value is platform dependent.
Type:
int
Value:
8