mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-28 12:34:53 +02:00
Convert all remaining plugins to use the new classmethod pslist.
This commit is contained in:
@@ -54,8 +54,6 @@ class Maps(plugins.PluginInterface):
|
||||
))
|
||||
|
||||
def run(self):
|
||||
plugin = pslist.PsList(self.context, self.config_path)
|
||||
|
||||
return renderers.TreeGrid(
|
||||
[("PID", int),
|
||||
("Process", str),
|
||||
@@ -67,4 +65,6 @@ class Maps(plugins.PluginInterface):
|
||||
("Minor", int),
|
||||
("Inode", int),
|
||||
("File Path", str)],
|
||||
self._generator(plugin.list_tasks()))
|
||||
self._generator(pslist.PsList.list_tasks(self.context,
|
||||
self.config['primary'],
|
||||
self.config['vmlinux'])))
|
||||
|
||||
@@ -25,13 +25,14 @@ class PsList(interfaces_plugins.PluginInterface):
|
||||
name = utility.array_to_string(task.comm)
|
||||
yield (0, (pid, ppid, name))
|
||||
|
||||
def list_tasks(self):
|
||||
@classmethod
|
||||
def list_tasks(cls, context, primary_layer: str, vmlinux_table: str):
|
||||
"""Lists all the tasks in the primary layer"""
|
||||
|
||||
layer_name = self.context.memory[self.config['primary']].config['memory_layer']
|
||||
layer_name = context.memory[primary_layer].config['memory_layer']
|
||||
|
||||
_, aslr_shift = linux.LinuxUtilities.find_aslr(self.context, self.config["vmlinux"], layer_name)
|
||||
vmlinux = self.context.module(self.config["vmlinux"], self.config["primary"], aslr_shift)
|
||||
_, aslr_shift = linux.LinuxUtilities.find_aslr(context, vmlinux_table, layer_name)
|
||||
vmlinux = context.module(vmlinux_table, primary_layer, aslr_shift)
|
||||
init_task = vmlinux.object(symbol_name = "init_task")
|
||||
|
||||
for task in init_task.tasks:
|
||||
|
||||
Reference in New Issue
Block a user