]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 20 Jul 2024 18:29:23 +0000 (20:29 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 20 Jul 2024 18:29:23 +0000 (20:29 +0200)
- don't reduce counter for obfuscated domains, keep it at original value
- some more debug messages added

fba/commands.py

index b33145aa06b6cc96a2f760347749a46200c04372..f97ad8fc36285aa45a9a78ce2ef7ec4dc9f41b07 100644 (file)
@@ -389,7 +389,7 @@ def fetch_blocks(args: argparse.Namespace) -> int:
                 logger.debug("block[blocked]='%s' is a fake domain - SKIPPED!", block["blocked"])
                 continue
             elif block["blocked"].find("*") >= 0:
-                logger.debug("blocker='%s' uses obfuscated domains", blocker)
+                logger.debug("blocker='%s' uses '*' for obfuscating domains", blocker)
                 instances.set_has_obfuscation(blocker, True)
                 obfuscated = obfuscated + 1
 
@@ -406,7 +406,7 @@ def fetch_blocks(args: argparse.Namespace) -> int:
                 origin           = row["origin"]
                 nodeinfo_url     = row["nodeinfo_url"]
             elif block["blocked"].find("?") >= 0:
-                logger.debug("blocker='%s' uses obfuscated domains", blocker)
+                logger.debug("blocker='%s' uses '?' for obfuscating domains", blocker)
                 instances.set_has_obfuscation(blocker, True)
                 obfuscated = obfuscated + 1
 
@@ -457,7 +457,9 @@ def fetch_blocks(args: argparse.Namespace) -> int:
                 logger.debug("Hash wasn't found, adding: block[blocked]'%s',blocker='%s'", block["blocked"], blocker)
                 federation.fetch_instances(block["blocked"], blocker, None, inspect.currentframe().f_code.co_name)
 
+            logger.debug("Invoking blocks.alias_block_level('%s') ... - BEFORE!", block["block_level"])
             block["block_level"] = blocks.alias_block_level(block["block_level"])
+            logger.debug("block[block_level]='%s' - AFTER!", block["block_level"])
 
             if processing.block(blocker, block["blocked"], block["reason"], block["block_level"]) and block["block_level"] in ["reject", "suspend"] and config.get("bot_enabled"):
                 logger.debug("Appending block[blocked]'%s',reason='%s' for blocker='%s' ...", block["blocked"], block["block_level"], blocker)
@@ -1433,7 +1435,6 @@ def recheck_obfuscation(args: argparse.Namespace) -> int:
             logger.debug("blocked[%s]='%s',block[blocked]='%s'", type(blocked), blocked, block["blocked"])
             if blocked is not None and blocked != block["blocked"]:
                 logger.debug("blocked='%s' was deobfuscated to blocked='%s'", block["blocked"], blocked)
-                obfuscated = obfuscated - 1
 
                 if blacklist.is_blacklisted(blocked):
                     logger.debug("blocked='%s' is blacklisted - SKIPPED!", blocked)