Oversight in dnsbl checks
This commit is contained in:
parent
49aa61417a
commit
971a889cc1
1 changed files with 5 additions and 2 deletions
|
@ -128,8 +128,11 @@ def dnsbl(hostname: str) -> Union[str, None]:
|
||||||
hstDT = None
|
hstDT = None
|
||||||
try:
|
try:
|
||||||
hstDT = ipbl.check(hostname).detected_by
|
hstDT = ipbl.check(hostname).detected_by
|
||||||
except ValueError:
|
except ValueError: # It's not an IP
|
||||||
hstDT = hsbl.check(hostname).detected_by
|
try:
|
||||||
|
hstDT = hsbl.check(hostname).detected_by
|
||||||
|
except ValueError: # It's also not a hostname
|
||||||
|
hstDT = {}
|
||||||
for host in hstDT:
|
for host in hstDT:
|
||||||
if hstDT[host] != ["unknown"]:
|
if hstDT[host] != ["unknown"]:
|
||||||
hosts.append(host)
|
hosts.append(host)
|
||||||
|
|
Loading…
Reference in a new issue