From d1a8adf8b1ced073d6aaca505ae7cb4fd024b942 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Tue, 8 Apr 2014 00:19:19 +0100 Subject: [PATCH] Minor typos and docstring improvements, plus some todos. --- volatility/framework/config.py | 4 ++-- volatility/framework/interfaces/plugins.py | 20 +++++++++++++------- volatility/framework/plugins/__init__.py | 4 ++++ volatility/plugins/__init__.py | 4 +++- 4 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 volatility/framework/plugins/__init__.py diff --git a/volatility/framework/config.py b/volatility/framework/config.py index 8d8c18612..77a450b36 100644 --- a/volatility/framework/config.py +++ b/volatility/framework/config.py @@ -38,7 +38,7 @@ class ConfigurationGroup(validity.ValidityRoutines): self._options = {} def __getattr__(self, attr): - """Locates an option within a configurationgroup and returns it""" + """Locates an option within a ConfigurationGroup and returns it""" if attr in self._options: return self._options[attr] @@ -56,7 +56,7 @@ class Configuration(validity.ValidityRoutines): self._config_groups = {} def __getattr__(self, attr): - """Locates a group within the configuration and returns it""" + """Locates a group within the Configuration and returns it""" if attr in self._config_groups: return self._config_groups[attr] raise AttributeError("Attribute " + attr + " not found in the configuration") diff --git a/volatility/framework/interfaces/plugins.py b/volatility/framework/interfaces/plugins.py index 9e31c225c..1d65b635c 100644 --- a/volatility/framework/interfaces/plugins.py +++ b/volatility/framework/interfaces/plugins.py @@ -19,20 +19,26 @@ class PluginInterface(validity.ValidityRoutines): return self._context def establish_context(self): - """Alters the context to ensure the plugin can run""" + """Alters the context to ensure the plugin can run. + + This function constructs the necessary address spaces and symbol spaces that the plugin will need. + """ raise NotImplementedError("Abstract method establish_context must be overridden by plugins.") def plugin_options(self, config_group = None): """Modifies the passed in ConfigGroup object to contain the required options""" raise NotImplementedError("Abstract method plugin_options must be overridden by plugins") - def __call__(self): + def __call__(self, context): """Executes the functionality of the code - - Returns an OutputUI object + + @:param + + :return: a TreeGrid object that can then be passed to a Renderer. + :rtype: TreeGrid """ -# Needs to say what it can/can't handle (validate context) -# Needs to offer available options' -# Figure out how to handle global config options +# TODO: Needs to say what it can/can't handle (validate context) +# TODO: Needs to offer available options' +# TODO: Figure out how to handle global config options diff --git a/volatility/framework/plugins/__init__.py b/volatility/framework/plugins/__init__.py new file mode 100644 index 000000000..a307d328c --- /dev/null +++ b/volatility/framework/plugins/__init__.py @@ -0,0 +1,4 @@ + + +# TODO: Code to import all the py/pyc files available (but not both). +# TODO: Code to return a none-instantiated list of plugin classes. \ No newline at end of file diff --git a/volatility/plugins/__init__.py b/volatility/plugins/__init__.py index b9675ceac..9c3aabf6f 100644 --- a/volatility/plugins/__init__.py +++ b/volatility/plugins/__init__.py @@ -1 +1,3 @@ -__author__ = 'mike' +import volatility.framework.constants as constants + +__path__ = constants.PLUGINS_PATH \ No newline at end of file