Skip to content

Commit

Permalink
#41 change summary() to get interesting information only
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Apr 26, 2017
1 parent d2f6cf4 commit e37b412
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions analyzers/Yara/yara_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self):
if os.path.isfile(rulepath + '/index.yas'):
self.ruleset.append(yara.load(rulepath + '/index.yas'))
elif os.path.isfile(rulepath + '/index.yar'):
self.ruleset.append(yara.compile(rulepath + '/index.yar'))
self.ruleset.append(yara.load(rulepath + '/index.yar'))

def check(self, file):
"""
Expand All @@ -45,7 +45,7 @@ def check(self, file):
return result

def summary(self, raw):
return raw
return {"matches":len(raw["results"])}

def run(self):
if self.data_type == 'file':
Expand Down

0 comments on commit e37b412

Please sign in to comment.