Skip to content

Commit

Permalink
CLI: Indicate missing bytes from padded bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
ikelos committed Feb 15, 2025
1 parent 9d03f50 commit 5581d25
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions volatility3/cli/text_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,13 @@ def render(data: Union[interfaces.renderers.LayerData, BaseAbsentValue]):
printables = ""
output = "\n"
for count, byte in enumerate(specific_data):
output += f"{byte:02x} "
char = chr(byte)
printables += char if 0x20 <= byte <= 0x7E else "."
if count not in error_bytes:
output += f"{byte:02x} "
char = chr(byte)
printables += char if 0x20 <= byte <= 0x7E else "."
else:
output += "__ "
printables += "."
if count % self.width == self.width - 1:
output += printables
if count < len(specific_data) - 1:
Expand Down

0 comments on commit 5581d25

Please sign in to comment.