mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-17 20:35:40 +02:00
Refactor TextRenderer to QuickTextRenderer to ensure we don't forget that the output is speedy not nicely formatted.
This commit is contained in:
@@ -20,7 +20,7 @@ from volatility.framework import automagic
|
||||
from volatility.framework import constants, contexts, interfaces
|
||||
from volatility.framework.configuration import requirements
|
||||
from volatility.framework.interfaces.configuration import HierarchicalDict
|
||||
from volatility.framework.renderers.text import TextRenderer
|
||||
from volatility.framework.renderers.text import QuickTextRenderer
|
||||
|
||||
__author__ = 'mike'
|
||||
|
||||
@@ -139,7 +139,7 @@ class CommandLine(object):
|
||||
json.dump(dict(constructed.build_configuration()), f, sort_keys = True, indent = 2)
|
||||
|
||||
# Construct and run the plugin
|
||||
TextRenderer().render(constructed.run())
|
||||
QuickTextRenderer().render(constructed.run())
|
||||
|
||||
def populate_requirements_argparse(self, parser, configurable):
|
||||
"""Adds the plugin's simple requirements to the provided parser
|
||||
|
||||
@@ -24,7 +24,7 @@ def hex_bytes_as_text(value):
|
||||
return output
|
||||
|
||||
|
||||
class TextRenderer(interfaces.renderers.Renderer):
|
||||
class QuickTextRenderer(interfaces.renderers.Renderer):
|
||||
type_renderers = {format_hints.Hex: lambda x: "{:x}".format(x),
|
||||
format_hints.HexBytes: hex_bytes_as_text,
|
||||
bytes: lambda x: x.decode("utf-8"),
|
||||
|
||||
Reference in New Issue
Block a user