chg: Add authenticode support in generate_file_objects

pull/700/head
Raphaël Vinot 2021-01-19 16:18:28 +01:00
parent da4f9e324a
commit 5e73bce618
1 changed files with 9 additions and 0 deletions

View File

@ -43,6 +43,15 @@ def make_objects(path):
to_return['references'] += s.ObjectReference
if peo:
if hasattr(peo, 'certificates') and hasattr(peo, 'signers'):
# special authenticode case for PE objects
for c in peo.certificates:
to_return['objects'].append(c)
for s in peo.signers:
to_return['objects'].append(s)
del peo.certificates
del peo.signers
del peo.sections
to_return['objects'].append(peo)
if peo.ObjectReference:
to_return['references'] += peo.ObjectReference