diff --git a/Dell PFS BIOS Extractor/Dell_PFS_Extract.py b/Dell PFS BIOS Extractor/Dell_PFS_Extract.py index 36e401e..c331cda 100644 --- a/Dell PFS BIOS Extractor/Dell_PFS_Extract.py +++ b/Dell PFS BIOS Extractor/Dell_PFS_Extract.py @@ -3,11 +3,11 @@ """ Dell PFS Extract Dell PFS BIOS Extractor -Copyright (C) 2019 Plato Mavropoulos +Copyright (C) 2019-2020 Plato Mavropoulos Inspired from https://github.com/LongSoft/PFSExtractor-RS by Nikolaj Schlej """ -title = 'Dell PFS BIOS Extractor v3.6' +title = 'Dell PFS BIOS Extractor v4.0' import os import re @@ -26,7 +26,6 @@ uint16_t = ctypes.c_ushort uint32_t = ctypes.c_uint uint64_t = ctypes.c_uint64 -# noinspection PyTypeChecker class PFS_HDR(ctypes.LittleEndianStructure) : _pack_ = 1 _fields_ = [ @@ -42,7 +41,6 @@ class PFS_HDR(ctypes.LittleEndianStructure) : print('HeaderVersion : %d' % self.HeaderVersion) print('PayloadSize : 0x%X' % self.PayloadSize) -# noinspection PyTypeChecker class PFS_FTR(ctypes.LittleEndianStructure) : _pack_ = 1 _fields_ = [ @@ -58,12 +56,11 @@ class PFS_FTR(ctypes.LittleEndianStructure) : print('Checksum : 0x%0.8X' % self.Checksum) print('Tag : %s' % self.Tag.decode('utf-8')) -# noinspection PyTypeChecker class PFS_ENTRY(ctypes.LittleEndianStructure) : _pack_ = 1 _fields_ = [ ('GUID', uint32_t*4), # 0x00 Little Endian - ('HeaderVersion', uint32_t), # 0x10 + ('HeaderVersion', uint32_t), # 0x10 1 ('VersionType', uint8_t*4), # 0x14 ('Version', uint16_t*4), # 0x18 ('Reserved', uint64_t), # 0x20 @@ -93,7 +90,40 @@ class PFS_ENTRY(ctypes.LittleEndianStructure) : print('DataMetSigSize : 0x%X' % self.DataMetSigSize) print('Unknown : %s' % Unknown) -# noinspection PyTypeChecker +class PFS_ENTRY_R2(ctypes.LittleEndianStructure) : + _pack_ = 1 + _fields_ = [ + ('GUID', uint32_t*4), # 0x00 Little Endian + ('HeaderVersion', uint32_t), # 0x10 2 + ('VersionType', uint8_t*4), # 0x14 + ('Version', uint16_t*4), # 0x18 + ('Reserved', uint64_t), # 0x20 + ('DataSize', uint32_t), # 0x28 + ('DataSigSize', uint32_t), # 0x2C + ('DataMetSize', uint32_t), # 0x30 + ('DataMetSigSize', uint32_t), # 0x34 + ('Unknown', uint32_t*8), # 0x38 + # 0x58 + ] + + def pfs_print(self) : + GUID = ''.join('%0.8X' % int.from_bytes(struct.pack('