Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Framework: Add 'Data' type to base types #1310

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions volatility3/framework/interfaces/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ class BaseAbsentValue(object):
"""Class that represents values which are not present for some reason."""


class Data(object):
"""Class that represents a view of data in a particular layer"""

def __init__(self, offset: int, layer_name: str, length: int):
self.layer_name = layer_name
self.offset = offset
self.length = length


class Disassembly(object):
"""A class to indicate that the bytes provided should be disassembled
(based on the architecture)"""
Expand Down Expand Up @@ -132,6 +141,7 @@ def __init__(
Type[datetime.datetime],
Type[BaseAbsentValue],
Type[Disassembly],
Type[Data],
]
ColumnsType = List[Tuple[str, BaseTypes]]
VisitorSignature = Callable[[TreeNode, _Type], _Type]
Expand All @@ -157,6 +167,7 @@ class TreeGrid(object, metaclass=ABCMeta):
bytes,
datetime.datetime,
Disassembly,
Data,
)

def __init__(self, columns: ColumnsType, generator: Generator) -> None:
Expand Down
Loading