69 lines
2.9 KiB
Python
Executable File
69 lines
2.9 KiB
Python
Executable File
#!/usr/bin/env python3
|
||
"""
|
||
Cloud LobeHub Auto-Registration via curl_cffi + 2captcha
|
||
Регает аккаунты на app.lobehub.com с рефералом fQXk8Gr5
|
||
Требует: pip install curl_cffi
|
||
"""
|
||
import json, time, random, string
|
||
from curl_cffi import requests as curl_requests
|
||
from pathlib import Path
|
||
|
||
CAPTCHA_KEY = "[REDACTED-KEY]"
|
||
SITEKEY = "0x4AAAAAACxm5ZI_WCU13SgI"
|
||
PAGEURL = "https://app.lobehub.com/signup"
|
||
REFERRAL = "fQXk8Gr5"
|
||
FINGERPRINT = "[REDACTED-KEY]"
|
||
ACCOUNTS_FILE = Path.home() / "lobehub_cloud_accounts.json"
|
||
EMAILS_FILE = Path.home() / "Downloads/Telegram Desktop/working_mails.txt"
|
||
|
||
def solve_turnstile():
|
||
resp = curl_requests.get(
|
||
"https://2captcha.com/in.php",
|
||
params={"key": CAPTCHA_KEY, "method": "turnstile", "sitekey": SITEKEY, "pageurl": PAGEURL, "json": 1},
|
||
impersonate="chrome124")
|
||
data = resp.json()
|
||
if data.get("status") != 1:
|
||
raise Exception(f"2captcha submit failed: {data}")
|
||
captcha_id = data["request"]
|
||
|
||
for i in range(30):
|
||
time.sleep(3)
|
||
resp = curl_requests.get("https://2captcha.com/res.php",
|
||
params={"key": CAPTCHA_KEY, "action": "get", "id": captcha_id, "json": 1},
|
||
impersonate="chrome124")
|
||
result = resp.json()
|
||
if result.get("status") == 1:
|
||
return result["request"]
|
||
if result.get("request") == "ERROR_CAPTCHA_UNSOLVABLE":
|
||
raise Exception("Captcha unsolvable")
|
||
raise Exception("Captcha timeout")
|
||
|
||
def register(email, password, name, token):
|
||
resp = curl_requests.post(
|
||
f"https://app.lobehub.com/api/auth/sign-up/email?fp={FINGERPRINT}&referral={REFERRAL}",
|
||
json={"email": email, "password": password, "name": name},
|
||
headers={"Origin": "https://app.lobehub.com", "Referer": f"https://app.lobehub.com/signup?referral={REFERRAL}",
|
||
"Content-Type": "application/json", "X-Captcha-Response": token},
|
||
impersonate="chrome124", timeout=30)
|
||
return resp.status_code, resp.json()
|
||
|
||
if __name__ == "__main__":
|
||
accounts = json.load(open(ACCOUNTS_FILE)) if ACCOUNTS_FILE.exists() else []
|
||
existing = {a["email"] for a in accounts}
|
||
emails = [l.split(":")[0].strip() for l in open(EMAILS_FILE) if ":" in l and "@" in l]
|
||
|
||
for email in emails:
|
||
if email in existing: continue
|
||
pw = ''.join(random.choices(string.ascii_letters + string.digits + "!@#$", k=14))
|
||
try:
|
||
token = [REDACTED])
|
||
st, data = register(email, pw, email.split("@")[0][:20], token)
|
||
if st in (200, 201):
|
||
accounts.append({"email": email, "password": pw, "created_at": time.strftime("%Y-%m-%dT%H:%M:%SZ"), "referral": REFERRAL})
|
||
json.dump(accounts, open(ACCOUNTS_FILE, "w"), indent=2)
|
||
print(f"✅ {len(accounts)}: {email}")
|
||
else:
|
||
print(f"❌ {email}: {data}")
|
||
except Exception as e:
|
||
print(f"💀 {email}: {e}")
|
||
time.sleep(1) |