Browse Source

fix typos and duplicate packet

master
Shiz 2 years ago
parent
commit
6610e0e950
2 changed files with 6 additions and 11 deletions
  1. +5
    -10
      exorcise/partition/ntfs/__init__.py
  2. +1
    -1
      exorcise/partition/ntfs/attributes.py

+ 5
- 10
exorcise/partition/ntfs/__init__.py View File

@ -10,7 +10,10 @@ from .mft import MFTRecord
class IDPacket(Struct):
magic = Sig(b'\x0E')
unk1 = Sig(bytes([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))
type = UInt(16)
unk3 = Data(4)
id = UInt(32)
unk4 = Data(4)
footer = Sig(b'\x0F')
class BufferPacket(Struct, generics=['D']):
@ -29,17 +32,9 @@ class BufferChecksumPacket(Struct):
unk5 = Sig(bytes([0, 0, 0, 0]))
footer = Sig(b'\x0B')
class MFTPacket(Struct):
magic = Sig(b'\x0E')
type = UInt(16)
unk3 = Data(4)
id = UInt(32)
unk4 = Data(4)
footer = Sig(b'\x0F')
class NTFSIndex(Struct):
header = MFTPacket
header = IDPacket
b = Data(10)
data = MFTRecord # NTFSPropertyTag.SMftRecordSize


+ 1
- 1
exorcise/partition/ntfs/attributes.py View File

@ -224,7 +224,7 @@ class IndexRootAttribute(Struct):
spec.node = IndexNode[Attribute.options[self.type]]
@attribute(0xA0)
class IndexAllocationAttribute(Struct, generic=['G']):
class IndexAllocationAttribute(Struct, generics=['G']):
nodes = Arr(IndexNode[G])
@attribute(0xB0)


Loading…
Cancel
Save