From bdcb70c2c8ae1befea646e42006b9f0884c42725 Mon Sep 17 00:00:00 2001 From: Plato Mavropoulos Date: Tue, 4 Sep 2018 21:15:46 +0300 Subject: [PATCH] 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 --- Apple EFI File Renamer/Apple_EFI_Rename.py | 8 +++++--- Apple EFI IM4P Splitter/Apple_EFI_Split.py | 3 ++- Apple EFI Sucatalog Link Grabber/Apple_EFI_Links.py | 6 ++++-- Award BIOS Module Extractor/Award_BIOS_Extract.py | 10 +++++++--- Dell HDR Module Extractor/Dell_HDR_Extract.py | 10 ++++++---- 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/Apple EFI File Renamer/Apple_EFI_Rename.py b/Apple EFI File Renamer/Apple_EFI_Rename.py index 092c4b1..ae44813 100644 --- a/Apple EFI File Renamer/Apple_EFI_Rename.py +++ b/Apple EFI File Renamer/Apple_EFI_Rename.py @@ -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!') \ No newline at end of file diff --git a/Apple EFI IM4P Splitter/Apple_EFI_Split.py b/Apple EFI IM4P Splitter/Apple_EFI_Split.py index 8e8350c..46524d9 100644 --- a/Apple EFI IM4P Splitter/Apple_EFI_Split.py +++ b/Apple EFI IM4P Splitter/Apple_EFI_Split.py @@ -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)) diff --git a/Apple EFI Sucatalog Link Grabber/Apple_EFI_Links.py b/Apple EFI Sucatalog Link Grabber/Apple_EFI_Links.py index 3ab189e..65b9346 100644 --- a/Apple EFI Sucatalog Link Grabber/Apple_EFI_Links.py +++ b/Apple EFI Sucatalog Link Grabber/Apple_EFI_Links.py @@ -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!') \ No newline at end of file +input('\nDone!') \ No newline at end of file diff --git a/Award BIOS Module Extractor/Award_BIOS_Extract.py b/Award BIOS Module Extractor/Award_BIOS_Extract.py index 279e488..3e7118c 100644 --- a/Award BIOS Module Extractor/Award_BIOS_Extract.py +++ b/Award BIOS Module Extractor/Award_BIOS_Extract.py @@ -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 diff --git a/Dell HDR Module Extractor/Dell_HDR_Extract.py b/Dell HDR Module Extractor/Dell_HDR_Extract.py index 9842b93..22c6eaf 100644 --- a/Dell HDR Module Extractor/Dell_HDR_Extract.py +++ b/Dell HDR Module Extractor/Dell_HDR_Extract.py @@ -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!') \ No newline at end of file