diff --git a/volatility/framework/renderers/format_hints.py b/volatility/framework/renderers/format_hints.py index 36391dab4..cc2a90390 100644 --- a/volatility/framework/renderers/format_hints.py +++ b/volatility/framework/renderers/format_hints.py @@ -5,6 +5,9 @@ These hints allow a plugin to indicate how they'd like a particular column's dat Text renderers should attempt to honour all hints provided in this module where possible """ +class Bin(int): + """A class to indicate that the integer value should be represented as a binary value""" + class Hex(int): """A class to indicate that the integer value should be represented as a hexidecimal value""" diff --git a/volatility/framework/renderers/text.py b/volatility/framework/renderers/text.py index c64286c2c..48afc6c37 100644 --- a/volatility/framework/renderers/text.py +++ b/volatility/framework/renderers/text.py @@ -25,7 +25,8 @@ def hex_bytes_as_text(value): class QuickTextRenderer(interfaces.renderers.Renderer): - type_renderers = {format_hints.Hex: lambda x: "{:x}".format(x), + type_renderers = {format_hints.Bin: lambda x: "{:b}".format(x), + format_hints.Hex: lambda x: "{:x}".format(x), format_hints.HexBytes: hex_bytes_as_text, bytes: lambda x: x.decode("utf-8"), 'default': lambda x: "{}".format(x)}