fix: Testing if file & registry activities fields exist before trying to parse it

pull/322/head
chrisr3d 3 years ago
parent 4c8fe9d8ef
commit 41bbbeddfb
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
  1. 3
      misp_modules/lib/joe_parser.py

@ -167,7 +167,8 @@ class JoeParser():
process_object.add_attribute('start-time', **{'type': 'datetime', 'value': start_time})
self.misp_event.add_object(**process_object)
for field, to_call in process_activities.items():
to_call(process_object.uuid, process[field])
if process.get(field):
to_call(process_object.uuid, process[field])
self.references[self.analysisinfo_uuid].append(dict(referenced_uuid=process_object.uuid,
relationship_type='calls'))
self.process_references[(general['targetid'], general['path'])] = process_object.uuid

Loading…
Cancel
Save