From bf324d0c7138501de3d75455eef7d3e4637e1ce3 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Tue, 7 Apr 2015 13:35:27 -0500 Subject: [PATCH] Force plugins to use the contexts they were given. Also allow the framework to determine requirements without instantiating the plugin. --- volatility/framework/interfaces/plugins.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/volatility/framework/interfaces/plugins.py b/volatility/framework/interfaces/plugins.py index a224d7d4d..90155c959 100644 --- a/volatility/framework/interfaces/plugins.py +++ b/volatility/framework/interfaces/plugins.py @@ -33,16 +33,17 @@ class PluginInterface(validity.ValidityRoutines, metaclass = ABCMeta): return self._context @abstractmethod - def requirements(self): + @classmethod + def requirements(cls): """Returns a list of requirements options""" - pass + return [] def check_requirements(self): for requirement in self.requirements(): requirement.check_value(requirement.value, self._context) @abstractmethod - def __call__(self, context): + def __call__(self): """Executes the functionality of the code @:param