theopolis / uefi-firmware-parser

Parse BIOS/Intel ME/UEFI firmware related structures: Volumes, FileSystems, Files, etc
Other
780 stars 156 forks source link

Convert bytes to strings in `me.py` #85

Closed saruman9 closed 4 years ago

saruman9 commented 4 years ago

Error while parsing ME partition:

Traceback (most recent call last):
  File "/bin/uefi-firmware-parser", line 146, in <module>
    _process_show_extract(firmware)
  File "/bin/uefi-firmware-parser", line 30, in _process_show_extract
    parsed_object.dump(args.output)
  File "/usr/lib/python3.8/site-packages/uefi_firmware/__init__.py", line 134, in dump
    self.objs[i].dump(parent, i)
  File "/usr/lib/python3.8/site-packages/uefi_firmware/pfs.py", line 430, in dump
    section.dump(path)
  File "/usr/lib/python3.8/site-packages/uefi_firmware/pfs.py", line 342, in dump
    sub_object.dump(path)
  File "/usr/lib/python3.8/site-packages/uefi_firmware/base.py", line 187, in dump
    self.object.dump(parent)
  File "/usr/lib/python3.8/site-packages/uefi_firmware/me.py", line 680, in dump
    partition.dump(os.path.join(parent, "partitions"))
  File "/usr/lib/python3.8/site-packages/uefi_firmware/me.py", line 635, in dump
    self.manifest.dump(os.path.join(parent, self.structure.Name))
  File "/usr/lib/python3.8/posixpath.py", line 90, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/lib/python3.8/genericpath.py", line 155, in _check_arg_types
    raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components
saruman9 commented 4 years ago

All checks will be passed if #84 will be merged.

saruman9 commented 4 years ago

Dup #83.