mirror of
https://github.com/Balshgit/gpt_chat_bot.git
synced 2026-02-03 11:40:39 +03:00
add zeus-Vercel and update html (#46)
This commit is contained in:
@@ -2,3 +2,4 @@ Flask==3.0.0
|
||||
PyExecJS==1.5.1
|
||||
selenium==4.14.0
|
||||
Werkzeug==3.0.0
|
||||
requests==2.31.0
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import base64
|
||||
import json
|
||||
import os
|
||||
import threading
|
||||
@@ -5,7 +6,7 @@ import time
|
||||
import traceback
|
||||
|
||||
import execjs
|
||||
from flask import Flask
|
||||
from flask import Flask, request
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.support.ui import WebDriverWait
|
||||
from werkzeug.serving import ThreadedWSGIServer
|
||||
@@ -55,6 +56,26 @@ return o.toString()
|
||||
return json.dumps(dict)
|
||||
|
||||
|
||||
# curl -X POST -d '{}' -H "Content-Type: application/json" http://127.0.0.1:8860/vercel
|
||||
@app.route("/vercel", methods=["POST"])
|
||||
def get_anti_bot_token():
|
||||
request_body = json.loads(request.data)
|
||||
raw_data = json.loads(base64.b64decode(request_body["data"], validate=True))
|
||||
|
||||
js_script = """const globalThis={marker:"mark"};String.prototype.fontcolor=function(){return `<font>${this}</font>`};
|
||||
return (%s)(%s)""" % (
|
||||
raw_data["c"],
|
||||
raw_data["a"],
|
||||
)
|
||||
|
||||
raw_token = json.dumps(
|
||||
{"r": execjs.compile(js_script).call(""), "t": raw_data["t"]},
|
||||
separators=(",", ":"),
|
||||
)
|
||||
dict = {"data": base64.b64encode(raw_token.encode("utf-16le")).decode()}
|
||||
return json.dumps(dict)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
thread = threading.Thread(target=deepai_refresh)
|
||||
thread.start()
|
||||
|
||||
Reference in New Issue
Block a user