autoreg-skills-max: initial public release (restored, redacted, hardened)
This commit is contained in:
102
skills/baaaai-autoreg/scripts/baaaai_api_reg.py
Normal file
102
skills/baaaai-autoreg/scripts/baaaai_api_reg.py
Normal file
@@ -0,0 +1,102 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Baaaai.com API-only auto-reg using 2captcha for Turnstile.
|
||||
REQUIRES: working 2captcha key + non-blocked IP (residential proxy or local machine).
|
||||
"""
|
||||
import curl_cffi.requests as curl
|
||||
import requests
|
||||
import json
|
||||
import re
|
||||
import time
|
||||
import random
|
||||
import string
|
||||
from pathlib import Path
|
||||
|
||||
CAPTCHA_KEY = "YOUR_2CAPTCHA_KEY_HERE"
|
||||
BASE_URL = "https://baaaai.com"
|
||||
ACCOUNTS_FILE = Path.home() / "Desktop" / "baaaai_accounts.json"
|
||||
EMAILS_FILE = Path.home() / "Downloads" / "Telegram Desktop" / "working_mails.txt"
|
||||
|
||||
def get_sitekey():
|
||||
s = curl.Session(impersonate="chrome124")
|
||||
r = s.get(f"{BASE_URL}/register", timeout=15)
|
||||
html = r.text
|
||||
for pattern in [r'0x4AAAAA\w{30,}', r'sitekey["\s:=]+["\x27]([^"\x27]+)["\x27]', r'data-sitekey=["\x27]([^"\x27]+)["\x27]', r'turnstile_site_key["\s:=]+["\x27]([^"\x27]+)["\x27]']:
|
||||
match = re.search(pattern, html, re.IGNORECASE)
|
||||
if match:
|
||||
return match.group(1) if match.lastindex else match.group(0)
|
||||
return None
|
||||
|
||||
def solve_turnstile(sitekey, pageurl=f"{BASE_URL}/register"):
|
||||
r = requests.post("https://2captcha.com/in.php", data={"key": CAPTCHA_KEY, "method": "turnstile", "sitekey": sitekey, "pageurl": pageurl, "json": 1}, timeout=30)
|
||||
result = r.json()
|
||||
if result.get("status") != 1:
|
||||
return None
|
||||
task_id = result["request"]
|
||||
for i in range(40):
|
||||
time.sleep(3)
|
||||
r = requests.post("https://2captcha.com/res.php", data={"key": CAPTCHA_KEY, "action": "get", "id": task_id, "json": 1}, timeout=30)
|
||||
result = r.json()
|
||||
if result.get("status") == 1:
|
||||
return result["request"]
|
||||
if result.get("request") == "ERROR_CAPTCHA_UNSOLVABLE":
|
||||
return None
|
||||
return None
|
||||
|
||||
def register(email, password, turnstile_token):
|
||||
s = curl.Session(impersonate="chrome124")
|
||||
s.headers.update({"Content-Type": "application/json", "Origin": BASE_URL, "Referer": f"{BASE_URL}/register", "Accept": "application/json"})
|
||||
r = s.post(f"{BASE_URL}/auth/register", json={"email": email, "password": password, "cf-turnstile-response": turnstile_token}, timeout=20)
|
||||
if r.status_code == 200:
|
||||
try:
|
||||
data = r.json()
|
||||
if data.get("code") == 0:
|
||||
return data.get("data", {}).get("access_token", "")
|
||||
except: pass
|
||||
return None
|
||||
|
||||
def generate_password():
|
||||
chars = string.ascii_letters + string.digits + "!@#$%^&*"
|
||||
return "".join(random.choices(chars, k=random.randint(14, 18)))
|
||||
|
||||
def load_emails():
|
||||
emails = []
|
||||
with open(EMAILS_FILE, "r", encoding="utf-8") as f:
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
if ":" in line:
|
||||
email, password = [REDACTED]":", 1)
|
||||
emails.append((email.strip(), password.strip()))
|
||||
return emails
|
||||
|
||||
def save_account(account):
|
||||
accounts = []
|
||||
if ACCOUNTS_FILE.exists():
|
||||
try:
|
||||
with open(ACCOUNTS_FILE, "r", encoding="utf-8") as f:
|
||||
accounts = json.load(f)
|
||||
except: pass
|
||||
accounts.append(account)
|
||||
with open(ACCOUNTS_FILE, "w", encoding="utf-8") as f:
|
||||
json.dump(accounts, f, indent=2, ensure_ascii=False)
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("=== Baaaai.com API Auto-Reg ===")
|
||||
sitekey = get_sitekey()
|
||||
if not sitekey:
|
||||
print("Cannot find sitekey")
|
||||
exit(1)
|
||||
token = [REDACTED])
|
||||
if not token:
|
||||
[REDACTED]"Turnstile solve failed")
|
||||
exit(1)
|
||||
emails = load_emails()
|
||||
email, _ = emails[0]
|
||||
password = [REDACTED])
|
||||
print(f"Registering: {email}")
|
||||
auth_token = [REDACTED], password, token)
|
||||
if auth_token:
|
||||
[REDACTED]"Registered! Token: {auth_token[:30]}...")
|
||||
save_account({"email": email, "password": password, "token": auth_token})
|
||||
else:
|
||||
print("Registration failed")
|
||||
126
skills/baaaai-autoreg/scripts/baaaai_autoreg.py
Normal file
126
skills/baaaai-autoreg/scripts/baaaai_autoreg.py
Normal file
@@ -0,0 +1,126 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Baaaai.com Auto-Registration + Balance Application (Playwright version)
|
||||
Регает акки через браузер и подаёт заявку на $50/$80 баланса.
|
||||
Запуск: python -u baaaai_autoreg.py [кол-во акков] [начальный индекс]
|
||||
"""
|
||||
import sys, json, random, string, time, os
|
||||
from pathlib import Path
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
BASE_URL = "https://baaaai.com"
|
||||
ACCOUNTS_FILE = Path.home() / "Desktop" / "baaaai_accounts.json"
|
||||
EMAILS_FILE = Path.home() / "Downloads" / "Telegram Desktop" / "working_mails.txt"
|
||||
COUNT = int(sys.argv[1]) if len(sys.argv) > 1 else 1
|
||||
START_IDX = int(sys.argv[2]) if len(sys.argv) > 2 else 0
|
||||
BALANCE_AMOUNT = 50
|
||||
BALANCE_REASON = "gpt 5.6 luna terra sol"
|
||||
|
||||
def load_emails():
|
||||
emails = []
|
||||
with open(EMAILS_FILE, "r", encoding="utf-8") as f:
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
if ":" in line:
|
||||
email, password = [REDACTED]":", 1)
|
||||
emails.append((email.strip(), password.strip()))
|
||||
return emails
|
||||
|
||||
def generate_password():
|
||||
chars = string.ascii_letters + string.digits + "!@#$%^&*"
|
||||
return "".join(random.choices(chars, k=random.randint(14, 18)))
|
||||
|
||||
def save_account(account):
|
||||
accounts = []
|
||||
if ACCOUNTS_FILE.exists():
|
||||
try:
|
||||
with open(ACCOUNTS_FILE, "r", encoding="utf-8") as f:
|
||||
accounts = json.load(f)
|
||||
except: pass
|
||||
accounts.append(account)
|
||||
with open(ACCOUNTS_FILE, "w", encoding="utf-8") as f:
|
||||
json.dump(accounts, f, indent=2, ensure_ascii=False)
|
||||
print(f" Saved ({len(accounts)} total)")
|
||||
|
||||
def main():
|
||||
print(f"Baaaai Auto-Reg v1.0 | {COUNT} accounts | ${BALANCE_AMOUNT} balance")
|
||||
emails = load_emails()
|
||||
print(f"Email pool: {len(emails)}")
|
||||
|
||||
pw = sync_playwright().start()
|
||||
temp_profile = Path.home() / "AppData" / "Local" / "Temp" / "chrome-baaaai-reg"
|
||||
|
||||
browser = pw.chromium.launch_persistent_context(
|
||||
user_data_dir=str(temp_profile), headless=False, channel="chrome",
|
||||
args=["--no-sandbox", "--disable-blink-features=AutomationControlled"],
|
||||
viewport={"width": 1280, "height": 800}
|
||||
)
|
||||
page = browser.new_page()
|
||||
success = 0
|
||||
|
||||
for i in range(START_IDX, START_IDX + COUNT):
|
||||
if i >= len(emails): break
|
||||
email, _ = emails[i]
|
||||
pwd = [REDACTED])
|
||||
print(f"\n--- {i+1}/{START_IDX+COUNT}: {email} ---")
|
||||
|
||||
page.goto(f"{BASE_URL}/register", wait_until="domcontentloaded", timeout=30000)
|
||||
time.sleep(2)
|
||||
|
||||
# Wait for Turnstile
|
||||
solved = False
|
||||
for attempt in range(15):
|
||||
time.sleep(1)
|
||||
try:
|
||||
if page.locator("#email").is_enabled():
|
||||
solved = True
|
||||
print(f" Turnstile solved after {attempt+1}s")
|
||||
break
|
||||
except: pass
|
||||
|
||||
if not solved:
|
||||
print(" Turnstile timeout")
|
||||
continue
|
||||
|
||||
page.locator("#email").fill(email)
|
||||
page.locator("#password").fill(pwd)
|
||||
try: page.locator("#login-agreement-consent").check()
|
||||
except: pass
|
||||
page.locator("button[type=submit]").click()
|
||||
time.sleep(3)
|
||||
|
||||
print(f" URL: {page.url}")
|
||||
if "dashboard" in page.url.lower():
|
||||
token = [REDACTED]"localStorage.getItem('auth_token')")
|
||||
api_key = None
|
||||
try:
|
||||
page.goto(f"{BASE_URL}/keys", wait_until="domcontentloaded", timeout=15000)
|
||||
time.sleep(2)
|
||||
page.locator("button:has-text('Create')").first.click()
|
||||
time.sleep(1)
|
||||
page.locator("input[name=name]").first.fill(f"gb-{random.randint(1000,9999)}")
|
||||
page.locator("button:has-text('Create')").last.click()
|
||||
time.sleep(2)
|
||||
api_key = [REDACTED]"(document.body.innerText.match(/sk-[a-f0-9]{40,}/i) || [null])[0]")
|
||||
print(f" API Key: {api_key[:30] if api_key else 'FAIL'}...")
|
||||
except Exception as e:
|
||||
print(f" Key error: {e}")
|
||||
|
||||
# Apply balance
|
||||
if token:
|
||||
[REDACTED] = page.evaluate(f"""
|
||||
(async()=>{{const r=await fetch('/user/balance-applications',{{method:'POST',headers:{{'Content-Type':'application/json','Authorization':'Bearer {token}'}},body:JSON.stringify({{amount:{BALANCE_AMOUNT},reason:'{BALANCE_REASON}'}})}});return JSON.stringify({{status:r.status,body:await r.text()}});}})()
|
||||
""")
|
||||
print(f" Balance: {result[:200]}")
|
||||
|
||||
save_account({"email":email,"password":pwd,"api_key":api_key,"token":token,"registered_at":time.strftime("%Y-%m-%d %H:%M:%S"),"balance_applied":BALANCE_AMOUNT})
|
||||
success += 1
|
||||
|
||||
time.sleep(2)
|
||||
|
||||
browser.close()
|
||||
pw.stop()
|
||||
print(f"\nDone: {success}/{COUNT}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user