mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-17 20:35:40 +02:00
Tiny change text_renderer.py
This commit is contained in:
@@ -49,12 +49,12 @@ def hex_bytes_as_text(value: bytes, width: int = 16) -> str:
|
||||
output += "\n"
|
||||
printables = ""
|
||||
|
||||
# Handle leftovers when the lenght is not mutiple of width
|
||||
# Handle leftovers when the length is not mutiple of width
|
||||
if printables:
|
||||
padding = width - len(printables)
|
||||
output += " " * (padding)
|
||||
output += " " * padding
|
||||
output += printables
|
||||
output += " " * (padding)
|
||||
output += " " * padding
|
||||
|
||||
return output
|
||||
|
||||
@@ -132,7 +132,7 @@ def display_disassembly(disasm: interfaces.renderers.Disassembly) -> str:
|
||||
for i in disasm_types[disasm.architecture].disasm(
|
||||
disasm.data, disasm.offset
|
||||
):
|
||||
output += f"\n0x{i.address:x}:\t{i.mnemonic}\t{i.op_str}"
|
||||
output += f"\n{i.address:#x}:\t{i.mnemonic}\t{i.op_str}"
|
||||
return output
|
||||
return QuickTextRenderer._type_renderers[bytes](disasm.data)
|
||||
|
||||
@@ -342,7 +342,7 @@ class PrettyTextRenderer(CLIRenderer):
|
||||
column_separator = " | "
|
||||
|
||||
tree_indent_column = "".join(
|
||||
random.choice(string.ascii_uppercase + string.digits) for _ in range(20)
|
||||
random.choices(string.ascii_uppercase + string.digits, k=20)
|
||||
)
|
||||
max_column_widths = dict(
|
||||
[(column.name, len(column.name)) for column in grid.columns]
|
||||
|
||||
Reference in New Issue
Block a user