From 7ae99eda1837b39fcd3c7ec4b90c4e8fb5a899b1 Mon Sep 17 00:00:00 2001 From: Adrian Maraj Date: Tue, 9 Apr 2024 09:10:50 +0200 Subject: [PATCH] adding subdomain check --- lookyloo/lookyloo.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lookyloo/lookyloo.py b/lookyloo/lookyloo.py index c4ccd5a..7d47e8e 100644 --- a/lookyloo/lookyloo.py +++ b/lookyloo/lookyloo.py @@ -772,8 +772,11 @@ class Lookyloo(): domains = config['domain']['ignore'] pattern = r"(https?://)?(www\d?\.)?(?P[\w\.-]+\.\w+)(/\S*)?" match = re.match(pattern, hostnode.name) - if match and match.group("domain") in domains: - return None + if match: + for regex in domains: + ignore_domain = ".*\." + regex + "$" + if re.match(ignore_domain, match.group("domain")) and regex.strip(): + return None result = self.takedown_details(hostnode) #ignoring mails final_mails = []