Skip to content

Commit

Permalink
#59 Fix the summary method of MISP_search analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Jun 15, 2017
1 parent cf32bca commit 276c18c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion analyzers/MISP/misp_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from pymisp import PyMISP


class MISPAnalyzer(Analyzer):

def __init__(self):
Expand All @@ -15,6 +16,7 @@ def __init__(self):
self.api_key = self.get_param('config.key')
else:
self.api_key = self.get_param('config.api_key', None, 'MISP key for API is missing')

def summary(self, raw):
result = {
'service': self.service,
Expand All @@ -23,7 +25,7 @@ def summary(self, raw):

# search service
if self.service == 'search':
result['events'] = len(raw)
result['events'] = len(raw['events'])
else:
result['events'] = 0

Expand Down

0 comments on commit 276c18c

Please sign in to comment.