AMI BIOS Guard Extractor v2.0

Any data after the end of PFAT, as dictated by the Main Header, are now appended to the final unpacked image.
This commit is contained in:
Plato Mavropoulos 2019-01-15 16:10:55 +02:00
parent bbfe1d3cc7
commit 9feaefff67

View file

@ -3,10 +3,10 @@
""" """
AMI PFAT Extract AMI PFAT Extract
AMI BIOS Guard Extractor AMI BIOS Guard Extractor
Copyright (C) 2018 Plato Mavropoulos Copyright (C) 2018-2019 Plato Mavropoulos
""" """
print('AMI BIOS Guard Extractor v1.0') print('AMI BIOS Guard Extractor v2.0')
import os import os
import sys import sys
@ -179,6 +179,8 @@ for input_file in pfat :
block_name = blocks[i][0] block_name = blocks[i][0]
block_start = block_data_end + block_rsa_size block_start = block_data_end + block_rsa_size
final_image += buffer[block_start:] # Append any data after the end of PFAT
with open('%s_unpacked.bin' % os.path.basename(input_file), 'wb') as final : final.write(final_image) with open('%s_unpacked.bin' % os.path.basename(input_file), 'wb') as final : final.write(final_image)
else : else :