change dronebl URL because no one there knows how to run a server
This commit is contained in:
parent
594d5bc2e2
commit
4a5f84eb4b
|
@ -57,12 +57,12 @@ def remove_dronebl_entries(entries):
|
||||||
"Content-Length": str(len(request_string)),
|
"Content-Length": str(len(request_string)),
|
||||||
}
|
}
|
||||||
debug_log.debug(request_string)
|
debug_log.debug(request_string)
|
||||||
r = requests.post("https://mirror1.dronebl.org/RPC2", data=request_string, headers=headers)
|
r = requests.post("https://eu1.dronebl.org/RPC2", data=request_string, headers=headers)
|
||||||
debug_log.debug(r.text)
|
debug_log.debug(r.text)
|
||||||
|
|
||||||
def get_ticket_data():
|
def get_ticket_data():
|
||||||
login_form = {"ref": "https://mirror1.dronebl.org/admin/tickets", "account": config["dronebl_account_name"], "password": config["dronebl_account_password"]}
|
login_form = {"ref": "https://eu1.dronebl.org/admin/tickets", "account": config["dronebl_account_name"], "password": config["dronebl_account_password"]}
|
||||||
r = s.post("https://mirror1.dronebl.org/admin/login", headers=headers, data=login_form)
|
r = s.post("https://eu1.dronebl.org/admin/login", headers=headers, data=login_form)
|
||||||
html = BeautifulSoup(r.text, "html5lib")
|
html = BeautifulSoup(r.text, "html5lib")
|
||||||
tickets = html.select(".listing2 > tbody > tr")
|
tickets = html.select(".listing2 > tbody > tr")
|
||||||
ticket_array = []
|
ticket_array = []
|
||||||
|
@ -88,7 +88,7 @@ with pgconn:
|
||||||
curs.execute("select id,ip,port,exit_ip,status,proxy_type,last_seen,recheck from proxies where ip=%s or exit_ip=%s", (ip, ip))
|
curs.execute("select id,ip,port,exit_ip,status,proxy_type,last_seen,recheck from proxies where ip=%s or exit_ip=%s", (ip, ip))
|
||||||
should_remove = True
|
should_remove = True
|
||||||
results = curs.fetchall()
|
results = curs.fetchall()
|
||||||
comment = s.post("https://mirror1.dronebl.org/admin/tickets", headers=headers, data={"ajax": "comments", "id": ticket["ticket_id"]})
|
comment = s.post("https://eu1.dronebl.org/admin/tickets", headers=headers, data={"ajax": "comments", "id": ticket["ticket_id"]})
|
||||||
debug_log.debug(comment.text)
|
debug_log.debug(comment.text)
|
||||||
already_sent = False
|
already_sent = False
|
||||||
for entry in results:
|
for entry in results:
|
||||||
|
@ -110,7 +110,7 @@ with pgconn:
|
||||||
else:
|
else:
|
||||||
details = f"Confirmed open {entry[5]} proxy with an entry IP of {entry[1]}, port {entry[2]} and exit IP of {entry[3]}, confirmed active at {entry[6]}"
|
details = f"Confirmed open {entry[5]} proxy with an entry IP of {entry[1]}, port {entry[2]} and exit IP of {entry[3]}, confirmed active at {entry[6]}"
|
||||||
debug_log.debug(details)
|
debug_log.debug(details)
|
||||||
s.post("https://mirror1.dronebl.org/admin/tickets", headers=headers, data={"ajax": "delete", "id": ticket["ticket_id"]})
|
s.post("https://eu1.dronebl.org/admin/tickets", headers=headers, data={"ajax": "delete", "id": ticket["ticket_id"]})
|
||||||
if not already_sent:
|
if not already_sent:
|
||||||
send_active_email(ticket, details, comment.text)
|
send_active_email(ticket, details, comment.text)
|
||||||
debug_log.debug(f"Sent email: {details}")
|
debug_log.debug(f"Sent email: {details}")
|
||||||
|
|
|
@ -19,7 +19,7 @@ class DroneBL(object):
|
||||||
"Content-Length": str(len(request_string)),
|
"Content-Length": str(len(request_string)),
|
||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
r = requests.post("https://mirror1.dronebl.org/RPC2", data=request_string, headers=headers)
|
r = requests.post("https://eu1.dronebl.org/RPC2", data=request_string, headers=headers)
|
||||||
print(r.text)
|
print(r.text)
|
||||||
except requests.exceptions.SSLError as e:
|
except requests.exceptions.SSLError as e:
|
||||||
print(str(e))
|
print(str(e))
|
||||||
|
|
Loading…
Reference in New Issue