fix: Avoid issues when there is no pe field in a windows file sample analysis

- For instance: doc file
pull/322/head
chrisr3d 3 years ago
parent 3d41104d5b
commit 3367e47490
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
  1. 6
      misp_modules/lib/joe_parser.py

@ -281,7 +281,11 @@ class JoeParser():
relationship_type=relationship))
def parse_pe(self, fileinfo, file_object):
peinfo = fileinfo['pe']
try:
peinfo = fileinfo['pe']
except KeyError:
self.misp_event.add_object(**file_object)
return
pe_object = MISPObject('pe')
relationship = 'includes'
file_object.add_reference(pe_object.uuid, relationship)

Loading…
Cancel
Save