mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-08 18:57:38 +02:00
Force plugins to use the contexts they were given. Also allow the framework to determine requirements without instantiating the plugin.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user