volatility3.cli.text_renderer module

class CLIRenderer(options=None)[source]

Bases: Renderer

Class to add specific requirements for CLI renderers.

Accepts an options object to configure the renderers.

column_hide_list: list = None
filter: CLIFilter = None
abstract get_render_options()

Returns a list of rendering options.

Return type:

List[Any]

ignored_columns(grid)[source]
Return type:

List[Column]

name = 'unnamed'
abstract render(grid)

Takes a grid object and renders it based on the object’s preferences.

Return type:

None

structured_output = False
class CSVRenderer(options=None)[source]

Bases: CLIRenderer

Accepts an options object to configure the renderers.

column_hide_list: list = None
filter: CLIFilter = None
get_render_options()[source]

Returns a list of rendering options.

ignored_columns(grid)
Return type:

List[Column]

name = 'csv'
render(grid)[source]

Renders each row immediately to stdout.

Parameters:

grid (TreeGrid) – The TreeGrid object to render

Return type:

None

structured_output = True
class JsonLinesRenderer(options=None)[source]

Bases: JsonRenderer

Accepts an options object to configure the renderers.

column_hide_list: list = None
filter: CLIFilter = None
get_render_options()

Returns a list of rendering options.

Return type:

List[Any]

ignored_columns(grid)
Return type:

List[Column]

name = 'JSONL'
output_result(outfd, result)[source]

Outputs the JSON results as JSON lines

render(grid)

Takes a grid object and renders it based on the object’s preferences.

structured_output = True
class JsonRenderer(options=None)[source]

Bases: CLIRenderer

Accepts an options object to configure the renderers.

column_hide_list: list = None
filter: CLIFilter = None
get_render_options()[source]

Returns a list of rendering options.

Return type:

List[Any]

ignored_columns(grid)
Return type:

List[Column]

name = 'JSON'
output_result(outfd, result)[source]

Outputs the JSON data to a file in a particular format

render(grid)[source]

Takes a grid object and renders it based on the object’s preferences.

structured_output = True
class NoneRenderer(options=None)[source]

Bases: CLIRenderer

Outputs no results

Accepts an options object to configure the renderers.

column_hide_list: list = None
filter: CLIFilter = None
get_render_options()[source]

Returns a list of rendering options.

ignored_columns(grid)
Return type:

List[Column]

name = 'none'
render(grid)[source]

Takes a grid object and renders it based on the object’s preferences.

Return type:

None

structured_output = False
class PrettyTextRenderer(options=None)[source]

Bases: CLIRenderer

Accepts an options object to configure the renderers.

column_hide_list: list = None
filter: CLIFilter = None
get_render_options()[source]

Returns a list of rendering options.

ignored_columns(grid)
Return type:

List[Column]

name = 'pretty'
render(grid)[source]

Renders each column immediately to stdout.

This does not format each line’s width appropriately, it merely tab separates each field

Parameters:

grid (TreeGrid) – The TreeGrid object to render

Return type:

None

structured_output = False
tab_stop(line)[source]
Return type:

str

class QuickTextRenderer(options=None)[source]

Bases: CLIRenderer

Accepts an options object to configure the renderers.

column_hide_list: list = None
filter: CLIFilter = None
get_render_options()[source]

Returns a list of rendering options.

ignored_columns(grid)
Return type:

List[Column]

name = 'quick'
render(grid)[source]

Renders each column immediately to stdout.

This does not format each line’s width appropriately, it merely tab separates each field

Parameters:

grid (TreeGrid) – The TreeGrid object to render

Return type:

None

structured_output = False
display_disassembly(disasm)[source]

Renders a disassembly renderer type into string format.

Parameters:

disasm (Disassembly) – Input disassembly objects

Return type:

str

Returns:

A string as rendered by capstone where available, otherwise output as if it were just bytes

hex_bytes_as_text(value, width=16)[source]

Renders HexBytes as text.

Parameters:

value (bytes) – A series of bytes to convert to text

Return type:

str

Returns:

A text representation of the hexadecimal bytes plus their ascii equivalents, separated by newline characters

multitypedata_as_text(value)[source]

Renders the bytes as a string where possible, otherwise it displays hex data

This attempts to convert the string based on its encoding and if no data’s been lost due to the split on the null character, then it displays it as is

Return type:

str

optional(func)[source]
Return type:

Callable

quoted_optional(func)[source]
Return type:

Callable