mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-01 12:48:52 +02:00
Tidy up imports and adhere to the coding style of never directly importing objects.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import volatility.framework.interfaces.plugins as plugins
|
||||
from volatility.framework import renderers
|
||||
from volatility.framework.configuration import requirements
|
||||
from volatility.framework.renderers import TreeGrid
|
||||
from volatility.framework.objects.utility import array_to_string
|
||||
from volatility.framework.objects import utility
|
||||
|
||||
|
||||
class PsList(plugins.PluginInterface):
|
||||
@@ -22,7 +22,7 @@ class PsList(plugins.PluginInterface):
|
||||
ppid = 0
|
||||
if task.parent:
|
||||
ppid = task.parent.pid
|
||||
name = array_to_string(task.comm)
|
||||
name = utility.array_to_string(task.comm)
|
||||
yield (0, (pid, ppid, name))
|
||||
|
||||
def list_tasks(self):
|
||||
@@ -32,13 +32,13 @@ class PsList(plugins.PluginInterface):
|
||||
|
||||
# TODO: Will need to compute a non-zero offset for ASLR kernels
|
||||
vmlinux = self.context.module("vmlinux", "primary", 0)
|
||||
init_task = vmlinux.object(symbol_name="init_task")
|
||||
init_task = vmlinux.object(symbol_name = "init_task")
|
||||
|
||||
for task in init_task.tasks:
|
||||
yield task
|
||||
|
||||
def run(self):
|
||||
return TreeGrid([("PID", int),
|
||||
("PPID", int),
|
||||
("COMM", str)],
|
||||
self._generator())
|
||||
return renderers.TreeGrid([("PID", int),
|
||||
("PPID", int),
|
||||
("COMM", str)],
|
||||
self._generator())
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import volatility.framework.interfaces.plugins as plugins
|
||||
import volatility.framework.interfaces.plugins as interfaces_plugins
|
||||
import volatility.plugins.windows.pslist as pslist
|
||||
from volatility.framework import exceptions, renderers
|
||||
from volatility.framework.renderers import format_hints
|
||||
|
||||
|
||||
class DllList(plugins.PluginInterface):
|
||||
class DllList(interfaces_plugins.PluginInterface):
|
||||
"""Lists the loaded modules in a particular memory image"""
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import volatility.framework.interfaces.plugins as plugins
|
||||
from volatility.framework import renderers
|
||||
from volatility.framework.configuration import requirements
|
||||
from volatility.framework.renderers import TreeGrid
|
||||
from volatility.framework.renderers import format_hints
|
||||
|
||||
|
||||
@@ -41,6 +41,6 @@ class HiveList(plugins.PluginInterface):
|
||||
yield hive
|
||||
|
||||
def run(self):
|
||||
return TreeGrid([("Offset", format_hints.Hex),
|
||||
("FileFullPath", str)],
|
||||
self._generator())
|
||||
return renderers.TreeGrid([("Offset", format_hints.Hex),
|
||||
("FileFullPath", str)],
|
||||
self._generator())
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import volatility.framework.interfaces.plugins as plugins
|
||||
from volatility.framework import exceptions
|
||||
from volatility.framework import renderers
|
||||
from volatility.framework.configuration import requirements
|
||||
from volatility.framework.renderers import TreeGrid
|
||||
from volatility.framework.renderers import format_hints
|
||||
|
||||
|
||||
@@ -55,9 +55,9 @@ class Modules(plugins.PluginInterface):
|
||||
yield mod
|
||||
|
||||
def run(self):
|
||||
return TreeGrid([("Offset", format_hints.Hex),
|
||||
("Base", format_hints.Hex),
|
||||
("Size", format_hints.Hex),
|
||||
("Name", str),
|
||||
("Path", str)],
|
||||
self._generator())
|
||||
return renderers.TreeGrid([("Offset", format_hints.Hex),
|
||||
("Base", format_hints.Hex),
|
||||
("Size", format_hints.Hex),
|
||||
("Name", str),
|
||||
("Path", str)],
|
||||
self._generator())
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import volatility.framework.interfaces.plugins as plugins
|
||||
from volatility.framework import renderers
|
||||
from volatility.framework.configuration import requirements
|
||||
from volatility.framework.renderers import TreeGrid
|
||||
|
||||
|
||||
class PsList(plugins.PluginInterface):
|
||||
@@ -55,7 +55,7 @@ class PsList(plugins.PluginInterface):
|
||||
yield proc
|
||||
|
||||
def run(self):
|
||||
return TreeGrid([("PID", int),
|
||||
("PPID", int),
|
||||
("ImageFileName", str)],
|
||||
self._generator())
|
||||
return renderers.TreeGrid([("PID", int),
|
||||
("PPID", int),
|
||||
("ImageFileName", str)],
|
||||
self._generator())
|
||||
|
||||
Reference in New Issue
Block a user