change dronebl URL because no one there knows how to run a server

This commit is contained in:
Em 2021-11-02 07:31:35 -04:00
parent 594d5bc2e2
commit 4a5f84eb4b
Signed by: emerson
GPG Key ID: 270669502DA603E3
2 changed files with 6 additions and 6 deletions

View File

@ -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}")

View File

@ -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))