fix typos and duplicate packet

This commit is contained in:
Shiz 2020-01-30 23:16:42 +01:00
parent 4da4f8e149
commit 6610e0e950
2 changed files with 6 additions and 11 deletions

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

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)