diff --git a/volatility/cli/__init__.py b/volatility/cli/__init__.py index c97fdfbbe..4d36667e0 100644 --- a/volatility/cli/__init__.py +++ b/volatility/cli/__init__.py @@ -158,7 +158,8 @@ class CommandLine(interfaces.plugins.FileConsumerInterface): vollog.log(constants.LOGLEVEL_VVV, "Cache directory used: {}".format(constants.CACHE_PATH)) plugin = plugin_list[args.plugin] - plugin_config_path = interfaces.configuration.path_join('plugins', plugin.__name__) + base_config_path = "plugins" + plugin_config_path = interfaces.configuration.path_join(base_config_path, plugin.__name__) # Special case the -f argument because people use is so frequently # It has to go here so it can be overridden by single-location if it's defined @@ -203,7 +204,7 @@ class CommandLine(interfaces.plugins.FileConsumerInterface): constructed = plugins.run_plugin(ctx, automagics, plugin, - plugin_config_path, + base_config_path, progress_callback, self) diff --git a/volatility/cli/volshell/__init__.py b/volatility/cli/volshell/__init__.py index 3ee6ba965..15a81af01 100644 --- a/volatility/cli/volshell/__init__.py +++ b/volatility/cli/volshell/__init__.py @@ -133,7 +133,8 @@ class VolShell(cli.CommandLine): if args.windows: plugin = windows.Volshell - plugin_config_path = interfaces.configuration.path_join('plugins', plugin.__name__) + base_config_path = "plugins" + plugin_config_path = interfaces.configuration.path_join(base_config_path, plugin.__name__) # Special case the -f argument because people use is so frequently # It has to go here so it can be overridden by single-location if it's defined @@ -178,7 +179,7 @@ class VolShell(cli.CommandLine): constructed = plugins.run_plugin(ctx, automagics, plugin, - plugin_config_path, + base_config_path, progress_callback, self) diff --git a/volatility/framework/plugins/__init__.py b/volatility/framework/plugins/__init__.py index 4e0a831f5..6f1c43b45 100644 --- a/volatility/framework/plugins/__init__.py +++ b/volatility/framework/plugins/__init__.py @@ -9,7 +9,7 @@ vollog = logging.getLogger(__name__) def run_plugin(context: interfaces.context.ContextInterface, automagics: typing.List[interfaces.automagic.AutomagicInterface], plugin: typing.Type[interfaces.plugins.PluginInterface], - plugin_config_path: str, + base_config_path: str, progress_callback: interfaces.layers.ProgressValue, file_consumer: interfaces.plugins.FileConsumerInterface) -> interfaces.plugins.PluginInterface: """Constructs a plugin object based on the parameters @@ -27,7 +27,9 @@ def run_plugin(context: interfaces.context.ContextInterface, Returns: The constructed plugin object """ - errors = automagic.run(automagics, context, plugin, "plugins", progress_callback = progress_callback) + errors = automagic.run(automagics, context, plugin, base_config_path, progress_callback = progress_callback) + # Plugins always get their configuration stored under their plugin name + plugin_config_path = interfaces.configuration.path_join(base_config_path, plugin.__name__) # Check all the requirements and/or go back to the automagic step unsatisfied = plugin.unsatisfied(context, plugin_config_path)