From 288a017178a163d1efc93daecc5a570e052d4b90 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Sat, 22 Aug 2020 11:55:23 +0100 Subject: [PATCH] CLI: fix up the previous broken commit --- volatility/cli/__init__.py | 2 +- volatility/framework/automagic/__init__.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/volatility/cli/__init__.py b/volatility/cli/__init__.py index fb8b3c6ed..b63d2ded9 100644 --- a/volatility/cli/__init__.py +++ b/volatility/cli/__init__.py @@ -272,7 +272,7 @@ class CommandLine(interfaces.plugins.FileConsumerInterface): # It should be up to the UI to determine which automagics to run, so this is before BACK TO THE FRAMEWORK automagics = automagic.choose_automagic(automagics, plugin) for amagic in automagics: - chosen_configurables_list[plugin] = plugin + chosen_configurables_list[amagic.__class__.__name__] = amagic if ctx.config.get('automagic.LayerStacker.stackers', None) is None: ctx.config['automagic.LayerStacker.stackers'] = stacker.choose_os_stackers(plugin) diff --git a/volatility/framework/automagic/__init__.py b/volatility/framework/automagic/__init__.py index a36da8754..2541214a0 100644 --- a/volatility/framework/automagic/__init__.py +++ b/volatility/framework/automagic/__init__.py @@ -44,11 +44,12 @@ def available(context: interfaces.context.ContextInterface) -> List[interfaces.a clazz(context, interfaces.configuration.path_join(config_path, clazz.__name__)) for clazz in class_subclasses(interfaces.automagic.AutomagicInterface) ], - key = lambda x: x.priority) + key = lambda x: x.priority) -def choose_automagic(automagics: List[interfaces.automagic.AutomagicInterface], - plugin: Type[interfaces.plugins.PluginInterface]): +def choose_automagic( + automagics: List[interfaces.automagic.AutomagicInterface], + plugin: Type[interfaces.plugins.PluginInterface]) -> List[Type[interfaces.automagic.AutomagicInterface]]: """Chooses which automagics to run, maintaining the order they were handed in."""