add initial support for $I30 index records - #11
Conversation
|
|
||
| from dtformats import data_format | ||
| from dtformats.errors import ParseError | ||
|
|
There was a problem hiding this comment.
using the l2t/Plaso style guide here: please add an additional white line
| @@ -0,0 +1,144 @@ | |||
| # -*- coding: utf-8 -*- | |||
| """INDX entries """ | |||
There was a problem hiding this comment.
Are these NTFS $I30 index entries? Note that NTFS support different types of index entries as well, so please be as specific as possible here.
| import os | ||
|
|
||
| from dtformats import data_format | ||
| from dtformats.errors import ParseError |
There was a problem hiding this comment.
Please don't import classes directly see https://github.com/log2timeline/l2tdocs/blob/main/process/Style-guide.md
| """ | ||
|
|
||
| _FABRIC = data_format.BinaryDataFile.ReadDefinitionFile( | ||
| 'indx_directory_entry.yml') |
There was a problem hiding this comment.
style nit: 4 space continuation indentation (repeat elsewhere as well)
| 'indx_directory_entry.yml') | ||
|
|
||
| _DEBUG_INDX_ENTRY_HEADER = [ | ||
| ('signature', 'signature', ''), |
There was a problem hiding this comment.
missing debug value print function
joachimmetz
left a comment
There was a problem hiding this comment.
Left some comment, PTAL at the style guide
| from dtformats import data_format | ||
| from dtformats.errors import ParseError | ||
|
|
||
| class INDXRecord(data_format.BinaryDataFile): |
There was a problem hiding this comment.
Limit the use of abbreviation, for international audiences these lead to unnecessary additional confusion
| ('filename', 'filename', '_FormatString')] | ||
|
|
||
| def PrintRecord(self, record): | ||
| """ |
There was a problem hiding this comment.
style consistency nit: start on the first line directly after """
| Args: | ||
| record (index_dir_entry): An index_dir_entry structure. | ||
| """ | ||
| if record is not None: |
There was a problem hiding this comment.
I will change this to if record -- I am checking if record has a value other than None
| record.index_key_data, self._DEBUG_FILE_NAME_ATTR) | ||
|
|
||
|
|
||
| def _ParseIndexEntryHeader(self, file_object): |
| record, self._DEBUG_INDX_DIR_RECORD) | ||
| self._DebugPrintStructureObject( | ||
| record.index_key_data, self._DEBUG_FILE_NAME_ATTR) | ||
|
|
| @@ -0,0 +1,158 @@ | |||
| name: index_record | |||
There was a problem hiding this comment.
index_record > ntfs_i30_index
| @@ -0,0 +1,158 @@ | |||
| name: index_record | |||
| type: format | |||
| description: Index Directory Entry | |||
There was a problem hiding this comment.
(change to something in line with) NTFS $I30 index, which contains directory entries
| name: index_record | ||
| type: format | ||
| description: Index Directory Entry | ||
| urls: ["https://github.com/libyal/libfsntfs/blob/83c2f4ce3d16b5535eae9de767adc93fff724004/documentation/New%20Technologies%20File%20System%20(NTFS).asciidoc#index"] |
There was a problem hiding this comment.
please pin to main (latest version of the documentation)
| description: Index Directory Entry | ||
| urls: ["https://github.com/libyal/libfsntfs/blob/83c2f4ce3d16b5535eae9de767adc93fff724004/documentation/New%20Technologies%20File%20System%20(NTFS).asciidoc#index"] | ||
| metadata: | ||
| authors: ['Joachim Metz <joachim.metz@gmail.com>', 'Juan Leaniz <juan.leaniz@gmail.com'] |
There was a problem hiding this comment.
for multiple entries use:
authors:
- Juan Leaniz <juan.leaniz@gmail.com'
However you can remove me at this point since I did not author this file
| - name: index_node_flags | ||
| data_type: uint32 | ||
| --- | ||
| name: index_dir_entry |
|
Renamed .py and .yml file names to use non-abbreviated names. Addressed style and other comments. |
|
@joachimmetz PTAL, minor changes |
1ebe12b to
4524810
Compare
85d9b05 to
00df5f2
Compare
a6c6c05 to
4116264
Compare
05669cf to
f36ac18
Compare
5e1c1c1 to
7f03eae
Compare
f152369 to
2d1d66b
Compare
817df43 to
4b73068
Compare
Added a data structure definition file and supporting class/methods for NTFS INDX directory records