#14 Update the analyzer summary method

This commit is contained in:
Nabil Adouani 2017-03-24 17:32:30 +01:00
parent b38ee31ec9
commit 9d25186d3f

View File

@ -21,10 +21,9 @@ class MISPAnalyzer(Analyzer):
# search service
if self.service == 'search':
if 'response' in raw and raw['response']:
result['results'] = len(raw['response'])
else:
result['results'] = 0
result['events'] = len(raw)
else:
result['events'] = 0
return result
@ -76,6 +75,9 @@ class MISPAnalyzer(Analyzer):
if 'id' in event:
event['url'] = self.url + '/events/view/' + event['id']
if 'publish_timestamp' in event:
event['publish_timestamp'] = long(event['publish_timestamp']) * 1000
events.append(event)
self.report(events)