volatility3.cli.volshell.generic module

class NullFileHandler(preferred_name)[source]

Bases: BytesIO, FileHandlerInterface

Null FileHandler that swallows files whole without consuming memory


Disable all I/O operations.


True if the file is closed.


Disconnect this buffer from its underlying raw stream and return it.

After the raw stream has been detached, the buffer is in an unusable state.


Returns underlying file descriptor if one exists.

OSError is raised if the IO object does not use a file descriptor.


Does nothing.


Get a read-write view over the contents of the BytesIO object.


Retrieve the entire contents of the BytesIO object.


Always returns False.

BytesIO objects are not connected to a TTY-like device.

property preferred_filename

The preferred filename to save the data to. Until this file has been written, this value may not be the final filename the data is written to.

read(size=-1, /)

Read at most size bytes, returned as a bytes object.

If the size argument is negative, read until EOF is reached. Return an empty bytes object at EOF.

read1(size=-1, /)

Read at most size bytes, returned as a bytes object.

If the size argument is negative or omitted, read until EOF is reached. Return an empty bytes object at EOF.


Returns True if the IO object can be read.


Read until EOF, using multiple read() call.

readinto(buffer, /)

Read bytes into buffer.

Returns number of bytes read (0 for EOF), or None if the object is set not to block and has no data to read.

readinto1(buffer, /)
readline(size=-1, /)

Next line from the file, as a bytes object.

Retain newline. A non-negative size argument limits the maximum number of bytes to return (an incomplete line may be returned then). Return an empty bytes object at EOF.

readlines(size=None, /)

List of bytes objects, each a line from the file.

Call readline() repeatedly and return a list of the lines so read. The optional size argument, if given, is an approximate bound on the total number of bytes in the lines returned.

seek(pos, whence=0, /)

Change stream position.

Seek to byte offset pos relative to position indicated by whence:

0 Start of stream (the default). pos should be >= 0; 1 Current position - pos may be negative; 2 End of stream - pos usually negative.

Returns the new absolute position.


Returns True if the IO object can be seeked.


Current file position, an integer.

truncate(size=None, /)

Truncate the file to at most size bytes.

Size defaults to the current file position, as returned by tell(). The current file position is unchanged. Returns the new size.


Returns True if the IO object can be written.


Dummy method


Dummy method

class Volshell(*args, **kwargs)[source]

Bases: PluginInterface

Shell environment to directly interact with a memory image.

  • context – The context that the plugin will operate within

  • config_path – The path to configuration data within the context configuration data

  • progress_callback – A callable that can provide feedback at progress points


Constructs a HierarchicalDictionary of all the options required to build this component in the current context.

Ensures that if the class has been created, it can be recreated using the configuration built Inheriting classes must override this to ensure any dependent classes update their configurations too

Return type:



Changes the current default layer


Changes the current_symbol_table

property config: HierarchicalDict

The Hierarchical configuration Dictionary for this Configurable object.

property config_path: str

The configuration path on which this configurable lives.


Returns a dictionary listing the functions to be added to the environment.

Return type:

List[Tuple[List[str], Any]]

property context: ContextInterface

The context object that this configurable belongs to/configuration is stored in.

create_configurable(clazz, **kwargs)[source]

Creates a configurable object, converting arguments to configuration

property current_kernel_name
property current_layer
property current_symbol_table
disassemble(offset, count=128, layer_name=None, architecture=None)[source]

Disassembles a number of instructions from the code at offset

display_bytes(offset, count=128, layer_name=None)[source]

Displays byte values and ASCII characters

display_doublewords(offset, count=128, layer_name=None)[source]

Displays double-word values (4 bytes) and corresponding ASCII characters

display_plugin_output(plugin, **kwargs)[source]

Displays the output for a particular plugin (with keyword arguments)

Return type:


display_quadwords(offset, count=128, layer_name=None)[source]

Displays quad-word values (8 bytes) and corresponding ASCII characters


Prints an alphabetical list of symbols for a symbol table

display_type(object, offset=None)[source]

Display Type describes the members of a particular object in alphabetical order

display_words(offset, count=128, layer_name=None)[source]

Displays word values (2 bytes) and corresponding ASCII characters

generate_treegrid(plugin, **kwargs)[source]

Generates a TreeGrid based on a specific plugin passing in kwarg configuration values

Return type:


classmethod get_requirements()[source]

Returns a list of Requirement objects for this plugin.

Return type:



Describes the available commands

property kernel

Returns the current kernel object


Loads a file into a Filelayer and returns the name of the layer

classmethod make_subconfig(context, base_config_path, **kwargs)

Convenience function to allow constructing a new randomly generated sub-configuration path, containing each element from kwargs.

  • context (ContextInterface) – The context in which to store the new configuration

  • base_config_path (str) – The base configuration path on which to build the new configuration

  • kwargs – Keyword arguments that are used to populate the new configuration path


The newly generated full configuration path

Return type:


property open

Returns a context manager and thus can be called like open

Return type:


render_treegrid(treegrid, renderer=None)[source]

Renders a treegrid as produced by generate_treegrid

Return type:



Runs the interactive volshell plugin.

Return type:



Return a TreeGrid but this is always empty since the point of this plugin is to run interactively


Runs a python script within the context of volshell


Sets the file handler to be used by this plugin.

Return type:


classmethod unsatisfied(context, config_path)

Returns a list of the names of all unsatisfied requirements.

Since a satisfied set of requirements will return [], it can be used in tests as follows:

unmet = configurable.unsatisfied(context, config_path)
if unmet:
    raise RuntimeError("Unsatisfied requirements: {}".format(unmet)
Return type:

Dict[str, RequirementInterface]

version = (0, 0, 0)