diff --git a/bin/uefi-firmware-parser b/bin/uefi-firmware-parser index 82e2817..7fb393c 100755 --- a/bin/uefi-firmware-parser +++ b/bin/uefi-firmware-parser @@ -14,6 +14,9 @@ from uefi_firmware import AutoParser import uefi_firmware.utils # import nocolor def _process_show_extract(parsed_object): + if parsed_object is None: + return + global FILENAME if not args.quiet: parsed_object.showinfo('') diff --git a/uefi_firmware/__init__.py b/uefi_firmware/__init__.py index 4d30fab..ad8e10f 100644 --- a/uefi_firmware/__init__.py +++ b/uefi_firmware/__init__.py @@ -3,9 +3,6 @@ import os from . import uefi -from . import pfs -from . import me -from . import flash from .misc import checker from .base import FirmwareObject, RawObject, AutoRawObject diff --git a/uefi_firmware/uefi.py b/uefi_firmware/uefi.py index a3a5120..48e1518 100644 --- a/uefi_firmware/uefi.py +++ b/uefi_firmware/uefi.py @@ -850,6 +850,9 @@ def process(self): if raw_object: self.parsed_object = RawObject(self.data) status = True + elif isinstance(self.parsed_object, GuidDefinedSection): + self.parsed_object = None + return True return status def build(self, generate_checksum=False, debug=False): @@ -872,7 +875,6 @@ def build(self, generate_checksum=False, debug=False): string_size = struct.pack("