#!/usr/bin/env python3 """ SEPA AI/IDE Auto-Registration + Billing Access Uses RuCaptcha for captcha solving, mailinator.com for disposable emails. Supports: Mistral, Groq, ElevenLabs, DeepSeek, HuggingFace, Replicate. Usage: pip install httpx python sepa_autoreg.py # all platforms python sepa_autoreg.py mistral # single platform """ import httpx, json, random, string, time, re, sys from pathlib import Path RUCAPTCHA_KEY = "[REDACTED-KEY]" RUCAPTCHA_URL = "https://rucaptcha.com/in.php" RUCAPTCHA_RES = "https://rucaptcha.com/res.php" HOME = Path.home() CREDS_FILE = HOME / ".sepa_creds.json" BILLING_URLS = { "mistral": "https://console.mistral.ai/settings/billing", "groq": "https://console.groq.com/settings/billing/manage", "elevenlabs": "https://elevenlabs.io/app/settings/billing", "deepseek": "https://platform.deepseek.com/settings/billing", "huggingface": "https://huggingface.co/settings/billing", "replicate": "https://replicate.com/account/billing", "cursor": "https://cursor.com/settings/billing", "together": "https://api.together.xyz/settings/billing", "anthropic": "https://console.anthropic.com/settings/billing", "openai": "https://platform.openai.com/account/billing", } def log(platform, msg, status="info"): colors = {"ok": "\033[92m", "warn": "\033[93m", "err": "\033[91m", "info": "\033[96m"} c = colors.get(status, "") print(f"{c}[{platform:12s}] {msg}\033[0m") def save_creds(platform, email, password, extra=None): creds = {} if CREDS_FILE.exists(): creds = json.loads(CREDS_FILE.read_text()) creds[platform] = {"email": email, "password": password, "extra": extra, "created_at": time.strftime("%Y-%m-%d %H:%M:%S")} CREDS_FILE.write_text(json.dumps(creds, indent=2)) log(platform, f"Saved to {CREDS_FILE}", "ok") def gen_email(prefix="sepa"): rand = ''.join(random.choices(string.ascii_lowercase + string.digits, k=10)) return f"{prefix}_{rand}@mailinator.com" def gen_password(): chars = string.ascii_letters + string.digits + "!@#$%^&*" return ''.join(random.choices(chars, k=20)) + "Aa1!" def solve_captcha_hcaptcha(sitekey, pageurl, timeout=180): log("CAPTCHA", f"Solving hCaptcha for {pageurl[:50]}...", "info") params = {"key": RUCAPTCHA_KEY, "method": "hcaptcha", "sitekey": sitekey, "pageurl": pageurl, "json": 1} r = httpx.post(RUCAPTCHA_URL, data=params, timeout=15) data = r.json() if data.get("status") != 1: log("CAPTCHA", f"Submit failed: {data}", "err") return None captcha_id = data["request"] start = time.time() while time.time() - start < timeout: time.sleep(5) r = httpx.get(RUCAPTCHA_RES, params={"key": RUCAPTCHA_KEY, "action": "get", "id": captcha_id, "json": 1}, timeout=15) result = r.json() if result.get("status") == 1: log("CAPTCHA", f"Solved in {int(time.time()-start)}s!", "ok") return result["request"] elif result.get("request") != "CAPCHA_NOT_READY": return None return None def check_balance(): r = httpx.get(RUCAPTCHA_RES, params={"key": RUCAPTCHA_KEY, "action": "getbalance", "json": 1}, timeout=10) return r.json().get("request", "unknown") def register_mistral(): email = gen_email("sepa_mistral") password = [REDACTED]) client = httpx.Client(timeout=30, follow_redirects=True) client.headers.update({"User-Agent": "Mozilla/5.0", "Content-Type": "application/json"}) r = client.post("https://api.mistral.ai/v1/auth/signup", json={"email": email, "password": password}) log("Mistral", f"Signup: {r.status_code} {r.text[:200]}") save_creds("mistral", email, password) return email, password def register_groq(): email = gen_email("sepa_groq") client = httpx.Client(timeout=30, follow_redirects=True) client.headers.update({"User-Agent": "Mozilla/5.0", "Content-Type": "application/json"}) # Stytch magic link requires JS DFP — use browser for Groq log("Groq", "Stytch DFP blocking — use browser: https://console.groq.com/signup", "warn") save_creds("groq", email, "", {"magic_link_sent": False}) return email, None def register_deepseek(): email = gen_email("sepa_ds") password = [REDACTED]) client = httpx.Client(timeout=30, follow_redirects=True) client.headers.update({"User-Agent": "Mozilla/5.0", "Content-Type": "application/json"}) r = client.post("https://api.deepseek.com/v1/auth/signup", json={"email": email, "password": password}) log("DeepSeek", f"Signup: {r.status_code} {r.text[:200]}") save_creds("deepseek", email, password) return email, password def register_huggingface(): email = gen_email("sepa_hf") password = [REDACTED]) client = httpx.Client(timeout=30, follow_redirects=True) client.headers.update({"User-Agent": "Mozilla/5.0"}) r = client.get("https://huggingface.co/join") csrf = re.search(r'name="csrf"[^>]+value="([^"]+)"', r.text) r = client.post("https://huggingface.co/join", data={ "email": email, "password": password, "fullname": "Sepa Test", "tos_agree": "true", "csrf": csrf.group(1) if csrf else "" }) log("HuggingFace", f"Signup: {r.status_code}") save_creds("huggingface", email, password) return email, password def main(): print(f"\n\033[1;96m{'='*70}\033[0m") print(f"\033[1;96m SEPA AI/IDE Auto-Registration v1.0\033[0m") print(f"\033[1;96m{'='*70}\033[0m\n") balance = check_balance() print(f" RuCaptcha balance: ${balance}\n") if len(sys.argv) > 1: platform = sys.argv[1].lower() funcs = {"mistral": register_mistral, "groq": register_groq, "deepseek": register_deepseek, "huggingface": register_huggingface} if platform in funcs: email, password = [REDACTED]]() if email: billing = BILLING_URLS.get(platform, "") print(f"\n\033[92m{platform} registered!\033[0m") print(f" Email: {email}") print(f" Password: {password}") print(f" Billing: {billing}") print(f" Mail: https://www.mailinator.com/v4/public/inboxes.jsp?to={email.split('@')[0]}") return results = {} for platform, func in [("mistral", register_mistral), ("deepseek", register_deepseek), ("huggingface", register_huggingface)]: print(f"\n\033[93m▶ {platform}\033[0m") try: email, password = func() results[platform] = {"email": email, "password": password} except Exception as e: log(platform, f"Error: {e}", "err") print(f"\n\033[1;96m{'='*70}\033[0m") print(f"\033[1;96m SUMMARY\033[0m") print(f"\033[1;96m{'='*70}\033[0m\n") for platform, data in results.items(): if data.get("email"): billing = BILLING_URLS.get(platform, "") print(f" \033[92m✅ {platform:15s}\033[0m {data['email']}") print(f" Billing: {billing}") print(f"\nCredentials saved to: {CREDS_FILE}") if __name__ == "__main__": main()