mirror of
https://github.com/valitydev/Cortex-Analyzers.git
synced 2024-11-06 09:05:19 +00:00
Update EmailRep analyzer
Catch up the latest API response schema
This commit is contained in:
parent
7693831902
commit
d1d9df2832
@ -14,17 +14,17 @@ class EmailRepAnalyzer(Analyzer):
|
||||
level = "info"
|
||||
namespace = "EmailRep"
|
||||
|
||||
score = raw.get("score")
|
||||
if score is not None:
|
||||
score = int(score)
|
||||
if score < 50:
|
||||
level = "suspicious"
|
||||
else:
|
||||
level = "safe"
|
||||
suspicious = raw.get("suspicious", False)
|
||||
if suspicious:
|
||||
level = "suspicious"
|
||||
else:
|
||||
level = "safe"
|
||||
|
||||
taxonomies.append(
|
||||
self.build_taxonomy(level, namespace, "Reputation", score)
|
||||
)
|
||||
references = raw.get("references", 0)
|
||||
|
||||
taxonomies.append(
|
||||
self.build_taxonomy(level, namespace, "References", references)
|
||||
)
|
||||
|
||||
return {"taxonomies": taxonomies}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="report" ng-if="success">
|
||||
<div class="report-SecurityTrails" ng-if="success">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
emailrep.io lookup ({{ content.mail || "-" }})
|
||||
@ -9,17 +9,21 @@
|
||||
</div>
|
||||
<div ng-if="(content | json) !== '{}'">
|
||||
<dl class=" dl-horizontal">
|
||||
<dt>Score:</dt>
|
||||
<dd class="wrap">{{ content.score || "-" }}</dd>
|
||||
<dt>Reputation:</dt>
|
||||
<dd class="wrap">{{ content.reputation || "-" }}</dd>
|
||||
</dl>
|
||||
<dl class=" dl-horizontal">
|
||||
<dt>Suspicious:</dt>
|
||||
<dd class="wrap">{{ content.suspicious || "-" }}</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>References:</dt>
|
||||
<dd class="wrap">{{ content.references || "-" }}</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal" ng-if="content.profiles.length !== 0">
|
||||
<dl class="dl-horizontal" ng-if="content.details.profiles.length !== 0">
|
||||
<dt>Profiles:</dt>
|
||||
<dd class="wrap">
|
||||
<ul ng-repeat="profile in content.profiles">
|
||||
<ul ng-repeat="profile in content.details.profiles">
|
||||
<li>{{ profile }}</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
Loading…
Reference in New Issue
Block a user