From 4a5f84eb4b2a64189b0fe64a511d1fdded7b0eef Mon Sep 17 00:00:00 2001 From: emerson Date: Tue, 2 Nov 2021 07:31:35 -0400 Subject: [PATCH] change dronebl URL because no one there knows how to run a server --- scripts/dronebl/dronebl_check_tickets.py | 10 +++++----- scripts/dronebl/dronebl_submitter.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/dronebl/dronebl_check_tickets.py b/scripts/dronebl/dronebl_check_tickets.py index 9c928a8..fc53cc5 100644 --- a/scripts/dronebl/dronebl_check_tickets.py +++ b/scripts/dronebl/dronebl_check_tickets.py @@ -57,12 +57,12 @@ def remove_dronebl_entries(entries): "Content-Length": str(len(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) def get_ticket_data(): - login_form = {"ref": "https://mirror1.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) + login_form = {"ref": "https://eu1.dronebl.org/admin/tickets", "account": config["dronebl_account_name"], "password": config["dronebl_account_password"]} + r = s.post("https://eu1.dronebl.org/admin/login", headers=headers, data=login_form) html = BeautifulSoup(r.text, "html5lib") tickets = html.select(".listing2 > tbody > tr") 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)) should_remove = True 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) already_sent = False for entry in results: @@ -110,7 +110,7 @@ with pgconn: 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]}" 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: send_active_email(ticket, details, comment.text) debug_log.debug(f"Sent email: {details}") diff --git a/scripts/dronebl/dronebl_submitter.py b/scripts/dronebl/dronebl_submitter.py index 4b7239c..3886786 100644 --- a/scripts/dronebl/dronebl_submitter.py +++ b/scripts/dronebl/dronebl_submitter.py @@ -19,7 +19,7 @@ class DroneBL(object): "Content-Length": str(len(request_string)), } 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) except requests.exceptions.SSLError as e: print(str(e))