]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 3 Jun 2023 07:02:04 +0000 (09:02 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 3 Jun 2023 07:02:04 +0000 (09:02 +0200)
- 3rd parameter is not 'origin', it is 'script'

fetch_blocks.py

index 154bd9786c2ad17cdb0d906af8fe230ce4af3473..bfc2838f34c0df2354f00506f8f88101961211b6 100755 (executable)
@@ -123,7 +123,7 @@ for blocker, software, origin, nodeinfo_url in rows:
                             continue
                         elif not fba.is_instance_registered(blocked):
                             # DEBUG: print(f"DEBUG: Domain blocked='{blocked}' wasn't found, adding ..., blocker='{blocker}',origin='{origin}',nodeinfo_url='{nodeinfo_url}'")
-                            fba.add_instance(blocked, blocker, origin, nodeinfo_url)
+                            fba.add_instance(blocked, blocker, sys.argv[0], nodeinfo_url)
 
                         fba.cursor.execute(
                             "SELECT * FROM blocks WHERE blocker = ? AND blocked = ? AND block_level = ? LIMIT 1",
@@ -204,7 +204,7 @@ for blocker, software, origin, nodeinfo_url in rows:
                             continue
                         elif not fba.is_instance_registered(blocked):
                             # DEBUG: print(f"DEBUG: Domain blocked='{blocked}' wasn't found, adding ..., blocker='{blocker}',origin='{origin}',nodeinfo_url='{nodeinfo_url}'")
-                            fba.add_instance(blocked, blocker, origin, nodeinfo_url)
+                            fba.add_instance(blocked, blocker, sys.argv[0], nodeinfo_url)
 
                         # DEBUG: print("DEBUG: Updating block reason:", blocker, blocked, reason["reason"])
                         fba.update_block_reason(reason["reason"], blocker, blocked, block_level)
@@ -317,7 +317,7 @@ for blocker, software, origin, nodeinfo_url in rows:
                             continue
                         elif not fba.is_instance_registered(blocked):
                             # DEBUG: print(f"DEBUG: Domain blocked='{blocked}' wasn't found, adding ..., blocker='{blocker}',origin='{origin}',nodeinfo_url='{nodeinfo_url}'")
-                            fba.add_instance(blocked, blocker, origin, nodeinfo_url)
+                            fba.add_instance(blocked, blocker, sys.argv[0], nodeinfo_url)
                     elif not validators.domain(blocked):
                         print(f"WARNING: blocked='{blocked}',software='{software}' is not a valid domai name - skipped!")
                         continue
@@ -328,7 +328,7 @@ for blocker, software, origin, nodeinfo_url in rows:
                         continue
                     elif not fba.is_instance_registered(blocked):
                         # DEBUG: print("DEBUG: Hash wasn't found, adding:", blocked, blocker)
-                        fba.add_instance(blocked, blocker, origin, nodeinfo_url)
+                        fba.add_instance(blocked, blocker, sys.argv[0], nodeinfo_url)
 
                     blocking = blocked if blocked.count("*") <= 1 else blocked_hash
                     # DEBUG: print(f"DEBUG: blocking='{blocking}',blocked='{blocked}',blocked_hash='{blocked_hash}'")
@@ -438,7 +438,7 @@ for blocker, software, origin, nodeinfo_url in rows:
                         continue
                     elif not fba.is_instance_registered(blocked):
                         # DEBUG: print("DEBUG: Hash wasn't found, adding:", blocked, blocker)
-                        fba.add_instance(blocked, blocker, origin, nodeinfo_url)
+                        fba.add_instance(blocked, blocker, sys.argv[0], nodeinfo_url)
 
                     fba.cursor.execute(
                         "SELECT * FROM blocks WHERE blocker = ? AND blocked = ? AND block_level = ? LIMIT 1",
@@ -510,7 +510,7 @@ for blocker, software, origin, nodeinfo_url in rows:
                         continue
                     elif not fba.is_instance_registered(blocked):
                         # DEBUG: print(f"DEBUG: Domain blocked='{blocked}' wasn't found, adding ..., blocker='{blocker}',origin='{origin}',nodeinfo_url='{nodeinfo_url}'")
-                        fba.add_instance(blocked, blocker, origin, nodeinfo_url)
+                        fba.add_instance(blocked, blocker, sys.argv[0], nodeinfo_url)
 
                     fba.cursor.execute(
                         "SELECT * FROM blocks WHERE blocker = ? AND blocked = ? AND block_level = ? LIMIT 1",