mirror of
https://github.com/valitydev/Cortex-Analyzers.git
synced 2024-11-06 17:15:21 +00:00
#14 Update the analyzer summary method
This commit is contained in:
parent
b38ee31ec9
commit
9d25186d3f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user