Skip to content

Commit

Permalink
#14 Update the analyzer summary method
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Mar 24, 2017
1 parent b38ee31 commit 9d25186
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions analyzers/MISP/misp_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ def summary(self, raw):

# 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

Expand Down Expand Up @@ -76,6 +75,9 @@ def run(self):
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)
Expand Down

0 comments on commit 9d25186

Please sign in to comment.