From: Roland Häder Date: Tue, 12 Sep 2023 07:40:21 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c03c7c611e39c60ccd69b6fc6f0fb0e5e05a7af8;p=fba.git Continued: - has_obfuscation should be only an indicator if a single domain is obfuscated then this should be set to True, otherwise False --- diff --git a/fba/commands.py b/fba/commands.py index 9089cd3..1d89306 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -1633,10 +1633,6 @@ def recheck_obfuscation(args: argparse.Namespace) -> int: instances.set_obfuscated_blocks(row["domain"], obfuscated) logger.info("domain='%s' has %d obfuscated domain(s)", row["domain"], obfuscated) - if obfuscated == 0 and len(blocking) > 0: - logger.info("Block list from domain='%s' has been fully deobfuscated.", row["domain"]) - instances.set_has_obfuscation(row["domain"], False) - if instances.has_pending(row["domain"]): logger.debug("Flushing updates for blocker='%s' ...", row["domain"]) instances.update(row["domain"]) diff --git a/fba/utils.py b/fba/utils.py index 18e4712..dd12f30 100644 --- a/fba/utils.py +++ b/fba/utils.py @@ -120,6 +120,9 @@ def deobfuscate(domain: str, blocker: str, domain_hash: str = None) -> str: elif not isinstance(domain_hash, str) and domain_hash is not None: raise ValueError(f"Parameter domain_hash[]='{type(domain_hash)}' is not of type 'str'") + logger.debug("Setting has_obfuscation=False for blocker='%s' ...", blocker) + instances.set_has_obfuscation(blocker, False) + if domain.find("*") >= 0: logger.debug("blocker='%s' uses obfuscated domains", blocker)