Skip to content

Commit

Permalink
#56 PhinshingInitiative() and short reports + bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Jun 18, 2017
1 parent 6a2d0dc commit 6e00de7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "PhishingInitiative_Lookup",
"version": "1.0",
"version": "2.0",
"author": "CERT-BDF",
"url": "https://github.com/CERT-BDF/Cortex-Analyzers",
"license": "AGPL-V3",
Expand Down
12 changes: 9 additions & 3 deletions analyzers/PhishingInitiative/phishinginitiative_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ def __init__(self):
'Missing PhishingInitiative API key')

def summary(self,raw):
return {
"status": raw["tag_label"]
}
taxonomy = {"level": "safe", "namespace": "PhishingInitiative", "predicate": "Status", "value": "Clean"}
taxonomies = []

if raw["tag_label"] == "phishing":
taxonomy['level'] = "malicious"
taxonomy['value'] = raw["tag_label"]
taxonomies.append(taxonomy)
result = {"taxonomies": taxonomies}
return result

def run(self):
Analyzer.run(self)
Expand Down
3 changes: 0 additions & 3 deletions thehive-templates/PhishingInitiative_Lookup_1_0/short.html

This file was deleted.

3 changes: 3 additions & 0 deletions thehive-templates/PhishingInitiative_Lookup_2_0/short.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<span class="label" ng-repeat="t in content.taxonomies" ng-class="{'info': 'label-info', 'safe': 'label-success', 'suspicious': 'label-warning', 'malicious':'label-danger'}[t.level]">
{{t.namespace}}:{{t.predicate}}={{t.value}}
</span>&nbsp;

0 comments on commit 6e00de7

Please sign in to comment.