fix: Testing if there is some screenshot data before trying to fetch it

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

@ -146,10 +146,12 @@ class JoeParser():
relationship_type='initiates'))
def parse_screenshot(self):
screenshotdata = self.data['behavior']['screenshotdata']['interesting']['$']
attribute = {'type': 'attachment', 'value': 'screenshot.jpg',
'data': screenshotdata, 'disable_correlation': True}
self.misp_event.add_attribute(**attribute)
screenshotdata = self.data['behavior']['screenshotdata']
if screenshotdata:
screenshotdata = screenshotdata['interesting']['$']
attribute = {'type': 'attachment', 'value': 'screenshot.jpg',
'data': screenshotdata, 'disable_correlation': True}
self.misp_event.add_attribute(**attribute)
def parse_system_behavior(self):
system = self.data['behavior']['system']

Loading…
Cancel
Save