Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into main
  • Loading branch information
freQniK committed Feb 13, 2024
2 parents 3e3f1e5 + d7e4ee0 commit 961d45e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions meile_intelligence.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ def get_ip_of_node(self, db, NodeData):
#print(NodeRemoteURL)

return NodeIP


def check_asn_null(self, db, node_address):
c = db.cursor()
query = f"SELECT asn FROM node_score WHERE node_address = '{node_address}';"
c.execute(query)
result = c.fetchone()
if result and result['asn'] is None:
return True
return False


def ip_registry_multithread(self, db, NodeIP):
Expand All @@ -93,6 +103,9 @@ def ip_registry_multithread(self, db, NodeIP):
concurrent.futures.wait(futures)

def __ip_registry_worker(self, node, ip, db):
if not self.check_asn_null(db, node):
return

N = random.randint(0,len(APIKEYS)-1)
API_KEY = APIKEYS[N]
TYPE = {"residential" : False, "business" : False, "hosting" : False, "education" : False, "government" : False }
Expand Down

0 comments on commit 961d45e

Please sign in to comment.