From 971a889cc158d7d5f481b09848dd13b7132f9977 Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Mon, 20 May 2024 14:59:55 -0500 Subject: [PATCH] Oversight in dnsbl checks --- config.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index 432e23b..a297899 100644 --- a/config.py +++ b/config.py @@ -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)