vstinner / hachoir

Hachoir is a Python library to view and edit a binary stream field by field
http://hachoir.readthedocs.io/
GNU General Public License v2.0
604 stars 70 forks source link

Support PE32+ optional header #84

Closed Morilli closed 1 year ago

Morilli commented 1 year ago

I'm using hachoir in my project and just recently came across a failure because the PE exe parser only supports the optional PE32 header, not the PE32+ one.

Interestingly this is already marked in the code with a TODO, and adding support for it is relatively simple by just following the specification in https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#optional-header-image-only.

I've tested that with these changes applied, the previously failing exe file can now be parsed correctly.

nneonneo commented 1 year ago

Sorry, CI was broken. Can you rebase it and push again?