From 8a5196bc60483441a3b3ee8c30d5c1e57c5e4275 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Thu, 3 Oct 2019 01:00:56 +0100 Subject: [PATCH] Add in framework information plugin to list vol components. --- volatility/plugins/frameworkinfo.py | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 volatility/plugins/frameworkinfo.py diff --git a/volatility/plugins/frameworkinfo.py b/volatility/plugins/frameworkinfo.py new file mode 100644 index 000000000..8043c9928 --- /dev/null +++ b/volatility/plugins/frameworkinfo.py @@ -0,0 +1,31 @@ +from typing import List + +from volatility import framework +from volatility.framework import interfaces, renderers +from volatility.framework.interfaces import plugins + + +class FrameworkInfo(plugins.PluginInterface): + """Plugin to list the various modular components of Volatility""" + + @classmethod + def get_requirements(cls) -> List[interfaces.configuration.RequirementInterface]: + return [] + + def _generator(self): + categories = { + 'Automagic': interfaces.automagic.AutomagicInterface, + 'Requirement': interfaces.configuration.RequirementInterface, + 'Layer': interfaces.layers.DataLayerInterface, + 'Object': interfaces.objects.ObjectInterface, + 'Plugin': interfaces.plugins.PluginInterface, + 'Renderer': interfaces.renderers.Renderer + } + + for category, module_interface in categories.items(): + yield (0, (category, )) + for clazz in framework.class_subclasses(module_interface): + yield (1, (clazz.__name__, )) + + def run(self): + return renderers.TreeGrid([("Data", str)], self._generator())