Skip to content

Commit

Permalink
#270 wording in short report
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Jun 5, 2018
1 parent 39c3b24 commit 55f59b2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
14 changes: 14 additions & 0 deletions analyzers/UnshortenLink/unshortenlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ def artifacts(self, raw):
else:
return []

def summary(self, raw):
taxonomies = []
level = 'info'
namespace = 'UnshortenLink'
predicate = 'Result'
value = ''

if raw['found'] == True:
value='success'
else:
value='failure'
taxonomies.append(self.build_taxonomy(level, namespace, predicate, value))
return {'taxonomies': taxonomies}

def run(self):
Analyzer.run(self)

Expand Down
10 changes: 8 additions & 2 deletions thehive-templates/UnshortenLink_1_0/long.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
Unshorten Link for <strong>{{artifact.data | fang}}</strong>
</div>
<div class="panel-body">
<span>found:{{content.found}}</span>
<div ng-if="content.found">
<span>url:{{content.url | fang}}</span>
<dl class="dl-horizontal" ng-if="content.found">
<dt>Unshortened URL</dt>
<dd>{{content.url | fang}}</dd>
</dl>
</div>
<div ng-if="!content.found">
<span>The link could not be unshortened.</span>
</div>
</div>
</div>

<div class="panel panel-danger" ng-if="!success">
<div class="panel-heading">
<strong>{{artifact.data | fang}}</strong>
Expand Down
3 changes: 3 additions & 0 deletions thehive-templates/UnshortenLink_1_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>

0 comments on commit 55f59b2

Please sign in to comment.