simplify dronebl_check_tickets, force all ips to be rechecked
This commit is contained in:
parent
0298f3e0db
commit
907d36766d
|
@ -93,10 +93,15 @@ with pgconn:
|
|||
already_sent = False
|
||||
for entry in results:
|
||||
debug_log.debug(results)
|
||||
if entry[4] != "inactive":
|
||||
if not entry[7]:
|
||||
curs.execute("update proxies set status='unscanned', recheck=true where id=%s", (entry[0],))
|
||||
debug_log.debug(f"rechecking {ip}")
|
||||
should_remove = False
|
||||
else if entry[4] in ["scanning", "unscanned"]:
|
||||
debug_log.debug(f"IP: {ip} is {entry[4]}, skipping")
|
||||
should_remove = False
|
||||
else if entry[4] == "active":
|
||||
should_remove = False
|
||||
if entry[4] == "active":
|
||||
if entry[7]:
|
||||
if entry[1] == entry[3] or entry[1] == ip:
|
||||
if entry[5] in ["http", "socks5", "socks4", "httpsocks", "https"]:
|
||||
details = f"{entry[1]} has an open {entry[5]} proxy on port {entry[2]}, confirmed active at {entry[6]}"
|
||||
|
@ -111,11 +116,7 @@ with pgconn:
|
|||
debug_log.debug(f"Sent email: {details}")
|
||||
already_sent = True
|
||||
curs.execute("update proxies set recheck=false where id=%s", (entry[0],))
|
||||
else:
|
||||
curs.execute("update proxies set status='unscanned', recheck=true where id=%s", (entry[0],))
|
||||
debug_log.debug(f"IP: {ip} is active, rechecking")
|
||||
if entry[4] in ["scanning", "unscanned"]:
|
||||
debug_log.debug(f"IP: {ip} is {entry[4]}, skipping")
|
||||
|
||||
if should_remove:
|
||||
if not results:
|
||||
debug_log.debug(f"IP: {ip} is not in database")
|
||||
|
|
Loading…
Reference in New Issue