diff --git a/analyzers/GoogleSafebrowsing/safebrowsing_analyzer.py b/analyzers/GoogleSafebrowsing/safebrowsing_analyzer.py index ef23b40..b2e5ee3 100755 --- a/analyzers/GoogleSafebrowsing/safebrowsing_analyzer.py +++ b/analyzers/GoogleSafebrowsing/safebrowsing_analyzer.py @@ -21,20 +21,23 @@ class SafebrowsingAnalyzer(Analyzer): def summary(self, raw): - result = {"level":"info", "taxonomy":{"namespace": "Google", "predicate": "Safebrowsing", "value":0}} + taxonomy = {"level":"info", "namespace": "Google", "predicate": "Safebrowsing", "value":0} + taxonomies = [] if ("results" in raw): r = len(raw['results']) if r == 0 or r == 1: - result["taxonomy"]["value"] = "\"{} match\"".format(r) + taxonomy["value"] = "\"{} match\"".format(r) else: - result["taxonomy"]["value"] = "\"{} matches\"".format(r) + taxonomy["value"] = "\"{} matches\"".format(r) if r > 0: - result["level"] = "malicious" + taxonomy["level"] = "malicious" # level : info, safe, suspicious, malicious + taxonomies.append(taxonomy) + result = {"taxonomies": taxonomies} return result def run(self): diff --git a/thehive-templates/GoogleSafebrowsing_1_0/short.html b/thehive-templates/GoogleSafebrowsing_1_0/short.html index 2b5d99c..563ca58 100644 --- a/thehive-templates/GoogleSafebrowsing_1_0/short.html +++ b/thehive-templates/GoogleSafebrowsing_1_0/short.html @@ -1,3 +1,3 @@ - + {{t.namespace}}:{{t.predicate}}={{t.value}} - +