Skip to content

Commit

Permalink
fix infos_domain
Browse files Browse the repository at this point in the history
  • Loading branch information
dadokkio committed Apr 21, 2020
1 parent 38e5cbd commit 451fcba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
16 changes: 8 additions & 8 deletions analyzers/Shodan/shodan_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ def summary(self, raw):
if 'asn' in raw['host']:
taxonomies.append(self.build_taxonomy(level, namespace, 'ASN', raw['host']['asn']))
elif self.service == 'info_domain':
if 'ips' in raw['infos_domain']:
value = "{}".format(len(raw['infos_domain']['ips']))
if 'ips' in raw['info_domain']:
value = "{}".format(len(raw['info_domain']['ips']))
taxonomies.append(self.build_taxonomy(level, namespace, 'IPs', value))
if 'all_domains' in raw['infos_domain']:
value = "{}".format(len(raw['infos_domain']['all_domains']))
if 'all_domains' in raw['info_domain']:
value = "{}".format(len(raw['info_domain']['all_domains']))
taxonomies.append(self.build_taxonomy(level, namespace, 'Domains', value))
if 'asn' in raw['infos_domain']:
value = "{}".format(len(raw['infos_domain']['asn']))
if 'asn' in raw['info_domain']:
value = "{}".format(len(raw['info_domain']['asn']))
taxonomies.append(self.build_taxonomy(level, namespace, 'ASNs', value))
if 'isp' in raw['infos_domain']:
value = "{}".format(len(raw['infos_domain']['isp']))
if 'isp' in raw['info_domain']:
value = "{}".format(len(raw['info_domain']['isp']))
taxonomies.append(self.build_taxonomy(level, namespace, 'ISPs', value))
elif self.service == 'dns_resolve':
value = "{}".format(len(raw['records']))
Expand Down
22 changes: 11 additions & 11 deletions thehive-templates/Shodan_InfoDomain_1_0/long.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,54 @@
<dl class="dl-horizontal">
<dt>ASN</dt>
<dd>
{{content.infos_domain.asn.join(', ') || '-'}}
{{content.info_domain.asn.join(', ') || '-'}}
</dd>
</dl>
<dl class="dl-horizontal">
<dt>ISP</dt>
<dd>
<span ng-if="content.infos_domain.isp.length === 0">-</span>
<span ng-if="content.info_domain.isp.length === 0">-</span>
<ul class="list-unstyled">
<li data-ng-repeat=" i in content.infos_domain.isp">{{i}}</li>
<li data-ng-repeat=" i in content.info_domain.isp">{{i}}</li>
</ul>
</dd>
</dl>
<dl class="dl-horizontal">
<dt>Domains</dt>
<dd>
<span ng-if="content.infos_domain.all_domains.length === 0">-</span>
<span ng-if="content.info_domain.all_domains.length === 0">-</span>
<ul class="list-unstyled">
<li data-ng-repeat="i in content.infos_domain.all_domains">{{i | fang}}</li>
<li data-ng-repeat="i in content.info_domain.all_domains">{{i | fang}}</li>
</ul>
</dd>
</dl>
<dl class="dl-horizontal">
<dt>Ports</dt>
<dd>
{{content.infos_domain.ports.join(', ') || '-'}}
{{content.info_domain.ports.join(', ') || '-'}}
</dd>
</dl>
<dl class="dl-horizontal">
<dt>Orgs</dt>
<dd>
<span ng-if="content.infos_domain.orgs.length === 0">-</span>
<span ng-if="content.info_domain.orgs.length === 0">-</span>
<ul class="list-unstyled">
<li data-ng-repeat="i in content.infos_domain.orgs">{{i}}</li>
<li data-ng-repeat="i in content.info_domain.orgs">{{i}}</li>
</ul>
</dd>
</dl>
<dl class="dl-horizontal">
<dt>Transports</dt>
<dd>
{{content.infos_domain.transports.join(', ') || '-'}}
{{content.info_domain.transports.join(', ') || '-'}}
</dd>
</dl>
<dl class="dl-horizontal">
<dt>IPs</dt>
<dd>
<span ng-if="content.infos_domain.ips.length === 0">-</span>
<span ng-if="content.info_domain.ips.length === 0">-</span>
<ul class="list-unstyled">
<li data-ng-repeat="i in content.infos_domain.ips">{{i | fang}}</li>
<li data-ng-repeat="i in content.info_domain.ips">{{i | fang}}</li>
</ul>
</dd>
</dl>
Expand Down

0 comments on commit 451fcba

Please sign in to comment.