forked from Firepup650/FireBot
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
|
||||
try:
|
||||
hstDT = ipbl.check(hostname).detected_by
|
||||
except ValueError:
|
||||
hstDT = hsbl.check(hostname).detected_by
|
||||
except ValueError: # It's not an IP
|
||||
try:
|
||||
hstDT = hsbl.check(hostname).detected_by
|
||||
except ValueError: # It's also not a hostname
|
||||
hstDT = {}
|
||||
for host in hstDT:
|
||||
if hstDT[host] != ["unknown"]:
|
||||
hosts.append(host)
|
||||
|
|
Loading…
Reference in a new issue