fix: Avoid exception when IPs are empty lists

pull/860/head
Raphaël Vinot 2024-01-08 16:35:59 +01:00
parent d60a4e56db
commit 5c9dd1eda0
1 changed files with 1 additions and 1 deletions

View File

@ -699,7 +699,7 @@ class Lookyloo():
'asns': {}, # ASN: [list of contacts from whois]
'all_emails': set()
}
to_return['ips'] = {ip: self.uwhois.whois(ip, contact_email_only=True) for ip in hostnode.resolved_ips['v4'] | hostnode.resolved_ips['v6']}
to_return['ips'] = {ip: self.uwhois.whois(ip, contact_email_only=True) for ip in set(hostnode.resolved_ips['v4']) | set(hostnode.resolved_ips['v6'])}
to_return['asns'] = {asn['asn']: self.uwhois.whois(f'AS{asn["asn"]}', contact_email_only=True) for asn in hostnode.ipasn.values()}
# try to get contact from security.txt file