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:
committed by
Luca Boccassi
parent
fc275ef315
commit
c1e704626a
+2
-1
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user