text stringlengths 1 93.6k |
|---|
self.my_sender("text/html", theme_error_html, {"Cache-Control": "public, max-age=31536000", "Last-Modified": SCRIPT_START, "Set-Cookie": default_cookie})
|
return
|
except KeyError:
|
theme = SETTINGS["Theme"]
|
extra_headers = {"Cache-Control": "public, max-age=31536000", "Last-Modified": SCRIPT_START, "Set-Cookie": default_cookie}
|
try:
|
with open(os.path.join(THEME_LOC, theme, "index.html"), "rb") as buf:
|
data = buf.read()
|
self.my_sender("text/html", data, extra_headers)
|
except (IOError, PermissionError):
|
self.my_sender("text/html", theme_error_html, {"Cache-Control": "public, max-age=31536000", "Last-Modified": SCRIPT_START, "Set-Cookie": default_cookie})
|
def index(self):
|
if not SETTINGS["UA_Check"] or self.check_ua():
|
if self.headers.get("Host") == "www.playstation.com" or self.headers.get("Host") == "manuals.playstation.net":
|
self.my_sender("text/html", b'<!DOCTYPE html><html manifest="/redirect.manifest"><head><meta charset="utf-8"><title>Redirector</title></head><body><script>"use strict";function redirect(){var a=new XMLHttpRequest;a.open("GET","/api/hostname",!0),a.onload=function(){200<=a.status&&400>a.status?window.loc... |
else:
|
self.theme_loader()
|
else:
|
self.my_send_error(400, explain="This device is not supported")
|
if not MENU_OPEN:
|
print(">> Unsupported device attempted to access exploits")
|
def blank(self):
|
self.my_sender("text/html", b"<!DOCTYPE html><html><head><meta charset=utf-8><title>Deus Machina</title></head><body><pre>ZmzJCgLnJ43j2FK4NUR/EmFc7hJRN7Ub4adlqCRLfsXoswDsjyvn5vGwLj2FZdOlVLNmi/l0mjiuHgCYSZqPSndVhg6U8ODSl1+/aDxQLZE=</pre></body></html>", {"Cache-Control": "public, max-age=31536000", "Last-Modifie... |
def debug_var_get(self):
|
try:
|
result = re.search(r"^\/debug\/var\/([a-zA-Z0-9\-_\.]*)$", self.path)
|
self.my_sender("text/plain", DEBUG_VAR[result.group(1)]) # TODO: Cache-Control/Last-Modified Headers
|
except KeyError:
|
try:
|
self.send_response(404)
|
self.send_header("Content-Type", "text/plain")
|
self.send_header("Content-Length", 0)
|
self.send_header("Cache-Control", "must-revalidate")
|
self.send_header("Connection", "keep-alive")
|
self.end_headers()
|
self.wfile.write(b"")
|
except:
|
pass # print('ERROR: Broken Pipe')
|
def debug_varclear(self):
|
global DEBUG_VAR
|
DEBUG_VAR = {}
|
self.empty_response()
|
def debug_clearlogs(self):
|
try:
|
with open(os.path.join(DEBUG_LOC, "js-error.log"), "w", encoding="utf-8") as buf:
|
UNUSED(buf)
|
with open(os.path.join(DEBUG_LOC, "httpd.log"), "w", encoding="utf-8") as buf:
|
UNUSED(buf)
|
except (IOError, PermissionError):
|
return self.my_send_error(404)
|
return self.empty_response()
|
def debug_jserrorlog(self, post_data):
|
try:
|
message = "--------------------------------------------------------------------------------\n"
|
message += f" Date: {datetime.datetime.now().strftime('%Y-%m-%dT%H:%M:%S')}\n"
|
message += f" Message: {post_data['message']}\n"
|
message += f" Line: {post_data['line']}\n"
|
message += f" Column: {post_data['column']}\n"
|
message += f" URL: {post_data['url']}\n"
|
message += f" User-Agent: {post_data['useragent']}\n"
|
message += f" Stack: {post_data['stack']}\n"
|
with open(os.path.join(DEBUG_LOC, "js-error.log"), "a", encoding="utf-8") as buf:
|
buf.write(message)
|
self.empty_response()
|
except (KeyError, IOError, PermissionError):
|
self.my_send_error(404)
|
def debug_filedump(self, post_data):
|
try:
|
if post_data[b"filename"][0].decode("utf-8") != "js-error.log" and post_data[b"filename"][0].decode("utf-8") != "httpd.log":
|
with open(os.path.join(DEBUG_LOC, post_data[b"filename"][0].decode("utf-8")), "rb+", encoding="utf-8") as buf:
|
buf.seek(int(post_data[b"offset"][0]), 0)
|
buf.write(post_data[b"data"][0])
|
return self.empty_response()
|
except (KeyError, IOError, PermissionError):
|
pass
|
return self.my_send_error(404)
|
def debug_filedelete(self, post_data):
|
try:
|
if post_data[b"filename"][0].decode("utf-8") != "js-error.log" and post_data[b"filename"][0].decode("utf-8") != "httpd.log":
|
if not os.path.isfile(os.path.join(DEBUG_LOC, post_data[b"filename"][0].decode("utf-8"))):
|
return self.empty_response()
|
os.remove(os.path.join(DEBUG_LOC, post_data[b"filename"][0].decode("utf-8")))
|
return self.empty_response()
|
except (KeyError, IOError, PermissionError):
|
pass
|
return self.my_send_error(404)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.