Automagic: Fix os_chooser method

Two issues found:
* the plugin hierarchy always start volatility.plugins, so we need
to go to index 2.
* the layers weren't loaded at the time the stacker list was generated
so all other stackers failed.
This commit is contained in:
Mike Auty
2020-07-02 19:33:32 +01:00
committed by ikelos
parent 55dd1c6c2c
commit 4cccbc2f69
+4 -1
View File
@@ -247,7 +247,10 @@ class LayerStacker(interfaces.automagic.AutomagicInterface):
def choose_os_stackers(plugin):
"""Identifies the stackers that should be run, based on the plugin (and thus os) provided"""
plugin_first_level = plugin.__module__.split('.')[0]
plugin_first_level = plugin.__module__.split('.')[2]
# Ensure all stackers are loaded
framework.import_files(sys.modules['volatility.framework.layers'])
result = []
for stacker in sorted(framework.class_subclasses(interfaces.automagic.StackerLayerInterface),