From a3c7bf4e49862fe31c1e8c2f597f24e86a088ac7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 3 Oct 2023 15:32:29 +0200 Subject: [PATCH] Continued: - also set has_obfuscation here, too --- fba/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fba/utils.py b/fba/utils.py index dd12f30..6e46d60 100644 --- a/fba/utils.py +++ b/fba/utils.py @@ -125,6 +125,7 @@ def deobfuscate(domain: str, blocker: str, domain_hash: str = None) -> str: if domain.find("*") >= 0: logger.debug("blocker='%s' uses obfuscated domains", blocker) + instances.set_has_obfuscation(blocker, True) # Obscured domain name with no hash row = instances.deobfuscate("*", domain, domain_hash) @@ -135,9 +136,9 @@ def deobfuscate(domain: str, blocker: str, domain_hash: str = None) -> str: domain = row["domain"] else: logger.warning("blocker='%s' has domain='%s' that cannot be deobfuscated.", blocker, domain) - instances.set_has_obfuscation(blocker, True) elif domain.find("?") >= 0: logger.debug("blocker='%s' uses obfuscated domains", blocker) + instances.set_has_obfuscation(blocker, True) # Obscured domain name with no hash row = instances.deobfuscate("?", domain, domain_hash) @@ -148,7 +149,6 @@ def deobfuscate(domain: str, blocker: str, domain_hash: str = None) -> str: domain = row["domain"] else: logger.warning("blocker='%s' has domain='%s' that cannot be deobfuscated.", blocker, domain) - instances.set_has_obfuscation(blocker, True) else: logger.debug("domain='%s' is not obfuscated", domain) -- 2.39.5