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

pull/322/head
chrisr3d 2019-07-25 17:44:32 +02:00
parent 4c8fe9d8ef
commit 41bbbeddfb
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 2 additions and 1 deletions

View File

@ -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