BIOSUtilities v24.11.10

Re-written public attributes of Apple EFI ID
Improved memory consumption for all utilities
Adjusted README with consolidated requirements
This commit is contained in:
Plato Mavropoulos 2024-11-11 01:18:34 +02:00
parent 29dabc7401
commit 35564f31b7
19 changed files with 252 additions and 198 deletions

View file

@ -20,7 +20,7 @@ import pefile
from dissect.util.compression import lznt1
from biosutilities.common.compression import is_szip_supported, szip_decompress
from biosutilities.common.paths import delete_file, is_access, is_file, path_files, make_dirs, path_stem, safe_name
from biosutilities.common.paths import delete_file, is_file_read, path_files, make_dirs, path_stem, safe_name
from biosutilities.common.executables import ms_pe_desc, ms_pe, is_ms_pe, ms_pe_info_show
from biosutilities.common.patterns import PAT_MICROSOFT_CAB
from biosutilities.common.system import printer
@ -97,7 +97,7 @@ class PanasonicBiosExtract(BIOSUtility):
def _panasonic_pkg_name(input_object: str | bytes | bytearray) -> str:
""" Get Panasonic BIOS Package file name, when applicable """
if isinstance(input_object, str) and is_file(in_path=input_object):
if isinstance(input_object, str) and is_file_read(in_path=input_object):
return safe_name(in_name=path_stem(in_path=input_object))
return ''
@ -129,7 +129,7 @@ class PanasonicBiosExtract(BIOSUtility):
delete_file(in_path=cab_path) # Successful extraction, delete CAB archive
for extracted_file_path in path_files(in_path=extract_path):
if is_file(in_path=extracted_file_path) and is_access(in_path=extracted_file_path):
if is_file_read(in_path=extracted_file_path):
extracted_pe_file: pefile.PE | None = ms_pe(
in_file=extracted_file_path, padding=padding, silent=True)