fix check issue

This commit is contained in:
Jérôme Leonard 2018-09-18 18:31:50 +02:00
parent c9cedcf700
commit 2b5def9ee1
No known key found for this signature in database
GPG Key ID: C5D0D898D56C3D9D

View File

@ -67,17 +67,18 @@ class PESubmodule(SubmoduleBaseclass):
def pe_info(self, pe):
pedict = pe.dump_dict()
table = []
for fileinfo in pe.FileInfo:
if hasattr(fileinfo, 'Key') and fileinfo.Key.decode() == 'StringFileInfo':
for stringtable in fileinfo.StringTable:
for entry in stringtable.entries.items():
table.append({'Info': entry[0].decode(), 'Value': entry[1].decode()})
if hasattr(pe, 'FileInfo'):
for fileinfo in pe.FileInfo:
if hasattr(fileinfo, 'Key') and fileinfo.Key.decode() == 'StringFileInfo':
for stringtable in fileinfo.StringTable:
for entry in stringtable.entries.items():
table.append({'Info': entry[0].decode(), 'Value': entry[1].decode()})
table.append({'Info': 'Compilation Timestamp',
'Value': self.compilation_timestamp(pedict)})
table.append({'Info': 'Target machine', 'Value': self.pe_machine(pedict)}),
table.append({'Info': 'Entry Point', 'Value': self.pe_entrypoint(pedict)})
return table
table.append({'Info': 'Compilation Timestamp',
'Value': self.compilation_timestamp(pedict)})
table.append({'Info': 'Target machine', 'Value': self.pe_machine(pedict)}),
table.append({'Info': 'Entry Point', 'Value': self.pe_entrypoint(pedict)})
return table
@staticmethod