adding subdomain check

pull/907/head
Adrian Maraj 2024-04-09 09:10:50 +02:00 committed by Raphaël Vinot
parent ebc6237f4b
commit daf5102e8b
1 changed files with 5 additions and 2 deletions

View File

@ -772,8 +772,11 @@ class Lookyloo():
domains = config['domain']['ignore']
pattern = r"(https?://)?(www\d?\.)?(?P<domain>[\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 = []