]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 22 Jun 2023 16:41:53 +0000 (18:41 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 22 Jun 2023 16:41:53 +0000 (18:41 +0200)
- tpzo fixed, you have to run following SQL:
  ALTER TABLE instances RENAME has_obsfucation TO has_obfucation

api.py
blocks_empty.db
fba/commands.py
fba/models/instances.py
fba/networks/mastodon.py
fba/networks/pleroma.py
fba/utils.py
templates/views/index.html
templates/views/scoreboard.html

diff --git a/api.py b/api.py
index 60d0c5774fe3e1361a84662d508e65f6aa20725b..d7d104e54583fdcd94b3ec9c91f9c6e508ad4142 100644 (file)
--- a/api.py
+++ b/api.py
@@ -71,10 +71,10 @@ def api_scoreboard(mode: str, amount: int):
         database.cursor.execute("SELECT last_status_code, COUNT(domain) AS score FROM instances WHERE last_status_code IS NOT NULL AND last_status_code != '200' GROUP BY last_status_code ORDER BY score DESC LIMIT ?", [amount])
     elif mode == "avg_peers":
         database.cursor.execute("SELECT software, AVG(total_peers) AS average FROM instances WHERE software IS NOT NULL GROUP BY software HAVING average>0 ORDER BY average DESC LIMIT ?", [amount])
-    elif mode == "obsfucator":
-        database.cursor.execute("SELECT software, COUNT(domain) AS cnt FROM instances WHERE has_obsfucation = 1 GROUP BY software ORDER BY cnt DESC LIMIT ?", [amount])
-    elif mode == "obsfucation":
-        database.cursor.execute("SELECT has_obsfucation, COUNT(domain) AS cnt FROM instances WHERE software IN ('pleroma', 'mastodon') GROUP BY has_obsfucation ORDER BY cnt DESC LIMIT ?", [amount])
+    elif mode == "obfucator":
+        database.cursor.execute("SELECT software, COUNT(domain) AS cnt FROM instances WHERE has_obfucation = 1 GROUP BY software ORDER BY cnt DESC LIMIT ?", [amount])
+    elif mode == "obfucation":
+        database.cursor.execute("SELECT has_obfucation, COUNT(domain) AS cnt FROM instances WHERE software IN ('pleroma', 'mastodon') GROUP BY has_obfucation ORDER BY cnt DESC LIMIT ?", [amount])
     else:
         raise HTTPException(status_code=400, detail="No filter specified")
 
@@ -181,10 +181,10 @@ def scoreboard(request: Request, mode: str, amount: int):
         response = requests.get(f"http://{config.get('host')}:{config.get('port')}{config.get('base_url')}/api/scoreboard.json?mode=error_code&amount={amount}")
     elif mode == "avg_peers" and amount > 0:
         response = requests.get(f"http://{config.get('host')}:{config.get('port')}{config.get('base_url')}/api/scoreboard.json?mode=avg_peers&amount={amount}")
-    elif mode == "obsfucator" and amount > 0:
-        response = requests.get(f"http://{config.get('host')}:{config.get('port')}{config.get('base_url')}/api/scoreboard.json?mode=obsfucator&amount={amount}")
-    elif mode == "obsfucation" and amount > 0:
-        response = requests.get(f"http://{config.get('host')}:{config.get('port')}{config.get('base_url')}/api/scoreboard.json?mode=obsfucation&amount={amount}")
+    elif mode == "obfucator" and amount > 0:
+        response = requests.get(f"http://{config.get('host')}:{config.get('port')}{config.get('base_url')}/api/scoreboard.json?mode=obfucator&amount={amount}")
+    elif mode == "obfucation" and amount > 0:
+        response = requests.get(f"http://{config.get('host')}:{config.get('port')}{config.get('base_url')}/api/scoreboard.json?mode=obfucation&amount={amount}")
     else:
         raise HTTPException(status_code=400, detail="No filter specified")
 
index 3dec226bca7ff8820a0971f3b8ffba7165214b4b..903c30980895603445fda714a93187dc716f6254 100644 (file)
Binary files a/blocks_empty.db and b/blocks_empty.db differ
index 5070aa42ff40ac7c2f2d12365c805343fe69c08f..de886fc71906b44073385a91171a4dd44e47e71a 100644 (file)
@@ -187,7 +187,7 @@ def fetch_blocks(args: argparse.Namespace):
 
         logger.debug(f"blocker='{blocker}'")
         instances.set_last_blocked(blocker)
-        instances.set_has_obsfucation(blocker, False)
+        instances.set_has_obfucation(blocker, False)
 
         if software == "pleroma":
             logger.info("blocker='%s',software='%s'", blocker, software)
@@ -228,30 +228,30 @@ def fetch_blocks(args: argparse.Namespace):
                         logger.warning("blocked is empty, blocker='%s'", blocker)
                         continue
                     elif blocked.count("*") > 0:
-                        logger.debug("blocker='%s' uses obsfucated domains, marking ...", blocker)
-                        instances.set_has_obsfucation(blocker, True)
+                        logger.debug("blocker='%s' uses obfucated domains, marking ...", blocker)
+                        instances.set_has_obfucation(blocker, True)
 
                         # Some friendica servers also obscure domains without hash
-                        row = instances.deobscure("*", blocked)
+                        row = instances.deobfucate("*", blocked)
 
                         logger.debug("row[]='%s'", type(row))
                         if row is None:
-                            logger.warning("Cannot deobsfucate blocked='%s',blocker='%s',software='%s' - SKIPPED!", blocked, blocker, software)
+                            logger.warning("Cannot deobfucate blocked='%s',blocker='%s',software='%s' - SKIPPED!", blocked, blocker, software)
                             continue
 
                         blocked      = row[0]
                         origin       = row[1]
                         nodeinfo_url = row[2]
                     elif blocked.count("?") > 0:
-                        logger.debug("blocker='%s' uses obsfucated domains, marking ...", blocker)
-                        instances.set_has_obsfucation(blocker, True)
+                        logger.debug("blocker='%s' uses obfucated domains, marking ...", blocker)
+                        instances.set_has_obfucation(blocker, True)
 
                         # Some obscure them with question marks, not sure if that's dependent on version or not
-                        row = instances.deobscure("?", blocked)
+                        row = instances.deobfucate("?", blocked)
 
                         logger.debug("row[]='%s'", type(row))
                         if row is None:
-                            logger.warning("Cannot deobsfucate blocked='%s',blocker='%s',software='%s' - SKIPPED!", blocked, blocker, software)
+                            logger.warning("Cannot deobfucate blocked='%s',blocker='%s',software='%s' - SKIPPED!", blocked, blocker, software)
                             continue
 
                         blocked      = row[0]
index aa7039a9a597a8a5e9c54dbc7c29b5bbe27f9003..dc163570aba3703919b6eaf33b2338dfd9743091 100644 (file)
@@ -60,8 +60,8 @@ _pending = {
     "last_status_code"   : {},
     # Last error details
     "last_error_details" : {},
-    # Wether obsfucation has been used
-    "has_obsfucation"    : {},
+    # Wether obfucation has been used
+    "has_obfucation"    : {},
 }
 
 def _set_data(key: str, domain: str, value: any):
@@ -287,7 +287,7 @@ def is_recent(domain: str) -> bool:
     logger.debug("recently='%s' - EXIT!", recently)
     return recently
 
-def deobscure(char: str, domain: str, blocked_hash: str = None) -> tuple:
+def deobfucate(char: str, domain: str, blocked_hash: str = None) -> tuple:
     logger.debug("char='%s',domain='%s',blocked_hash='%s' - CALLED!", char, domain, blocked_hash)
 
     if not isinstance(domain, str):
@@ -321,7 +321,7 @@ def deobscure(char: str, domain: str, blocked_hash: str = None) -> tuple:
 
         if row is None:
             logger.debug("blocked_hash='%s' not found, trying domain='%s' ...", blocked_hash, domain)
-            return deobscure(char, domain)
+            return deobfucate(char, domain)
     else:
         logger.debug("Looking up domain='%s' ...", domain)
         database.cursor.execute(
@@ -386,7 +386,7 @@ def set_detection_mode(domain: str, mode: str):
     _set_data("detection_mode", domain, mode)
     logger.debug("EXIT!")
 
-def set_has_obsfucation(domain: str, status: bool):
+def set_has_obfucation(domain: str, status: bool):
     logger.debug("domain(%d)='%s',status='%s' - CALLED!", len(domain), domain, status)
     domain_helper.raise_on(domain)
 
@@ -394,5 +394,5 @@ def set_has_obsfucation(domain: str, status: bool):
         raise ValueError(f"Parameter status[]='{type(status)}' is not 'bool'")
 
     # Set timestamp
-    _set_data("has_obsfucation", domain, status)
+    _set_data("has_obfucation", domain, status)
     logger.debug("EXIT!")
index 47aefd9c661a15faa72fea43037cfcb88ad7605c..4d0edf31fe08967855d043bb14b2fba497f12411 100644 (file)
@@ -250,15 +250,15 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                     logger.warning("blocked is empty, domain='%s'", domain)
                     continue
                 elif blocked.count("*") > 0:
-                    logger.debug("domain='%s' uses obsfucated domains, marking ...", domain)
-                    instances.set_has_obsfucation(domain, True)
+                    logger.debug("domain='%s' uses obfucated domains, marking ...", domain)
+                    instances.set_has_obfucation(domain, True)
 
                     # Doing the hash search for instance names as well to tidy up DB
-                    row = instances.deobscure("*", blocked, blocked_hash)
+                    row = instances.deobfucate("*", blocked, blocked_hash)
 
                     logger.debug("row[]='%s'", type(row))
                     if row is None:
-                        logger.warning("Cannot deobsfucate blocked='%s',blocked_hash='%s' - SKIPPED!", blocked, blocked_hash)
+                        logger.warning("Cannot deobfucate blocked='%s',blocked_hash='%s' - SKIPPED!", blocked, blocked_hash)
                         continue
 
                     logger.debug("Updating domain: row[0]='%s'", row[0])
@@ -266,15 +266,15 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                     origin       = row[1]
                     nodeinfo_url = row[2]
                 elif blocked.count("?") > 0:
-                    logger.debug("domain='%s' uses obsfucated domains, marking ...", domain)
-                    instances.set_has_obsfucation(domain, True)
+                    logger.debug("domain='%s' uses obfucated domains, marking ...", domain)
+                    instances.set_has_obfucation(domain, True)
 
                     # Doing the hash search for instance names as well to tidy up DB
-                    row = instances.deobscure("?", blocked, blocked_hash)
+                    row = instances.deobfucate("?", blocked, blocked_hash)
 
                     logger.debug("row[]='%s'", type(row))
                     if row is None:
-                        logger.warning("Cannot deobsfucate blocked='%s',blocked_hash='%s' - SKIPPED!", blocked, blocked_hash)
+                        logger.warning("Cannot deobfucate blocked='%s',blocked_hash='%s' - SKIPPED!", blocked, blocked_hash)
                         continue
 
                     logger.debug("Updating domain: row[0]='%s'", row[0])
index 09f869766d6b9958d100046b9ec9d006b6ff4c13..5abd650aa87c0f17600550be00d21bf506488ac6 100644 (file)
@@ -117,15 +117,15 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                         logger.debug("blocked='%s' is a fake domain - SKIPPED!", blocked)
                         continue
                     elif blocked.count("*") > 0:
-                        logger.debug("domain='%s' uses obsfucated domains, marking ...", domain)
-                        instances.set_has_obsfucation(domain, True)
+                        logger.debug("domain='%s' uses obfucated domains, marking ...", domain)
+                        instances.set_has_obfucation(domain, True)
 
                         # Obscured domain name with no hash
-                        row = instances.deobscure("*", blocked)
+                        row = instances.deobfucate("*", blocked)
 
                         logger.debug("row[]='%s'", type(row))
                         if row is None:
-                            logger.warning("Cannot deobsfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
+                            logger.warning("Cannot deobfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
                             continue
 
                         logger.debug("blocked='%s' de-obscured to '%s'", blocked, row[0])
@@ -133,15 +133,15 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                         origin       = row[1]
                         nodeinfo_url = row[2]
                     elif blocked.count("?") > 0:
-                        logger.debug("domain='%s' uses obsfucated domains, marking ...", domain)
-                        instances.set_has_obsfucation(domain, True)
+                        logger.debug("domain='%s' uses obfucated domains, marking ...", domain)
+                        instances.set_has_obfucation(domain, True)
 
                         # Obscured domain name with no hash
-                        row = instances.deobscure("?", blocked)
+                        row = instances.deobfucate("?", blocked)
 
                         logger.debug("row[]='%s'", type(row))
                         if row is None:
-                            logger.warning("Cannot deobsfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
+                            logger.warning("Cannot deobfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
                             continue
 
                         logger.debug("blocked='%s' de-obscured to '%s'", blocked, row[0])
@@ -194,15 +194,15 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                 logger.debug("blocked='%s' is a fake domain - SKIPPED!", blocked)
                 continue
             elif blocked.count("*") > 0:
-                logger.debug("domain='%s' uses obsfucated domains, marking ...", domain)
-                instances.set_has_obsfucation(domain, True)
+                logger.debug("domain='%s' uses obfucated domains, marking ...", domain)
+                instances.set_has_obfucation(domain, True)
 
                 # Obscured domain name with no hash
-                row = instances.deobscure("*", blocked)
+                row = instances.deobfucate("*", blocked)
 
                 logger.debug("row[]='%s'", type(row))
                 if row is None:
-                    logger.warning("Cannot deobsfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
+                    logger.warning("Cannot deobfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
                     continue
 
                 logger.debug("blocked='%s' de-obscured to '%s'", blocked, row[0])
@@ -210,15 +210,15 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                 origin       = row[1]
                 nodeinfo_url = row[2]
             elif blocked.count("?") > 0:
-                logger.debug("domain='%s' uses obsfucated domains, marking ...", domain)
-                instances.set_has_obsfucation(domain, True)
+                logger.debug("domain='%s' uses obfucated domains, marking ...", domain)
+                instances.set_has_obfucation(domain, True)
 
                 # Obscured domain name with no hash
-                row = instances.deobscure("?", blocked)
+                row = instances.deobfucate("?", blocked)
 
                 logger.debug("row[]='%s'", type(row))
                 if row is None:
-                    logger.warning("Cannot deobsfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
+                    logger.warning("Cannot deobfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
                     continue
 
                 logger.debug("blocked='%s' de-obscured to '%s'", blocked, row[0])
@@ -226,7 +226,7 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                 origin       = row[1]
                 nodeinfo_url = row[2]
 
-            logger.debug("blocked='%s' - DEOBSFUCATED!", blocked)
+            logger.debug("blocked='%s' - DEOBFUCATED!", blocked)
             if not utils.is_domain_wanted(blocked):
                 logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)
                 continue
@@ -299,15 +299,15 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                     logger.warning("blocked is empty after tidyup.domain(): domain='%s',block_level='%s'", domain, block_level)
                     continue
                 elif blocked.count("*") > 0:
-                    logger.debug("domain='%s' uses obsfucated domains, marking ...", domain)
-                    instances.set_has_obsfucation(domain, True)
+                    logger.debug("domain='%s' uses obfucated domains, marking ...", domain)
+                    instances.set_has_obfucation(domain, True)
 
                     # Obscured domain name with no hash
-                    row = instances.deobscure("*", blocked)
+                    row = instances.deobfucate("*", blocked)
 
                     logger.debug("row[]='%s'", type(row))
                     if row is None:
-                        logger.warning("Cannot deobsfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
+                        logger.warning("Cannot deobfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
                         continue
 
                     logger.debug("blocked='%s' de-obscured to '%s'", blocked, row[0])
@@ -315,15 +315,15 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                     origin       = row[1]
                     nodeinfo_url = row[2]
                 elif blocked.count("?") > 0:
-                    logger.debug("domain='%s' uses obsfucated domains, marking ...", domain)
-                    instances.set_has_obsfucation(domain, True)
+                    logger.debug("domain='%s' uses obfucated domains, marking ...", domain)
+                    instances.set_has_obfucation(domain, True)
 
                     # Obscured domain name with no hash
-                    row = instances.deobscure("?", blocked)
+                    row = instances.deobfucate("?", blocked)
 
                     logger.debug("row[]='%s'", type(row))
                     if row is None:
-                        logger.warning("Cannot deobsfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
+                        logger.warning("Cannot deobfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
                         continue
 
                     logger.debug("blocked='%s' de-obscured to '%s'", blocked, row[0])
@@ -331,7 +331,7 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                     origin       = row[1]
                     nodeinfo_url = row[2]
 
-                logger.debug("blocked='%s' - DEOBSFUCATED!", blocked)
+                logger.debug("blocked='%s' - DEOBFUCATED!", blocked)
                 if not utils.is_domain_wanted(blocked):
                     logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)
                     continue
@@ -371,15 +371,15 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                 logger.warning("blocked is empty after tidyup.domain(): domain='%s',block_level='%s'", domain, block_level)
                 continue
             elif blocked.count("*") > 0:
-                logger.debug("domain='%s' uses obsfucated domains, marking ...", domain)
-                instances.set_has_obsfucation(domain, True)
+                logger.debug("domain='%s' uses obfucated domains, marking ...", domain)
+                instances.set_has_obfucation(domain, True)
 
                 # Obscured domain name with no hash
-                row = instances.deobscure("*", blocked)
+                row = instances.deobfucate("*", blocked)
 
                 logger.debug("row[]='%s'", type(row))
                 if row is None:
-                    logger.warning("Cannot deobsfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
+                    logger.warning("Cannot deobfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
                     continue
 
                 logger.debug("blocked='%s' de-obscured to '%s'", blocked, row[0])
@@ -387,15 +387,15 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                 origin       = row[1]
                 nodeinfo_url = row[2]
             elif blocked.count("?") > 0:
-                logger.debug("domain='%s' uses obsfucated domains, marking ...", domain)
-                instances.set_has_obsfucation(domain, True)
+                logger.debug("domain='%s' uses obfucated domains, marking ...", domain)
+                instances.set_has_obfucation(domain, True)
 
                 # Obscured domain name with no hash
-                row = instances.deobscure("?", blocked)
+                row = instances.deobfucate("?", blocked)
 
                 logger.debug("row[]='%s'", type(row))
                 if row is None:
-                    logger.warning("Cannot deobsfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
+                    logger.warning("Cannot deobfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
                     continue
 
                 logger.debug("blocked='%s' de-obscured to '%s'", blocked, row[0])
@@ -444,15 +444,15 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                         logger.warning("blocked is empty after tidyup.domain(): domain='%s',block_level='%s'", domain, block_level)
                         continue
                     elif blocked.count("*") > 0:
-                        logger.debug("domain='%s' uses obsfucated domains, marking ...", domain)
-                        instances.set_has_obsfucation(domain, True)
+                        logger.debug("domain='%s' uses obfucated domains, marking ...", domain)
+                        instances.set_has_obfucation(domain, True)
 
                         # Obscured domain name with no hash
-                        row = instances.deobscure("*", blocked)
+                        row = instances.deobfucate("*", blocked)
 
                         logger.debug("row[]='%s'", type(row))
                         if row is None:
-                            logger.warning("Cannot deobsfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
+                            logger.warning("Cannot deobfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
                             continue
 
                         logger.debug("blocked='%s' de-obscured to '%s'", blocked, row[0])
@@ -460,15 +460,15 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                         origin       = row[1]
                         nodeinfo_url = row[2]
                     elif blocked.count("?") > 0:
-                        logger.debug("domain='%s' uses obsfucated domains, marking ...", domain)
-                        instances.set_has_obsfucation(domain, True)
+                        logger.debug("domain='%s' uses obfucated domains, marking ...", domain)
+                        instances.set_has_obfucation(domain, True)
 
                         # Obscured domain name with no hash
-                        row = instances.deobscure("?", blocked)
+                        row = instances.deobfucate("?", blocked)
 
                         logger.debug("row[]='%s'", type(row))
                         if row is None:
-                            logger.warning("Cannot deobsfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
+                            logger.warning("Cannot deobfucate blocked='%s',domain='%s',origin='%s' - SKIPPED!", blocked, domain, origin)
                             continue
 
                         logger.debug("blocked='%s' de-obscured to '%s'", blocked, row[0])
@@ -476,7 +476,7 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str):
                         origin       = row[1]
                         nodeinfo_url = row[2]
 
-                    logger.debug("blocked='%s' - DEOBSFUCATED!", blocked)
+                    logger.debug("blocked='%s' - DEOBFUCATED!", blocked)
                     if not utils.is_domain_wanted(blocked):
                         logger.warning("blocked='%s' is not wanted - SKIPPED!", blocked)
                         continue
index e7056c8f6ed21e7eb7a333e7b96b0ea3af3ac608..1a1dffec0ab69fbda7458a137e3f85179e04060e 100644 (file)
@@ -82,11 +82,11 @@ def process_domain(domain: str, blocker: str, command: str) -> bool:
         raise ValueError("Parameter 'command' is empty")
 
     if domain.find("*") > 0:
-        logger.debug("blocker='%s' uses obsfucated domains, marking ...", blocker)
-        instances.set_has_obsfucation(blocker, True)
+        logger.debug("blocker='%s' uses obfucated domains, marking ...", blocker)
+        instances.set_has_obfucation(blocker, True)
 
         # Try to de-obscure it
-        row = instances.deobscure("*", domain)
+        row = instances.deobfucate("*", domain)
 
         logger.debug(f"row[{type(row)}]='{row}'")
         if row is None:
@@ -96,11 +96,11 @@ def process_domain(domain: str, blocker: str, command: str) -> bool:
         logger.debug(f"domain='{domain}' de-obscured to '{row[0]}'")
         domain = row[0]
     elif domain.find("?") > 0:
-        logger.debug("blocker='%s' uses obsfucated domains, marking ...", blocker)
-        instances.set_has_obsfucation(blocker, True)
+        logger.debug("blocker='%s' uses obfucated domains, marking ...", blocker)
+        instances.set_has_obfucation(blocker, True)
 
         # Try to de-obscure it
-        row = instances.deobscure("?", domain)
+        row = instances.deobfucate("?", domain)
 
         logger.debug(f"row[{type(row)}]='{row}'")
         if row is None:
@@ -110,8 +110,8 @@ def process_domain(domain: str, blocker: str, command: str) -> bool:
         logger.debug(f"domain='{domain}' de-obscured to '{row[0]}'")
         domain = row[0]
     else:
-        logger.debug("blocker='%s' has NO obsfucation on their block list", blocker)
-        instances.set_has_obsfucation(blocker, False)
+        logger.debug("blocker='%s' has NO obfucation on their block list", blocker)
+        instances.set_has_obfucation(blocker, False)
 
     if instances.has_pending(blocker):
         logger.debug("Invoking instances.update_data(%s) ...", blocker)
index e1340ff50c27a687b81e20fdf3cb44d49fa690d5..5e5a56fab7d891a60a0f688984d6189158be6893 100644 (file)
@@ -32,8 +32,8 @@
         <a href="{{base_url}}/scoreboard?mode=command&amp;amount=10">commands</a> /
         <a href="{{base_url}}/scoreboard?mode=error_code&amp;amount=30">error codes</a> /
         <a href="{{base_url}}/scoreboard?mode=avg_peers&amp;amount=30">average peers</a> /
-        <a href="{{base_url}}/scoreboard?mode=obsfucator&amp;amount=30">obsfucating software</a> /
-        <a href="{{base_url}}/scoreboard?mode=obsfucation&amp;amount=10">obsfucation metrics</a>
+        <a href="{{base_url}}/scoreboard?mode=obfucator&amp;amount=30">obfucating software</a> /
+        <a href="{{base_url}}/scoreboard?mode=obfucation&amp;amount=10">obfucation metrics</a>
     </p>
 {% endblock %}
 {% block footer %}
index bb2236b824770bcb794925b8a96a6d8b9b9bd937..b3f4a77be56e3bc700b9ca32bcc9f2f1d9a6533b 100644 (file)
@@ -1,6 +1,6 @@
 {% extends "base.html" %}
 
-{% block title %}Scoreboard - {% if mode == 'software' %}TOP {{amount}} used software{% elif mode == 'obsfucation' %}Obsfucation metrics{% elif mode == 'obsfucator' %}TOP {{amount}} obsfucating software{% elif mode == 'avg_peers' %}TOP {{amount}} average peer count{% elif mode == 'command' %}TOP {{amount}} commands{% elif mode == 'error_code' %}TOP {{amount}} error codes{% elif mode == 'reference' %}TOP {{amount}} referencing instances{% elif mode == 'blocked' %}TOP {{amount}} deferated instances{% elif mode == 'blocker' %}TOP {{amount}} deferating instances{% endif %}{% endblock %}
+{% block title %}Scoreboard - {% if mode == 'software' %}TOP {{amount}} used software{% elif mode == 'obfucation' %}obfucation metrics{% elif mode == 'obfucator' %}TOP {{amount}} obfucating software{% elif mode == 'avg_peers' %}TOP {{amount}} average peer count{% elif mode == 'command' %}TOP {{amount}} commands{% elif mode == 'error_code' %}TOP {{amount}} error codes{% elif mode == 'reference' %}TOP {{amount}} referencing instances{% elif mode == 'blocked' %}TOP {{amount}} deferated instances{% elif mode == 'blocker' %}TOP {{amount}} deferating instances{% endif %}{% endblock %}
 
 {% block header %}
     {% if mode == 'blocker' %}
         <h1>TOP {{amount}} error codes</h1>
     {% elif mode == 'avg_peers' %}
         <h1>TOP {{amount}} average peer count</h1>
-    {% elif mode == 'obsfucator' %}
-        <h1>TOP {{amount}} obsfucating software</h1>
-    {% elif mode == 'obsfucation' %}
-        <h1>Obsfucation metrics</h1>
+    {% elif mode == 'obfucator' %}
+        <h1>TOP {{amount}} obfucating software</h1>
+    {% elif mode == 'obfucation' %}
+        <h1>obfucation metrics</h1>
     {% endif %}
 {% endblock %}
 
@@ -29,8 +29,8 @@
         <table>
             <thead>
                 <th>№</th>
-                <th>{% if mode in ('software', 'avg_peers', 'obsfucator') %}Software{% elif mode == 'obsfucation' %}Obsfucation status{% elif mode == 'error_code' %}Error code{% else %}Instance{% endif %}</th>
-                <th>{% if mode == 'reference' %}References{% elif mode == 'avg_peers' %}Average{% elif mode in('software', 'error_code', 'obsfucator', 'obsfucation') %}Total{% else %}Blocks{% endif %}</th>
+                <th>{% if mode in ('software', 'avg_peers', 'obfucator') %}Software{% elif mode == 'obfucation' %}obfucation status{% elif mode == 'error_code' %}Error code{% else %}Instance{% endif %}</th>
+                <th>{% if mode == 'reference' %}References{% elif mode == 'avg_peers' %}Average{% elif mode in('software', 'error_code', 'obfucator', 'obfucation') %}Total{% else %}Blocks{% endif %}</th>
             </thead>
 
             <tbody>
@@ -38,7 +38,7 @@
                 <tr>
                     <td>{{loop.index}}</td>
                     <td>
-                        {% if mode in ('software', 'command', 'error_code', 'avg_peers', 'obsfucator', 'obsfucation') %}
+                        {% if mode in ('software', 'command', 'error_code', 'avg_peers', 'obfucator', 'obfucation') %}
                             {{entry['domain']}}
                         {% elif entry['domain'] == None %}
                             -
@@ -64,9 +64,9 @@
                 <li>Error code 999 is fake and covers a lot of reasons why the domain/instance is not reachable. Mostly that the domain is not resolvable or the server refused connection.</li>
             </ul>
         </div>
-    {% elif mode == 'obsfucation' %}
+    {% elif mode == 'obfucation' %}
         <div class="notes">
-            <h2>Please note to obsfucation status:</h2>
+            <h2>Please note to obfucation status:</h2>
             <ul>
                 <li>Only supported networks are counted here.</li>
                 <li><em>None</em> means not determined yet.</li>