]> git.mxchange.org Git - fba.git/commitdiff
Obscured domain guessing for reasons field
authorMint <>
Mon, 3 Oct 2022 16:50:28 +0000 (19:50 +0300)
committerMint <>
Mon, 3 Oct 2022 16:50:28 +0000 (19:50 +0300)
fetch_blocks.py

index 592504cc6c016333f9c54752a6f1b16de88113a6..15d1a6df112426cb79c9df999bdcfe8d2ed7d834 100644 (file)
@@ -253,6 +253,16 @@ for blocker, software in c.fetchall():
                 ).items():
                     for blocked, reason in info.items():
                         blocked = tidyup(blocked)
+                        if blocked == "":
+                            continue
+                        if blocked.count("*") > 1:
+                            # same domain guess as above, but for reasons field
+                            c.execute(
+                                "select domain from instances where domain like ? order by rowid limit 1", (blocked.replace("*", "_"),)
+                            )
+                            searchres = c.fetchone()
+                            if searchres != None:
+                                blocked = searchres[0]
                         c.execute(
                             "update blocks set reason = ? where blocker = ? and blocked = ? and block_level = ?",
                             (reason["reason"], blocker, blocked, block_level),