Skip to content

Commit

Permalink
Merge branch 'mlodic-develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Mar 23, 2019
2 parents d2e6466 + 467304a commit c192220
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 1 deletion.
2 changes: 1 addition & 1 deletion analyzers/AbuseIPDB/abuseipdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def run(self):
def summary(self, raw):
taxonomies = []

if raw and 'values' in raw:
if raw and 'values' in raw and len(raw['values']) > 0 :
taxonomies.append(self.build_taxonomy('malicious', 'AbuseIPDB', 'Records', len(raw['values'])))
else:
taxonomies.append(self.build_taxonomy('safe', 'AbuseIPDB', 'Records', 0))
Expand Down
57 changes: 57 additions & 0 deletions thehive-templates/AbuseIPDB_1_0/long.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<div class="panel panel-danger" ng-if="success && content.values.length > 0">
<div class="panel-heading">
AbuseIPDB Report for {{artifact.data | fang}}
</div>
<div class="panel-body">
<table class="table table-striped" ng-if="content.values">
<thead>
<tr>
<th>Created Date</th>
<th>Abuse Confidence Score</th>
<th>ISO Code</th>
<th>Country</th>
<th>Withelisted</th>
<th>Categories</th>

</tr>
</thead>
<tbody>
<tr ng-repeat="r in content.values | orderBy:'-created'">
<td>{{r.created}}</td>
<td><span class="text"
ng-class="{ 'text-danger': r.abuseConfidenceScore >=70 ,'text-warning': r.abuseConfidenceScore < 70, 'text-success': r.abuseConfidenceScore == 0}">{{r.abuseConfidenceScore}}</span></td>
<td>{{r.isoCode}}</td>
<td>{{r.country}}</td>
<td>{{r.isWhitelisted}}</td>
<td>
<span ng-repeat="c in r.categories_strings"><span class="label label-primary">{{c}}</span> </span>
</td>

</tr>
</tbody>
</table>
</div>
</div>
<div class="panel panel-success" ng-if="success && content.values.length == 0">
<div class="panel-heading">
AbuseIPDB Report
</div>
<div class="panel-body">
<span>No matches.</span>
</div>
</div>

<!-- General error -->
<div class="panel panel-danger" ng-if="!success">
<div class="panel-heading">
<strong>{{(artifact.data || artifact.attachment.name) | fang}}</strong>
</div>
<div class="panel-body">
<dl class="dl-horizontal" ng-if="content.errorMessage">
<dt><i class="fa fa-warning"></i> AbuseIPDB:</dt>
<dd class="wrap">{{content.errorMessage}}</dd>
</dl>
</div>
</div>


3 changes: 3 additions & 0 deletions thehive-templates/AbuseIPDB_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="{'safe': 'label-success', 'malicious':'label-danger'}[t.level]">
{{t.namespace}}:{{t.predicate}}="{{t.value}}"
</span>

0 comments on commit c192220

Please sign in to comment.