Base class for each plugin command. More...
Public Member Functions | |
| def | __init__ |
| Constructor uses args as an initializer. More... | |
| def | help |
| This function returns a string that will be displayed when a user lists available plugins. | |
| def | calculate |
| This function is responsible for performing all calculations. More... | |
| def | execute |
| Executes the plugin command. More... | |
| def | format_value |
| Formats an individual field using the table formatting codes. | |
| def | table_header |
| Table header renders the title row of a table. More... | |
| def | table_row |
| Outputs a single row of a table. | |
Static Public Member Functions | |
| def | register_options |
| Registers options into a config object provided. | |
| def | is_valid_profile |
Static Public Attributes | |
| string | op = "" |
| string | opts = "" |
| string | args = "" |
| string | cmdname = "" |
| dictionary | meta_info = {} |
| elide_data = True | |
| string | tablesep = " " |
Base class for each plugin command.
| def volatility.commands.Command.__init__ | ( | self, | |
| config, | |||
| _args, | |||
| _kwargs | |||
| ) |
Constructor uses args as an initializer.
It creates an instance of OptionParser, populates the options, and finally parses the command line. Options are stored in the self.opts attribute.
| def volatility.commands.Command.calculate | ( | self | ) |
This function is responsible for performing all calculations.
We should not have any output functions (e.g. print) in this function at all.
If this function is expected to take a long time to return some data, the function should return a generator.
| def volatility.commands.Command.execute | ( | self | ) |
Executes the plugin command.
| def volatility.commands.Command.table_header | ( | self, | |
| outfd, | |||
title_format_list = None |
|||
| ) |
Table header renders the title row of a table.
This also stores the header types to ensure everything is formatted appropriately. It must be a list of tuples rather than a dict for ordering purposes.