mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-09-08 02:37:39 +02:00
Fix up the renderer (and stop masking issues by printing in the generator).
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import sys
|
||||
|
||||
from volatility.framework import interfaces
|
||||
|
||||
|
||||
@@ -9,5 +11,18 @@ class TextRenderer(interfaces.renderers.Renderer):
|
||||
pass
|
||||
|
||||
def render(self, grid):
|
||||
for row in grid.populate():
|
||||
print("\t".join(row))
|
||||
# TODO: Docstrings
|
||||
# TODO: Improve text output
|
||||
outfd = sys.stdout
|
||||
|
||||
for column in grid.columns:
|
||||
outfd.write("\t" + str(column.name))
|
||||
outfd.write("\n")
|
||||
|
||||
def visitor(node, accumulator):
|
||||
for column in grid.columns:
|
||||
accumulator.write("\t" + str(node.values[column.index]))
|
||||
accumulator.write("\n")
|
||||
return accumulator
|
||||
|
||||
grid.populate(visitor, outfd)
|
||||
|
||||
@@ -35,7 +35,6 @@ class PsList(plugins.PluginInterface):
|
||||
|
||||
def _generator(self, eproc):
|
||||
for proc in eproc.ActiveProcessLinks:
|
||||
print(proc.UniqueProcessId, proc.InheritedFromUniqueProcessId)
|
||||
yield (0, (proc.UniqueProcessId, proc.InheritedFromUniqueProcessId))
|
||||
|
||||
def run(self):
|
||||
|
||||
Reference in New Issue
Block a user