From 5c5577b97dd766cb473c4ff5071234bf71dffb0a Mon Sep 17 00:00:00 2001 From: "Fafner [_KeyZee_]" Date: Tue, 17 Mar 2020 16:26:31 +0100 Subject: [PATCH 1/2] Fixing Unknown domain if only_global_lookups is set --- lookyloo/lookyloo.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lookyloo/lookyloo.py b/lookyloo/lookyloo.py index 404fa6ef..fce24a7f 100644 --- a/lookyloo/lookyloo.py +++ b/lookyloo/lookyloo.py @@ -191,7 +191,11 @@ class Lookyloo(): splitted_url = urlsplit(url) if splitted_url.netloc: if splitted_url.hostname: - ip = socket.gethostbyname(splitted_url.hostname) + try: + ip = socket.gethostbyname(splitted_url.hostname) + except socket.gaierror, err:: + self.logger.info(f'Name or service not known') + return False if not ipaddress.ip_address(ip).is_global: return False else: From 3a8b7e60772b6647d0782ab46e8461150a260da4 Mon Sep 17 00:00:00 2001 From: "Fafner [_KeyZee_]" Date: Tue, 17 Mar 2020 16:32:39 +0100 Subject: [PATCH 2/2] Fixing Unknown domain if only_global_lookups is set --- lookyloo/lookyloo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lookyloo/lookyloo.py b/lookyloo/lookyloo.py index fce24a7f..7760c745 100644 --- a/lookyloo/lookyloo.py +++ b/lookyloo/lookyloo.py @@ -193,7 +193,7 @@ class Lookyloo(): if splitted_url.hostname: try: ip = socket.gethostbyname(splitted_url.hostname) - except socket.gaierror, err:: + except socket.gaierror: self.logger.info(f'Name or service not known') return False if not ipaddress.ip_address(ip).is_global: