mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-31 04:09:40 +02:00
Remove the plugin __call__ method for properly named run method.
Calls methods are handy, but ugly if you create and then call the object immediately ( for example, thing()() ).
This commit is contained in:
@@ -41,10 +41,8 @@ class CommandLine(object):
|
||||
factory = req_mapping[req]
|
||||
req.value = factory(context)
|
||||
|
||||
# Construct the plugin
|
||||
runner = plugin(context)
|
||||
# Run the plugin
|
||||
runner()
|
||||
# Construct and run the plugin
|
||||
plugin(context).run()
|
||||
|
||||
@staticmethod
|
||||
def construct_translation_layer_factory(name, requirement):
|
||||
|
||||
@@ -52,7 +52,7 @@ class PluginInterface(validity.ValidityRoutines, metaclass = ABCMeta):
|
||||
option.validate_input(self.config.get_value(option.name), self.context)
|
||||
|
||||
@abstractmethod
|
||||
def __call__(self):
|
||||
def run(self):
|
||||
"""Executes the functionality of the code
|
||||
|
||||
@:param
|
||||
|
||||
@@ -31,7 +31,7 @@ class PsList(plugins.PluginInterface):
|
||||
# Get the process from the thread object in kernel space
|
||||
return ethread.owning_process()
|
||||
|
||||
def __call__(self):
|
||||
def run(self):
|
||||
self.validate_inputs()
|
||||
eproc = self.kernel_process_from_physical_process(self.context, 'physical', 'intel', self.config.get_value('offset'))
|
||||
for proc in eproc.ActiveProcessLinks:
|
||||
|
||||
Reference in New Issue
Block a user