mirror of https://github.com/MISP/misp-modules
fix: Avoid issues when there is no pe field in a windows file sample analysis
- For instance: doc filepull/322/head
parent
3d41104d5b
commit
3367e47490
|
@ -281,7 +281,11 @@ class JoeParser():
|
||||||
relationship_type=relationship))
|
relationship_type=relationship))
|
||||||
|
|
||||||
def parse_pe(self, fileinfo, file_object):
|
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')
|
pe_object = MISPObject('pe')
|
||||||
relationship = 'includes'
|
relationship = 'includes'
|
||||||
file_object.add_reference(pe_object.uuid, relationship)
|
file_object.add_reference(pe_object.uuid, relationship)
|
||||||
|
|
Loading…
Reference in New Issue