Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contrib/dell_extract_hdr: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 2: invalid start byte #101

Open
paulmenzel opened this issue May 13, 2021 · 2 comments

Comments

@paulmenzel
Copy link

Trying to extract HDR from the Dell OptiPlex 5055 1.1.25 firmware update file fails with the error below:

$ ~/src/uefi-firmware-parser/scripts/contrib/dell_extract_hdr.py ~/OptiPlex\ 5055\ Ryzen\ CPU_1.1.25.exe
Traceback (most recent call last):
  File "/home/joey/src/uefi-firmware-parser/scripts/contrib/dell_extract_hdr.py", line 38, in <module>
    data = fh.read()
  File "/pkg/python-3.8.9-1/lib/python3.8/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 2: invalid start byte
@paulmenzel
Copy link
Author

$ binwalk ~/OptiPlex\ 5055\ Ryzen\ CPU_1.1.25.exe

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             Microsoft executable, portable (PE)
266024        0x40F28         CRC32 polynomial table, little endian
270120        0x41F28         CRC32 polynomial table, big endian
274399        0x42FDF         Copyright string: "Copyright 1995-2010 Mark Adler "
304854        0x4A6D6         Copyright string: "Copyright 2009-2019"
305342        0x4A8BE         Copyright string: "Copyright 2009-2019"
502800        0x7AC10         Zlib compressed data, default compression
6502200       0x633738        Object signature in DER format (PKCS header length: 4, sequence length: 8662
6502341       0x6337C5        Certificate in DER format (x509 v3), header length: 4, sequence length: 1277
6503622       0x633CC6        Certificate in DER format (x509 v3), header length: 4, sequence length: 1309
6505590       0x634476        Object signature in DER format (PKCS header length: 4, sequence length: 5272
6505751       0x634517        Certificate in DER format (x509 v3), header length: 4, sequence length: 1066
6506821       0x634945        Certificate in DER format (x509 v3), header length: 4, sequence length: 1299
6508124       0x634E5C        Certificate in DER format (x509 v3), header length: 4, sequence length: 1548

@paulmenzel
Copy link
Author

After binwalk --extract ~/OptiPlex\ 5055\ Ryzen\ CPU_1.1.25.exe, the directory _OptiPlex 5055 Ryzen CPU_1.1.25.exe.extracted contains the (uncompressed) 16784441 bytes (≈ 16 MB) file 7AC10, which UEFITool is able to open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant