mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-05 17:27:38 +02:00
frameworkinfo: Make this a core plugin, not an optional extra.
This commit is contained in:
@@ -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())
|
||||
Reference in New Issue
Block a user