Oversight in dnsbl checks

This commit is contained in:
Firepup Sixfifty 2024-05-20 14:59:55 -05:00
parent 49aa61417a
commit 971a889cc1
Signed by: Firepup650
GPG key ID: 7C92E2ABBBFAB9BA

View file

@ -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
try:
hstDT = hsbl.check(hostname).detected_by 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)