Skip to content

Commit 5581d25

Browse files
committed
CLI: Indicate missing bytes from padded bytes
1 parent 9d03f50 commit 5581d25

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

volatility3/cli/text_renderer.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,13 @@ def render(data: Union[interfaces.renderers.LayerData, BaseAbsentValue]):
196196
printables = ""
197197
output = "\n"
198198
for count, byte in enumerate(specific_data):
199-
output += f"{byte:02x} "
200-
char = chr(byte)
201-
printables += char if 0x20 <= byte <= 0x7E else "."
199+
if count not in error_bytes:
200+
output += f"{byte:02x} "
201+
char = chr(byte)
202+
printables += char if 0x20 <= byte <= 0x7E else "."
203+
else:
204+
output += "__ "
205+
printables += "."
202206
if count % self.width == self.width - 1:
203207
output += printables
204208
if count < len(specific_data) - 1:

0 commit comments

Comments
 (0)