mirror of
https://github.com/platomav/BIOSUtilities.git
synced 2025-05-12 22:26:13 -04:00
Updated all scripts to v1.1
Added "Working..." indicators while running at all scripts Added dependency filename expectations when required Apple EFI File Renamer now saves the checksum in hex
This commit is contained in:
parent
25cf901460
commit
bdcb70c2c8
5 changed files with 24 additions and 13 deletions
|
@ -6,7 +6,7 @@ Apple EFI File Renamer
|
|||
Copyright (C) 2018 Plato Mavropoulos
|
||||
"""
|
||||
|
||||
print('Apple EFI File Renamer v1.0\n')
|
||||
print('Apple EFI File Renamer v1.1\n')
|
||||
|
||||
import os
|
||||
import re
|
||||
|
@ -24,6 +24,7 @@ else :
|
|||
# Folder path
|
||||
apple_efi = []
|
||||
in_path = input('\nEnter the full folder path: ')
|
||||
print('\nWorking...')
|
||||
for root, dirs, files in os.walk(in_path):
|
||||
for name in files :
|
||||
apple_efi.append(os.path.join(root, name))
|
||||
|
@ -73,11 +74,12 @@ for input_file in apple_efi :
|
|||
|
||||
file_chk = zlib.adler32(buffer) & 0xFFFFFFFF # Checksum for EFI with same $IBIOSI$ but different PRD/PRE status
|
||||
|
||||
file_path_new = os.path.join(file_dir, '%s_%s_%s_20%s-%s-%s_%s-%s_%s%s' % (model, version, build, year, month, day, hour, minute, file_chk, file_ext))
|
||||
file_path_new = os.path.join(file_dir, '%s_%s_%s_20%s-%s-%s_%s-%s_%0.8X%s' % (model, version, build, year, month, day, hour, minute, file_chk, file_ext))
|
||||
|
||||
if not os.path.isfile(file_path_new) : os.replace(file_path, file_path_new) # Rename input EFI with proper name
|
||||
|
||||
else :
|
||||
print('Error: Could not find $IBIOSI$ pattern at %s!\n' % file_name)
|
||||
print('Error: Could not find $IBIOSI$ pattern at %s!' % file_name)
|
||||
print(' Make sure that "UEFIFind" and "UEFIExtract" executables exist!\n')
|
||||
|
||||
input('Done!')
|
|
@ -6,7 +6,7 @@ Apple EFI IM4P Splitter
|
|||
Copyright (C) 2018 Plato Mavropoulos
|
||||
"""
|
||||
|
||||
print('Apple EFI IM4P Splitter v1.0\n')
|
||||
print('Apple EFI IM4P Splitter v1.1\n')
|
||||
|
||||
import os
|
||||
import re
|
||||
|
@ -22,6 +22,7 @@ else :
|
|||
# Folder path
|
||||
apple_im4p = []
|
||||
in_path = input('\nEnter the full folder path: ')
|
||||
print('\nWorking...')
|
||||
for root, dirs, files in os.walk(in_path):
|
||||
for name in files :
|
||||
apple_im4p.append(os.path.join(root, name))
|
||||
|
|
|
@ -6,7 +6,7 @@ Apple EFI Sucatalog Link Grabber
|
|||
Copyright (C) 2018 Plato Mavropoulos
|
||||
"""
|
||||
|
||||
print('Apple EFI Sucatalog Link Grabber v1.0\n')
|
||||
print('Apple EFI Sucatalog Link Grabber v1.1\n')
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
@ -27,6 +27,8 @@ else :
|
|||
if name.endswith('.sucatalog') :
|
||||
catalogs.append(os.path.join(root, name))
|
||||
|
||||
print('Working...')
|
||||
|
||||
# Parse each input xml file
|
||||
for input_file in catalogs :
|
||||
with open(input_file, 'r') as in_file :
|
||||
|
@ -56,4 +58,4 @@ if os.path.isfile('OUT.txt') :
|
|||
|
||||
os.remove('OUT.txt') # Remove temporary output file
|
||||
|
||||
input('Done!')
|
||||
input('\nDone!')
|
|
@ -9,7 +9,7 @@ https://ist.uwaterloo.ca/~schepers/formats/LHA.TXT
|
|||
https://sites.google.com/site/pinczakko/pinczakko-s-guide-to-award-bios-reverse-engineering
|
||||
"""
|
||||
|
||||
print('Award BIOS Module Extractor v1.0\n')
|
||||
print('Award BIOS Module Extractor v1.1\n')
|
||||
|
||||
import os
|
||||
import re
|
||||
|
@ -23,6 +23,7 @@ else :
|
|||
# Folder path
|
||||
awd_images = []
|
||||
in_path = input('\nEnter the full folder path: ')
|
||||
print('\nWorking...')
|
||||
for root, dirs, files in os.walk(in_path):
|
||||
for name in files :
|
||||
awd_images.append(os.path.join(root, name))
|
||||
|
@ -51,8 +52,11 @@ for in_file in awd_images :
|
|||
|
||||
with open('mod_temp.bin', 'wb') as lzh_img : lzh_img.write(mod_data)
|
||||
|
||||
try : decomp = subprocess.run(['7z', 'x', '-bso0', '-bse0', '-bsp0', '-o%s' % os.path.join(extr_path, file_name), 'mod_temp.bin']) # 7-Zip
|
||||
except : print('Error: Could not decompress LZH image at %s!\n' % file_name)
|
||||
try :
|
||||
decomp = subprocess.run(['7z', 'x', '-bso0', '-bse0', '-bsp0', '-o%s' % os.path.join(extr_path, file_name), 'mod_temp.bin']) # 7-Zip
|
||||
except :
|
||||
print('Error: Could not decompress LZH image at %s!' % file_name)
|
||||
print(' Make sure that "7z" executable exists!\n')
|
||||
|
||||
os.remove('mod_temp.bin') # Remove temporary LZH image
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Copyright (C) 2018 Plato Mavropoulos
|
|||
Inspired from https://forums.mydigitallife.net/threads/i-present-you-a-tool-to-decompress-dell-uefi-bios.44785/ by JimboBobB
|
||||
"""
|
||||
|
||||
print('Dell HDR Module Extractor v1.0\n')
|
||||
print('Dell HDR Module Extractor v1.1\n')
|
||||
|
||||
import os
|
||||
import re
|
||||
|
@ -22,6 +22,7 @@ else :
|
|||
# Folder path
|
||||
hdr_exec = []
|
||||
in_path = input('\nEnter the full folder path: ')
|
||||
print('\nWorking...')
|
||||
for root, dirs, files in os.walk(in_path):
|
||||
for name in files :
|
||||
hdr_exec.append(os.path.join(root, name))
|
||||
|
@ -63,15 +64,16 @@ for input_file in hdr_exec :
|
|||
|
||||
print('\n Decompressed %s%s via Python' % (input_name, input_extension))
|
||||
|
||||
# Call LongSoft's PFSExtractor RS to extract the Dell HDR container
|
||||
# Call LongSoft's PFSExtractor-RS to extract the Dell HDR container
|
||||
try :
|
||||
subprocess.run(['PFSExtractor', output_name], check = True, stdout = subprocess.DEVNULL)
|
||||
|
||||
if os.path.isfile(output_name) : os.remove(output_name)
|
||||
|
||||
print(' Extracted %s via PFSExtractor' % output_name)
|
||||
print(' Extracted %s via PFSExtractor-RS' % output_name)
|
||||
except :
|
||||
print(' Error: Could not extract %s via PFSExtractor!' % output_name)
|
||||
print(' Error: Could not extract %s via PFSExtractor-RS!' % output_name)
|
||||
print(' Make sure that "PFSExtractor" executable exists!')
|
||||
|
||||
else :
|
||||
input('\nDone!')
|
Loading…
Add table
Add a link
Reference in a new issue