From 940cc23b829157133701b1516ec29e2bfd395ee6 Mon Sep 17 00:00:00 2001 From: reform Date: Fri, 23 Oct 2026 20:04:01 +0300 Subject: [PATCH] recovered snapshot from suspended aaronjaworski710 (history unavailable) --- README.md | 161 ++++++++++++++++++++++++++++ api_notes.md | 95 +++++++++++++++++ omni_reg.py | 270 +++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 1 + 4 files changed, 527 insertions(+) create mode 100644 README.md create mode 100644 api_notes.md create mode 100644 omni_reg.py create mode 100644 requirements.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..38ff54a --- /dev/null +++ b/README.md @@ -0,0 +1,161 @@ +# omnirush-autoreg + +Fully automated account registration for [OmniRush.ai](https://omnirush.ai) — an AI gateway/console with human-reviewed signup. Pure Python, stdlib only (no browser needed): the whole flow is a reversed HTTP API. + +## How it works (reversed API) + +All endpoints below were extracted from the site's minified bundles (`omnirush-api-*.js`, `registration-*.js`, `console-auth-*.js`, `button-*.js`). + +### 1. Registration options (public, no auth) + +``` +GET https://omnirush.ai/omnirush/registration/options +``` + +Returns captcha config, allowed email domains, consent version, approval mode: + +```json +{ + "signups_paused": false, + "auto_approve": false, + "approval_state": "pending", + "consent_version": "2026-10-07", + "captcha": { "provider": "recaptcha", "mode": "v3", "site_key": "6Lcw...", "action": "signup" }, + "domains": [ ...allowed email domains... ] +} +``` + +Key facts: +- captcha = **reCAPTCHA v3** (invisible, score-based), action `signup` +- `auto_approve: false` → new accounts land in `pending` and are human-reviewed +- email must be on an allowed domain list + +### 2. Solve reCAPTCHA v3 + +Any captcha-solving service that supports v3 works (2captcha used here, ~$0.003/solve): + +``` +POST https://api.2captcha.com/in.php + key=...&method=userrecaptcha&version=v3&googlekey= + &pageurl=https://omnirush.ai/console&action=signup&json=1 +→ {"status":1,"request":""} + +POST https://api.2captcha.com/res.php + key=...&action=get&id=&json=1 +→ {"status":1,"request":""} +``` + +Token TTL is ~120 s — submit registration promptly. Wrong `action` ⇒ server answers `captcha_failed`. + +### 3. Register + +``` +POST https://omnirush.ai/omnirush/register/password +Content-Type: application/json +X-OmniRush-Client-Signals: ch=windows&gl=d3d11&font=segoe&touch=0 (optional) + +{ + "email": "user@allowed-domain", + "display_name": "Max Bauer", + "domain": "devops-sre", + "occupation": "Backend developer", + "referral_source": "search", + "consent_version": "2026-10-07", + "accept_consent": true, + "password": "", + "captcha_token": "" +} +``` + +Success → `HTTP 200`: + +```json +{"expires_at": "...", "redirect_path": "/console", "consent_required": false} +``` + +plus a session cookie (30 days). Known error codes: `session_required` (you hit `/omnirush/register` — wrong endpoint, that one is for signed-in flows), `captcha_failed` (bad/expired token or wrong action), `email_domain_not_allowed`, `signups_paused`. + +### 4. Email verification + +The mailbox receives a 6-digit code almost instantly (IMAP): + +``` +POST /omnirush/me/verify-email {"code": "123456"} +POST /omnirush/me/verify-email/resend (empty body) +``` + +→ `email_verified: true`, account `status: active`, `approval_state: pending` until a human approves it. + +### 5. Session / profile + +``` +GET /omnirush/me → {approval_state, email_verified, ...} +POST /omnirush/auth/password {"email": ..., "password": ...} → login +POST /omnirush/auth/magic-link {"email": ..., "redirect_path": "/console"} +POST /omnirush/auth/exchange {"token": ...} (magic-link token → session) +POST /omnirush/activate {"token": ...} (invite/activation links) +GET /omnirush/auth/check?email=... → email availability +``` + +### Discord SSO (alternative path) + +`GET /omnirush/auth/discord` → `discord.com/oauth2/authorize` (client_id `1527478638506086639`, scope `identify email`, prompt `none`) → callback `/omnirush/auth/discord/callback`. The Discord side is guarded by hCaptcha Enterprise, so the HTTP path above is the practical one. + +## Usage + +```bash +python omni_reg.py [count] +``` + +Config is at the top of `omni_reg.py`: + +| Var | Meaning | +|---|---| +| `KEY_FILE` | JSON with 2captcha keys `[{"label":..., "key":...}]` — richest balance auto-selected | +| `POOL` | text file `email:password` per line (IMAP creds of the mailboxes) | +| `IMAP_HOST` | IMAP server of the pool's mailboxes | +| `STATE` | progress file `{"idx": N}` | +| `ACC` | output JSONL — one record per account | + +Output record: email, password, display_name, approval_state, email_verified, me, session cookies, IMAP pass (for your own pool). + +## Service facts (from live API + bundles) + +**Models** (`omnirush-api` bundle): +- `gpt-6-astra` — "GPT 6 Astra" (default), reasoning levels `low/high/xhigh/max` +- `gpt-5.6-sol` — "GPT-5.6 Sol", same reasoning levels +- Meta Muse family: `meta-muse-spark`, `muse-spark-1.1/1.2/1.3` + +**Limits** (from `/omnirush/me` usage on a fresh account): +- daily token limit: **500 000/day** (`grant_model: daily`, resets 00:00 UTC) +- weekly cap: **15 000 000** +- link Discord or GitHub → **5 000 000/day** (`discord_daily`/`github_daily`), weekly grant 70M +- link requirements: account age ≥ 1 day for activation (`min_link_days`), ≥ 30 days + 1 public repo for daily boosts (`link_min_age_days`, `github_min_public_repos`) + +**Activation gate**: after email verify the account sits in +`waiting: {reason: "needs_link", link_options: ["discord","github"]}` and +`model_access: false` until a Discord/GitHub account is linked (then human approval, +`auto_approve: false`). Login (`/omnirush/auth/password`) and `/omnirush/me` work +already while pending. + +**Clients**: no web chat (`web_chat: false`) — desktop app for macOS (Apple silicon), +Linux x64, WSL; downloads at `/omnirush/download/`. Sessions/traces are +QC-judged (`quality.tier`, spins, leaderboard) — the platform collects coding-session +traces. + +## Notes + +- ~40 s per account end-to-end; pacing 15–30 s between accounts is enough (no IP bans observed on residential IP). +- Accounts stay `pending` until approved — OmniRush reviews requests manually. Keep `domain`/`occupation` realistic (developer/ML/devops values pass validation). +- `password_confirm` is client-side only and stripped before the request. +- Respect the target's ToS; this repo is for authorized automation research of your own accounts. + +## Repo layout + +``` +omni_reg.py # the whole pipeline (register → IMAP code → verify → me) +api_notes.md # this reverse-engineering reference +``` + +--- +t.me/AlStack — more reversed stacks & free API farms. diff --git a/api_notes.md b/api_notes.md new file mode 100644 index 0000000..b982d63 --- /dev/null +++ b/api_notes.md @@ -0,0 +1,95 @@ +# OmniRush.ai — reversed API notes + +Extracted from site bundles: `omnirush-api-BCDm5SzM.js`, `registration-LBv3GV6_.js`, +`console-auth-Bd6xK1Ee.js`, `button-DFWc89vJ.js`. + +## Endpoint table + +| Method | Path | Auth | Purpose | +|---|---|---|---| +| GET | `/omnirush/registration/options` | – | captcha config, allowed domains, consent version, approval mode | +| GET | `/omnirush/auth/check?email=` | – | email availability | +| POST | `/omnirush/register/start` | – | magic-link signup (no password) | +| POST | `/omnirush/register/password` | – | password signup (the one used here) | +| POST | `/omnirush/register` | session | signed-in flow only → `session_required` if anonymous | +| POST | `/omnirush/me/verify-email` | session | submit 6-digit code | +| POST | `/omnirush/me/verify-email/resend` | session | resend code (empty body) | +| GET | `/omnirush/me` | session | profile: `approval_state`, `email_verified` | +| POST | `/omnirush/auth/password` | – | login `{email, password}` | +| POST | `/omnirush/auth/magic-link` | – | send magic link `{email, redirect_path}` | +| POST | `/omnirush/auth/exchange` | – | magic-link token → session `{token}` | +| GET | `/omnirush/activate/status` | – | activation status | +| POST | `/omnirush/activate` | – | `{token}` from invite/activation email | +| GET | `/omnirush/auth/discord` | – | Discord SSO start (hCaptcha Enterprise on Discord side) | +| GET | `/omnirush/auth/discord/callback` | – | Discord SSO callback | + +## Signup payload (`/omnirush/register/password`) + +```json +{ + "email": "user@allowed-domain", + "display_name": "Max Bauer", + "domain": "devops-sre", + "occupation": "Backend developer", + "referral_source": "search", + "consent_version": "2026-10-07", + "accept_consent": true, + "password": "...", + "captcha_token": "" +} +``` + +- Optional header: `X-OmniRush-Client-Signals: ch=windows&gl=d3d11&font=segoe&touch=0` + (client fingerprint hint; requests pass without it too). +- Optional fields: `redirect_path`, `referral_code`. +- `password_confirm` is client-side only (stripped by the payload builder `KS`). +- Response 200: `{expires_at, redirect_path, consent_required}` + session cookie (~30 days). + +## Error codes seen + +| Code | Meaning | +|---|---| +| `session_required` | endpoint needs a logged-in session (e.g. `/omnirush/register` anonymously) | +| `captcha_failed` | token invalid/expired or wrong `action` (must be `signup`) | +| `email_domain_not_allowed` | mailbox domain not in allowed list | +| `signups_paused` | registration closed | +| `consent_version_outdated` | send current `consent_version` from options | + +## reCAPTCHA v3 specifics + +- sitekey `6LcwStMtAAAAAIIYIMlD3G53LRtZcxUE3_BZumMc`, action `signup`, invisible. +- 2captcha `userrecaptcha` + `version=v3`, ~$0.003/solve, token in ~7 s (rare 60 s). +- Server verifies score/action via siteverify → tokens with wrong action are rejected + even though they are structurally valid. +- Token TTL ~120 s: solve → register immediately (script retries once on `captcha_failed`). + +## Approval / activation gate + +`auto_approve: false` — every new account is `pending` human review, and +`/omnirush/me` shows `waiting: {reason: "needs_link", link_options: ["discord","github"]}` +with `model_access: false` until a Discord or GitHub account is linked +(min age 1 day for activation; 30 days + ≥1 public repo for the 5M/day boost). + +Fresh-account usage (from `/omnirush/me`): + +```json +{"usage": { + "token_limit": 500000, "period": "day", "grant_model": "daily", + "week": {"limit": 15000000}, + "new_account": {"discord_daily": 5000000, "github_daily": 5000000, "week_cap": 15000000} +}} +``` + +Login while pending works: `POST /omnirush/auth/password {email, password}` → 200 + session. + +## Models + +| id | display | notes | +|---|---|---| +| `gpt-6-astra` | GPT 6 Astra | default, reasoning `low/high/xhigh/max` | +| `gpt-5.6-sol` | GPT-5.6 Sol | reasoning `low/high/xhigh/max` | +| `meta-muse-spark`, `muse-spark-1.1/1.2/1.3` | Meta Muse | family "Meta Muse" | + +No web chat (`web_chat: false`); desktop clients for macOS / Linux / WSL at +`/omnirush/download/`. The platform QC-judges uploaded coding-session traces +(`quality.tier`, spins, leaderboard). diff --git a/omni_reg.py b/omni_reg.py new file mode 100644 index 0000000..d6977d5 --- /dev/null +++ b/omni_reg.py @@ -0,0 +1,270 @@ +# -*- coding: utf-8 -*- +"""OmniRush.ai autoreg — reversed HTTP API, no browser needed. + +Flow: + GET /omnirush/registration/options (captcha config, domains, consent) + solve reCAPTCHA v3 (action=signup) via 2captcha-compatible API + POST /omnirush/register/password (creates account + session cookie) + IMAP: read 6-digit code from OmniRush mail + POST /omnirush/me/verify-email {"code": ...} (activates account) + GET /omnirush/me (approval_state / email_verified) + +Usage: python omni_reg.py [count] + +Config: edit the constants below or point KEY_FILE/POOL at your own files. + KEY_FILE: JSON list [{"label": "...", "key": "2captcha-key"}, ...] + POOL: text file, one "email:imap_password" per line +Only Python stdlib is used. +""" +import json, sys, time, random, string, re, os +import urllib.request, urllib.error, urllib.parse +import http.cookiejar +import imaplib, email as emaillib + +BASE = "https://omnirush.ai" +SITEKEY = "6LcwStMtAAAAAIIYIMlD3G53LRtZcxUE3_BZumMc" # public, from site bundle +PAGEURL = "https://omnirush.ai/console" +ACTION = "signup" # must match server-side check +CONSENT = "2026-10-07" +SIGNALS = "ch=windows&gl=d3d11&font=segoe&touch=0" # X-OmniRush-Client-Signals (optional) +POOL = "mails.txt" # email:imap_pass per line +STATE = "omni_state.json" +ACC = "omni_accounts.jsonl" +KEY_FILE = "captcha_keys.json" # [{"label":..,"key":..}] +IMAP_HOST = "imap.example.com" # IMAP of your mailboxes +CAPTCHA_API = "https://api.2captcha.com" # any 2captcha-compatible endpoint +UA = ("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " + "(KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36") + +OCCUPATIONS = ["Backend developer", "Software engineer", "DevOps engineer", + "Full-stack developer", "Systems programmer", "ML engineer"] +SOURCES = ["search", "github", "reddit", "hacker news", "a friend"] +DOMAINS = ["software", "devops-sre", "data-ml", "security", "systems-kernel"] + + +def load_key(): + """Pick the captcha key with the highest balance.""" + d = json.load(open(KEY_FILE)) + ks = d["keys"] if isinstance(d, dict) else d + best, best_bal = None, -1e9 + for k in ks: + try: + out = post_form(CAPTCHA_API + "/res.php", + {"key": k["key"], "action": "getbalance", "json": 1}, timeout=30) + bal = float(json.loads(out).get("request", -1)) + except Exception: + bal = -1.0 + print(" key %s balance $%.3f" % (k.get("label"), bal)) + if bal > best_bal: + best, best_bal = k["key"], bal + if best_bal < 0.05: + raise RuntimeError("all captcha keys empty (best $%.3f)" % best_bal) + return best + + +def post_form(url, data, timeout=60): + r = urllib.request.Request(url, data=urllib.parse.urlencode(data).encode(), + headers={"Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "Mozilla/5.0"}) + return urllib.request.urlopen(r, timeout=timeout).read().decode() + + +def solve_recaptcha_v3(key, action=ACTION): + sub = post_form(CAPTCHA_API + "/in.php", { + "key": key, "method": "userrecaptcha", "version": "v3", + "googlekey": SITEKEY, "pageurl": PAGEURL, "action": action, "json": 1}) + j = json.loads(sub) + if j.get("status") != 1: + raise RuntimeError("v3 submit fail: %s" % sub[:200]) + rid = j["request"] + for _ in range(30): + time.sleep(7) + g = post_form(CAPTCHA_API + "/res.php", + {"key": key, "action": "get", "id": rid, "json": 1}) + gj = json.loads(g) + if gj.get("status") == 1: + return gj["request"] + if "CAPCHA_NOT_READY" in str(gj.get("request", "")): + continue + raise RuntimeError("v3 get fail: %s" % g[:200]) + raise RuntimeError("v3 timeout") + + +class Client: + """JSON client with cookie jar + the signals header the SPA sends.""" + + def __init__(self): + self.cj = http.cookiejar.CookieJar() + self.op = urllib.request.build_opener( + urllib.request.HTTPCookieProcessor(self.cj)) + self.op.addheaders = [ + ("User-Agent", UA), + ("Accept", "application/json"), + ("Accept-Language", "en-US,en;q=0.9"), + ("Origin", BASE), + ("Referer", BASE + "/console"), + ("X-OmniRush-Client-Signals", SIGNALS), + ] + + def req(self, path, data=None, method=None, timeout=40): + body = json.dumps(data).encode() if data is not None else None + r = urllib.request.Request(BASE + path, data=body, + method=method or ("POST" if data is not None else "GET")) + if body is not None: + r.add_header("Content-Type", "application/json") + try: + with self.op.open(r, timeout=timeout) as resp: + raw = resp.read().decode("utf-8", "replace") + try: + return resp.status, json.loads(raw) + except Exception: + return resp.status, raw + except urllib.error.HTTPError as e: + raw = e.read().decode("utf-8", "replace") + try: + return e.code, json.loads(raw) + except Exception: + return e.code, raw + + +def imap_wait(email_addr, ipass, timeout=300): + """Return (code6, activate_token, links) from OmniRush mails.""" + deadline = time.time() + timeout + while time.time() < deadline: + try: + m = imaplib.IMAP4_SSL(IMAP_HOST) + m.login(email_addr, ipass) + m.select("INBOX") + typ, data = m.search(None, '(SUBJECT "OmniRush")') + ids = data[0].split() if data and data[0] else [] + for i in ids[-5:]: + typ, md = m.fetch(i, "(RFC822)") + if not md or not md[0]: + continue + msg = emaillib.message_from_bytes(md[0][1]) + body = "" + if msg.is_multipart(): + for part in msg.walk(): + if part.get_content_type() in ("text/plain", "text/html"): + body += part.get_payload(decode=True).decode("utf-8", "replace") + else: + body = msg.get_payload(decode=True).decode("utf-8", "replace") + code = re.search(r"\b(\d{6})\b", re.sub(r"<[^>]+>", " ", body)) + act = re.search(r"omnirush\.ai/omnirush/activate\?token=([\w.-]+)", body) + if not act: + act = re.search(r"/activate[^\"'\s]*token=([\w.-]+)", body) + links = re.findall(r"https://omnirush\.ai/[^\s\"'<]+", body) + if code or act or links: + m.logout() + return (code.group(1) if code else None, + act.group(1) if act else None, links) + m.logout() + except Exception as e: + print(" imap err:", str(e)[:90]) + time.sleep(15) + return None, None, [] + + +def rnd_name(): + a = random.choice(["Alex", "Max", "Nick", "Ivan", "Oleg", "Dmitry", "Sergey", + "Pavel", "Anton", "Kirill", "Victor", "Roman"]) + b = random.choice(["Morgan", "Fischer", "Lang", "Weber", "Keller", "Novak", + "Bauer", "Richter", "Wolf", "Stein"]) + return "%s %s" % (a, b) + + +def one(email_addr, ipass, key): + c = Client() + pw = "Om" + "".join(random.choices(string.ascii_letters + string.digits, k=14)) + "3!" + payload = { + "email": email_addr, + "display_name": rnd_name(), + "domain": random.choice(DOMAINS), + "occupation": random.choice(OCCUPATIONS), + "referral_source": random.choice(SOURCES), + "consent_version": CONSENT, + "accept_consent": True, + "password": pw, + } + rec = {"email": email_addr, "imap_pass": ipass, "password": pw, + "display_name": payload["display_name"], "ts": int(time.time())} + + for attempt in range(2): + t0 = time.time() + tok = solve_recaptcha_v3(key) + print(" recaptcha v3 token %d chars in %.0fs" % (len(tok or ""), time.time() - t0)) + payload["captcha_token"] = tok + st, resp = c.req("/omnirush/register/password", payload) + print(" register HTTP %s: %s" % (st, str(resp)[:220])) + code = resp.get("code") if isinstance(resp, dict) else None + detail = resp.get("detail") if isinstance(resp, dict) else None + err = code or detail + if st in (200, 201): + rec["approval_state"] = resp.get("approval_state") if isinstance(resp, dict) else "?" + rec["resp"] = resp if isinstance(resp, dict) else str(resp)[:200] + break + if err == "captcha_failed" and attempt == 0: + print(" captcha_failed, retrying with fresh token") + time.sleep(3) + continue + rec["error"] = str(err or resp)[:120] + return rec + else: + return rec + + # email verification (6-digit code) or activate-token fallback + code6, act_tok, links = imap_wait(email_addr, ipass) + if code6: + st, r2 = c.req("/omnirush/me/verify-email", {"code": code6}) + print(" verify-email(%s) HTTP %s: %s" % (code6, st, str(r2)[:120])) + rec["email_verified"] = st in (200, 201, 204) + elif act_tok: + st, r2 = c.req("/omnirush/activate", {"token": act_tok}) + print(" activate HTTP %s: %s" % (st, str(r2)[:120])) + rec["activated"] = st in (200, 201, 204) + else: + print(" no verify mail found; links=%s" % (links[:2],)) + rec["email_verified"] = False + st, me = c.req("/omnirush/me") + if st == 200 and isinstance(me, dict): + rec["me"] = {"approval_state": me.get("approval_state"), + "email_verified": me.get("email_verified", me.get("verified"))} + print(" me: %s" % json.dumps(rec["me"])) + try: + rec["cookies"] = {ck.name: ck.value for ck in c.cj} + except Exception: + pass + return rec + + +def main(): + count = int(sys.argv[1]) if len(sys.argv) > 1 else 1 + key = load_key() + pool = [] + for line in open(POOL, encoding="utf-8"): + line = line.strip() + if line and not line.startswith("#") and ":" in line: + e, p = line.rsplit(":", 1) + pool.append((e, p)) + stt = json.load(open(STATE)) if os.path.exists(STATE) else {"idx": 0} + ok = 0 + while ok < count and stt["idx"] < len(pool): + email_addr, ipass = pool[stt["idx"]] + stt["idx"] += 1 + json.dump(stt, open(STATE, "w")) + print("[%d/%d] %s" % (stt["idx"], len(pool), email_addr)) + try: + rec = one(email_addr, ipass, key) + except Exception as e: + print(" EXC:", str(e)[:200]) + rec = {"email": email_addr, "imap_pass": ipass, "error": str(e)[:200]} + with open(ACC, "a", encoding="utf-8") as f: + f.write(json.dumps(rec, ensure_ascii=False) + "\n") + if not rec.get("error"): + ok += 1 + time.sleep(random.uniform(15, 30)) + print("DONE ok=%d idx=%d" % (ok, stt["idx"])) + + +if __name__ == "__main__": + main() diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..cd0f8fe --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +# omnirush-autoreg — stdlib only (urllib/imaplib). No pip deps required.