Skip to content

Commit

Permalink
#214 fix reputation reports
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeleonard committed Jul 12, 2018
1 parent a2c8ca2 commit 28e61a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions analyzers/DomainTools/domaintools_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def domaintools(self, data):
response = api.risk_evidence(data).response()

elif self.service == 'reputation' and self.data_type in ['domain', 'fqdn']:
response = api.reputation(data).response()
response = api.reputation(data, include_reasons=True).response()

elif self.service == 'reverse-whois':
response = api.reverse_whois(data, mode='purchase').response()
Expand Down Expand Up @@ -99,6 +99,8 @@ def summary(self, raw):

if "risk_score" in raw:
r["risk_score"] = raw["risk_score"]
if "reasons" in raw:
r["reputation"] = True

taxonomies = []

Expand Down Expand Up @@ -129,9 +131,10 @@ def summary(self, raw):
taxonomies.append(
self.build_taxonomy("info", "DT", "Whois", "REGISTRANT:{}".format(r["registrant"])))


if "risk_score" in r:
risk_service = "Risk"
if "reasons" in r:
if "reputation" in r:
risk_service = "Reputation"
if r["risk_score"] == 0:
level = "safe"
Expand Down
4 changes: 2 additions & 2 deletions thehive-templates/DomainTools_Reputation_2_0/long.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</div>
<div class="panel-body">
<dl class="dl-horizontal">
<dt>Domaintools Risk Score</dt>
<dt>Domaintools Reputation</dt>
<dd>
<span class="label" ng-class="{'label-success' : content.risk_score == 0, 'label-warning' : content.risk_score > 0 && content.risk_score <= 50,
'label-danger': content.risk_score > 50}">
Expand All @@ -27,7 +27,7 @@
<dt>Reasons</dt>
<dd>
<span ng-repeat="r in content.reasons " class="label label-primary mr-xxxs">
{{content.risk_score}}
{{r}}
</span>

</dd>
Expand Down

0 comments on commit 28e61a1

Please sign in to comment.