ukify: Use length= instead of ignore_padding= in inspect

ignore_padding= was only added in a recent version of pefile. Let's
set length= to the virtual size instead which is what ignore_padding
does behind the scenes so we're compatible with older versions of
pefile.
This commit is contained in:
Daan De Meyer
2023-08-10 19:35:21 +01:00
committed by Luca Boccassi
parent fc275ef315
commit c1e704626a
+2 -1
View File
@@ -958,8 +958,9 @@ def inspect_section(opts, section):
ttype = config.output_mode if config else DEFAULT_SECTIONS_TO_SHOW.get(name, 'binary')
data = section.get_data(ignore_padding=True)
size = section.Misc_VirtualSize
# TODO: Use ignore_padding once we can depend on a newer version of pefile
data = section.get_data(length=size)
digest = sha256(data).hexdigest()
struct = {