I added a utility command to extract all valid modules (regardless of their GUIDs) into a given folder. I find the result of UefiExtractor() easier to use and better organized than what UEFIExtract produces, so I thought this may be useful to others.
To ignore the GUIDs I had to refactor UefiExtractor.extract_all() to take the ignore_guids=True argument. This doesn't affect the other code as the loop is now conditioned by ignore_guids and the existing condition:
class UefiExtractor:
# ...
def extract_all(self, ignore_guid=False) -> None:
self._extract()
for guid in self._info:
if self._info[guid]["content"] is not None and \
(guid in self._file_guids or ignore_guid):
self.binaries.append(
UefiBinary(
content=self._info[guid]["content"],
name=self._info[guid]["name"],
guid=guid,
ext=self._info[guid]["ext"],
)
)
I added a utility command to extract all valid modules (regardless of their GUIDs) into a given folder. I find the result of
UefiExtractor()
easier to use and better organized than whatUEFIExtract
produces, so I thought this may be useful to others.To ignore the GUIDs I had to refactor
UefiExtractor.extract_all()
to take theignore_guids=True
argument. This doesn't affect the other code as the loop is now conditioned byignore_guids
and the existing condition:Signed-off-by: Federico Maggi federico.maggi@gmail.com