|
5 | 5 | import logging |
6 | 6 | from typing import Dict, Iterator, List, Optional, Tuple |
7 | 7 |
|
| 8 | +from volatility3 import framework |
8 | 9 | from volatility3.framework import constants, exceptions, interfaces, objects |
9 | 10 |
|
10 | 11 | vollog = logging.getLogger(__name__) |
11 | 12 |
|
12 | 13 |
|
13 | | -class MFTEntry(objects.StructType): |
| 14 | +class MFTEntry(objects.StructType, interfaces.configuration.VersionableInterface): |
14 | 15 | """This represents the base MFT Record""" |
15 | 16 |
|
| 17 | + _version = (1, 0, 0) |
| 18 | + _required_framework_version = (2, 26, 0) |
| 19 | + |
| 20 | + framework.require_interface_version(*_required_framework_version) |
| 21 | + |
16 | 22 | def __init__( |
17 | 23 | self, |
18 | 24 | context: interfaces.context.ContextInterface, |
@@ -144,19 +150,31 @@ def alternate_data_streams(self) -> Iterator["MFTAttribute"]: |
144 | 150 | yield attr |
145 | 151 |
|
146 | 152 |
|
147 | | -class MFTFileName(objects.StructType): |
| 153 | +class MFTFileName(objects.StructType, interfaces.configuration.VersionableInterface): |
148 | 154 | """This represents an MFT $FILE_NAME Attribute""" |
149 | 155 |
|
| 156 | + _version = (1, 0, 0) |
| 157 | + |
| 158 | + _required_framework_version = (2, 26, 0) |
| 159 | + |
| 160 | + framework.require_interface_version(*_required_framework_version) |
| 161 | + |
150 | 162 | def get_full_name(self) -> objects.String: |
151 | 163 | output = self.Name.cast( |
152 | 164 | "string", encoding="utf16", max_length=self.NameLength * 2, errors="replace" |
153 | 165 | ) |
154 | 166 | return output |
155 | 167 |
|
156 | 168 |
|
157 | | -class MFTAttribute(objects.StructType): |
| 169 | +class MFTAttribute(objects.StructType, interfaces.configuration.VersionableInterface): |
158 | 170 | """This represents an MFT ATTRIBUTE""" |
159 | 171 |
|
| 172 | + _version = (1, 0, 0) |
| 173 | + |
| 174 | + _required_framework_version = (2, 26, 0) |
| 175 | + |
| 176 | + framework.require_interface_version(*_required_framework_version) |
| 177 | + |
160 | 178 | def get_resident_filename(self) -> Optional[objects.String]: |
161 | 179 | # 4MB chosen as cutoff instead of 4KB to allow for recovery from format /L created file systems |
162 | 180 | # Length as 512 as its 256*2, which is the maximum size for an entire file path, so this is even generous |
|
0 commit comments