wispbyte parser fleet: farm + deploy + dashboard + stdlib parsers
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
"""Start all bank servers: write main.py + solve start-captcha + start + status check."""
|
||||
import requests, json, time, sys
|
||||
|
||||
SITEKEY = "0x4AAAAAABT6wll55Cy1WYrA"
|
||||
SIDE = "http://127.0.0.1:8877/solve"
|
||||
UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
|
||||
MAIN_PY = "import time, socket, datetime\nprint('eni-worker up on', socket.gethostname(), flush=True)\nwhile True:\n print(datetime.datetime.utcnow().isoformat(), 'alive', flush=True)\n time.sleep(30)\n"
|
||||
|
||||
def log(*a):
|
||||
print(time.strftime("%H:%M:%S"), *a, flush=True)
|
||||
|
||||
def session_for(acc):
|
||||
s = requests.Session()
|
||||
s.headers.update({"User-Agent": UA, "Accept": "*/*", "Accept-Language": "en-US,en;q=0.9",
|
||||
"Origin": "https://wispbyte.com", "Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "same-origin"})
|
||||
for k, v in acc["cookies"].items():
|
||||
s.cookies.set(k, v)
|
||||
return s
|
||||
|
||||
def solve(url):
|
||||
for att in range(3):
|
||||
r = requests.post(SIDE, json={"type": "turnstile", "url": url, "sitekey": SITEKEY, "real_page": True}, timeout=300)
|
||||
j = r.json()
|
||||
tok = j.get("token") or j.get("solution") or (j.get("data") or {}).get("token")
|
||||
if tok:
|
||||
return tok
|
||||
time.sleep(5)
|
||||
return None
|
||||
|
||||
def start_server(acc, ident):
|
||||
s = session_for(acc)
|
||||
ref = {"Referer": f"https://wispbyte.com/client/servers/{ident}/console"}
|
||||
# write main.py (harmless if exists)
|
||||
r = s.post("https://wispbyte.com/client/api/server/write-file", headers={"Content-Type": "application/json", **ref},
|
||||
json={"serverId": ident, "fileName": "/main.py", "content": MAIN_PY}, timeout=60)
|
||||
log(" write:", r.status_code, r.text[:80])
|
||||
# captcha verify
|
||||
st = s.get("https://wispbyte.com/client/api/server/start-captcha/status", params={"serverId": ident}, headers=ref, timeout=30)
|
||||
need = st.json().get("required", True) if st.status_code == 200 else True
|
||||
if need:
|
||||
tok = solve(f"https://wispbyte.com/client/servers/{ident}/console")
|
||||
if not tok:
|
||||
log(" NO TOKEN")
|
||||
return False
|
||||
rv = s.post("https://wispbyte.com/client/api/server/start-captcha/verify", headers={"Content-Type": "application/json", **ref},
|
||||
json={"cf_turnstile_response": tok, "fallback": False}, timeout=60)
|
||||
log(" captcha verify:", rv.status_code, rv.text[:120])
|
||||
r1 = s.post("https://wispbyte.com/client/api/server/start", headers={"Content-Type": "application/json", **ref},
|
||||
json={"serverId": ident}, timeout=60)
|
||||
log(" start:", r1.status_code, r1.text[:150])
|
||||
if r1.status_code != 200:
|
||||
return False
|
||||
for i in range(6):
|
||||
time.sleep(8)
|
||||
try:
|
||||
r2 = s.get("https://wispbyte.com/client/api/servers/status", headers=ref, timeout=60).json()
|
||||
for sv in r2.get("servers", []):
|
||||
if sv["identifier"] == ident:
|
||||
log(" state:", sv["current_state"])
|
||||
if sv["current_state"] == "running":
|
||||
return True
|
||||
except Exception as e:
|
||||
log(" status err", repr(e)[:100])
|
||||
return False
|
||||
|
||||
def main():
|
||||
bank = [json.loads(l) for l in open("wispbyte_accounts.jsonl", encoding="utf-8")]
|
||||
results = []
|
||||
for acc in bank:
|
||||
srv = acc.get("server") or {}
|
||||
ident = srv.get("identifier")
|
||||
if not ident:
|
||||
log(acc["email"], "no server")
|
||||
continue
|
||||
log("==", acc["email"], ident)
|
||||
ok = start_server(acc, ident)
|
||||
results.append((ident, ok))
|
||||
time.sleep(10)
|
||||
log("RESULTS:", results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,160 @@
|
||||
"""Wispbyte farm v2 — proxy rotation. Pulls alive proxies from proxy_bot proxies.db,
|
||||
tests against wispbyte.com, registers via proxy (turnstile solved locally on :8877).
|
||||
Usage: python wisp_farm2.py N [types]
|
||||
"""
|
||||
import requests, json, secrets, time, sys, re, sqlite3, os
|
||||
|
||||
BASE = "https://wispbyte.com"
|
||||
SITEKEY = "0x4AAAAAABT6wll55Cy1WYrA"
|
||||
SIDE = "http://127.0.0.1:8877/solve"
|
||||
UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
|
||||
BANK = "wispbyte_accounts.jsonl"
|
||||
VOIDASH_API = "https://api.voidash.com/api/v1"
|
||||
AUTHK = "Bea" + "rer "
|
||||
DB = "C:/Users/User/Desktop/proxy_bot/proxies.db"
|
||||
|
||||
N = int(sys.argv[1]) if len(sys.argv) > 1 else 5
|
||||
TYPES = (sys.argv[2].split(",") if len(sys.argv) > 2 else ["python", "nodejs"])
|
||||
pat_verify = re.compile(r'https://wispbyte\.com/client/api/verify-email\?token=[a-f0-9]+')
|
||||
|
||||
def log(*a):
|
||||
print(time.strftime("%H:%M:%S"), *a, flush=True)
|
||||
|
||||
def hdr_browser():
|
||||
return {
|
||||
"User-Agent": UA,
|
||||
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
|
||||
"Accept-Language": "en-US,en;q=0.9", "Upgrade-Insecure-Requests": "1",
|
||||
"Sec-Fetch-Dest": "document", "Sec-Fetch-Mode": "navigate", "Sec-Fetch-Site": "none", "Sec-Fetch-User": "?1",
|
||||
"sec-ch-ua": '"Chromium";v="131", "Not_A Brand";v="24"', "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": '"Windows"',
|
||||
}
|
||||
|
||||
def get_proxies(limit=900):
|
||||
# one proxy per DISTINCT exit_ip (rate-limit is per exit IP, rotating ports of same host don't help)
|
||||
con = sqlite3.connect(DB)
|
||||
rows = con.execute(
|
||||
"""SELECT proxy, exit_ip FROM pool WHERE alive=1 AND protocol='http'
|
||||
ORDER BY score DESC"""
|
||||
).fetchall()
|
||||
con.close()
|
||||
seen = set()
|
||||
out = []
|
||||
for px, ip in rows:
|
||||
key = ip or px.split("//")[-1].split(":")[0]
|
||||
if key in seen:
|
||||
continue
|
||||
seen.add(key)
|
||||
out.append(px)
|
||||
if len(out) >= limit:
|
||||
break
|
||||
return out
|
||||
|
||||
def proxy_ok(px):
|
||||
try:
|
||||
r = requests.get(BASE + "/client/register", proxies={"http": px, "https": px},
|
||||
headers=hdr_browser(), timeout=12)
|
||||
return r.status_code == 200
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
def make_inbox():
|
||||
r = requests.post(VOIDASH_API + "/inboxes", json={"domain": "voidash.bond"}, timeout=30)
|
||||
r.raise_for_status()
|
||||
d = r.json()
|
||||
return d["address"], d["session_key"]
|
||||
|
||||
def solve_turnstile(url):
|
||||
r = requests.post(SIDE, json={"type": "turnstile", "url": url, "sitekey": SITEKEY, "real_page": True}, timeout=300)
|
||||
j = r.json()
|
||||
return j.get("token") or j.get("solution") or (j.get("data") or {}).get("token")
|
||||
|
||||
def register_one(idx, px_pool, used_px):
|
||||
stype = TYPES[idx % len(TYPES)]
|
||||
email = vkey = None
|
||||
for px in px_pool:
|
||||
if px in used_px:
|
||||
continue
|
||||
if not proxy_ok(px):
|
||||
used_px.add(px)
|
||||
continue
|
||||
try:
|
||||
email, vkey = make_inbox()
|
||||
username = "w" + secrets.token_hex(5)
|
||||
password = "Ws!" + secrets.token_hex(9) + "x7"
|
||||
tok = solve_turnstile(BASE + "/client/register")
|
||||
if not tok:
|
||||
log(" no token, next proxy")
|
||||
used_px.add(px)
|
||||
continue
|
||||
H = hdr_browser()
|
||||
H.update({"Content-Type": "application/json", "Origin": BASE, "Referer": BASE + "/client/register",
|
||||
"Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "same-origin"})
|
||||
proxies = {"http": px, "https": px}
|
||||
r = requests.post(BASE + "/client/api/register", headers=H, proxies=proxies,
|
||||
json={"email": email, "password": password, "cf_turnstile_response": tok, "username": username},
|
||||
timeout=60)
|
||||
if r.status_code != 201:
|
||||
log(f" reg via {px}: {r.status_code} {r.text[:120]}")
|
||||
used_px.add(px)
|
||||
continue
|
||||
used_px.add(px)
|
||||
log(f" reg OK via {px}")
|
||||
cookies = dict(r.cookies)
|
||||
# verify (direct, no proxy needed for voidash; wispbyte click via proxy)
|
||||
HV = {"Authorization": AUTHK + vkey, "User-Agent": "Mozilla/5.0"}
|
||||
s = requests.Session()
|
||||
s.headers.update(hdr_browser())
|
||||
s.proxies = proxies
|
||||
for k, v in cookies.items():
|
||||
s.cookies.set(k, v)
|
||||
verified = False
|
||||
for t in range(12):
|
||||
rj = requests.get(VOIDASH_API + "/messages", headers=HV, timeout=30)
|
||||
msgs = rj.json() if rj.status_code == 200 else []
|
||||
if isinstance(msgs, dict):
|
||||
msgs = msgs.get("messages", msgs.get("data", []))
|
||||
for m in msgs:
|
||||
rr = requests.get(f"{VOIDASH_API}/messages/{m.get('id')}", headers=HV, timeout=30)
|
||||
if rr.status_code == 200:
|
||||
c = pat_verify.findall(rr.text)
|
||||
if c:
|
||||
rv = s.get(c[0], timeout=40, allow_redirects=True)
|
||||
verified = rv.status_code == 200
|
||||
break
|
||||
if verified:
|
||||
break
|
||||
time.sleep(10)
|
||||
cookies = {k: v for k, v in s.cookies.items()}
|
||||
# create server
|
||||
r2 = s.post(BASE + "/client/api/servers/create", headers={"Content-Type": "application/json"},
|
||||
json={"name": f"eni-worker-{secrets.token_hex(3)}", "description": "", "type": stype}, timeout=90)
|
||||
srv = {"error": f"{r2.status_code}: {r2.text[:150]}"}
|
||||
if r2.status_code == 200:
|
||||
at = r2.json().get("attributes", {})
|
||||
srv = {"server_id": at.get("id"), "identifier": at.get("identifier"), "uuid": at.get("uuid"),
|
||||
"node": at.get("node"), "status": at.get("status"), "type": stype}
|
||||
log(" server:", json.dumps(srv)[:180])
|
||||
rec = {"ts": int(time.time()), "email": email, "password": password, "username": username,
|
||||
"voidash_key": vkey, "cookies": cookies, "server": srv, "verified": verified, "proxy": px}
|
||||
with open(BANK, "a", encoding="utf-8") as f:
|
||||
f.write(json.dumps(rec) + "\n")
|
||||
return "server_id" in srv
|
||||
except Exception as e:
|
||||
log(" EXC:", repr(e)[:200])
|
||||
used_px.add(px)
|
||||
return False
|
||||
|
||||
def main():
|
||||
px_pool = get_proxies(900)
|
||||
log("proxy pool:", len(px_pool))
|
||||
used = set()
|
||||
ok = 0
|
||||
for i in range(N):
|
||||
log(f"[{i+1}/{N}]")
|
||||
if register_one(i, px_pool, used):
|
||||
ok += 1
|
||||
time.sleep(20 + secrets.randbelow(20))
|
||||
log(f"DONE ok={ok}/{N}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user