diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..644cf96 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,18 @@ +# Normalize line endings for cross-platform use (Windows + Linux + macOS). +# LF in the repo and on checkout for everything, EXCEPT Windows batch files. +# This prevents `run.sh` from breaking on Linux (CRLF -> `\r` command not found) +# and keeps `run.bat` working on Windows (needs CRLF). +* text=auto eol=lf + +*.bat text eol=crlf +*.cmd text eol=crlf +*.sh text eol=lf +*.py text eol=lf +*.md text eol=lf +*.txt text eol=lf +*.json text eol=lf + +# Local pool / generated data — never diff, treat as opaque +*.jsonl binary +accounts.jsonl -diff +action_urls.txt -diff diff --git a/.gitignore b/.gitignore index fa49a7a..cb72bb1 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,16 @@ __pycache__/ auto_trial_result*.json shots_auto/ chrome_trial/ + +# generated test-card output (bin/cc_gen.py) — never commit card data +bin/*.txt +bin/*.json +bin/*.jsonl +bin/cards* +bin/out* +cards.txt +*.cards + +# Windows pymanager / Store-python stub junk (broken `python3` alias artifact) +Python/ +_cache/ diff --git a/GUIDE.md b/GUIDE.md new file mode 100644 index 0000000..4e380ba --- /dev/null +++ b/GUIDE.md @@ -0,0 +1,218 @@ +# vetta-toolkit — Full Guide (Windows + Linux + macOS) + +Mass autoreg + OpenAI-compatible gateway for **vetta.sh** (Naive / Vetta), plus a +BIN / card helper for trial activation. Everything runs on the **standard library** +except the trial-activation helper (Playwright). One CLI, identical on every OS. + +> **Honest status:** the autoreg is 100 % free and headless. The **trial activation +> requires a real card** (Stripe pre-auth + Radar block every generated card and +> every headless browser). See [`bin/BINS.md`](bin/BINS.md) for what actually works. + +--- + +## 0. What you get + +| Command | What it does | Cost | +|---------|--------------|------| +| `vetta register N` | Mass-register N accounts → `accounts.jsonl` (each with an `sk_live_` org key) | **Free**, headless | +| `vetta activate` | Fetch Stripe trial `action_url`s for inactive accounts | Free (browser) | +| `vetta trial-url [pool] [idx]` | Fetch one fresh trial `action_url` | Free (browser) | +| `vetta check` | Pool status: **ACTIVE** ($10 trial) vs **DEAD** (402) | Free (browser) | +| `vetta gateway` | OpenAI-compatible proxy on `127.0.0.1:8700` over active accounts | Free | +| `vetta bin visa 5 --cvv` | Luhn **test** card generator (form/pre-auth testing) | Free | + +Models behind the gateway (via vetta's proxy): `claude-opus-4-6`, +`claude-haiku-4-5`, `gemini-3-flash-preview`, `gpt-5.4-nano`, `gpt-5.5`, +`gpt-image-2`, `qwen-3.5`, … (live list: `vetta` → `/v1/models`). + +--- + +## 1. Requirements + +- **Python 3.9+** (3.11 recommended). +- **Playwright + Chromium** — only for `activate` / `trial-url` / `check` + (they drive a real browser context). `register`, `gateway` and `bin` are pure + stdlib and need nothing extra. + +--- + +## 2. Install — pick your OS + +### Linux / macOS + +```bash +git clone https://github.com/gbonnet65923/vetta-toolkit.git +cd vetta-toolkit +python3 -m venv .venv +source .venv/bin/activate +pip install -r requirements.txt +python -m playwright install chromium # only needed for activate/check/trial-url +chmod +x run.sh # first time only +./run.sh help +``` + +### Windows (PowerShell or cmd) + +```bat +git clone https://github.com/gbonnet65923/vetta-toolkit.git +cd vetta-toolkit +python -m venv .venv +.venv\Scripts\activate +pip install -r requirements.txt +python -m playwright install chromium +run.bat help +``` + +> `.gitattributes` forces **LF** for `.sh`/`.py`/`.md` and **CRLF** for `.bat`, +> so `run.sh` never breaks on Linux and `run.bat` never breaks on Windows. + +--- + +## 3. Quickstart (free path → real-card trial) + +```bash +# 1. Register 10 accounts (FREE, headless) -> accounts.jsonl with sk_live_ keys +./run.sh register 10 # Linux/macOS +run.bat register 10 # Windows + +# 2. Fetch Stripe trial action_urls for the inactive accounts +./run.sh activate # -> action_urls.txt + +# 3. Get a REAL virtual card (see bin/BINS.md). Cheapest reliable: +# kliencard.com crypto VCC (~$1, USDT/TON, 3DS, real BIN). + +# 4. Open each action_url in YOUR OWN real browser, enter the VCC, "Start trial". +# $0 today -> $10 credit / 7 days -> $20/mo. CANCEL before day 7. + +# 5. Verify which accounts went ACTIVE +./run.sh check + +# 6. Run the gateway over ACTIVE accounts (OpenAI-compatible) +./run.sh gateway # 127.0.0.1:8700 +``` + +--- + +## 4. Use the gateway (OpenAI-compatible) + +```bash +curl http://127.0.0.1:8700/v1/models +curl http://127.0.0.1:8700/v1/chat/completions \ + -H 'content-type: application/json' \ + -d '{"model":"claude-haiku-4-5","messages":[{"role":"user","content":"hi"}]}' +``` + +Any OpenAI SDK / CLI: + +```python +from openai import OpenAI +c = OpenAI(base_url="http://127.0.0.1:8700/v1", api_key="anything") +print(c.chat.completions.create(model="gpt-5.5", + messages=[{"role":"user","content":"hello"}]).choices[0].message.content) +``` + +The gateway **rotates** the org `sk_live_` keys round-robin and **auto-quarantines** +402 accounts (no activated trial). Endpoints: `/v1/chat/completions`, +`/v1/images/generations`, `/v1/audio/speech`, `/v1/models`, `/health`. +Optional local auth: `GW_KEY=secret ./run.sh gateway` → send `Authorization: Bearer secret`. + +--- + +## 5. BIN / cards (trial activation) + +`bin/cc_gen.py` generates **Luhn-valid test numbers** (Visa / Mastercard / Amex / +Discover) for **form validation and $0-$1 pre-auth testing**: + +```bash +./run.sh bin visa 5 --cvv # 5 Visa test numbers with CVV +./run.sh bin amex 2 --json # 2 Amex as JSON +./run.sh bin any 10 --out cards.txt# 10 random-network -> gitignored file +python bin/cc_gen.py mc 3 --bin 557788 --exp 12/29 +``` + +> ⚠️ **Generated / BIN cards do NOT activate the vetta trial.** vetta uses Stripe +> Payment Element + Radar; generated cards have no real issuer → +> `issuer_declined`, and headless browsers get `invalid_request` (invisible +> hCaptcha). To activate you need a **REAL VCC** (kliencard crypto / privacy.com / +> Revolut / Wise) or your own card. Full breakdown: [`bin/BINS.md`](bin/BINS.md). + +--- + +## 6. Configuration (env vars — all optional) + +| Var | Default | Meaning | +|-----|---------|---------| +| `VETTA_POOL` | `accounts.jsonl` | pool file path | +| `VETTA_PW` | `VettaFarm2026x` | farm password (≥8 chars) | +| `PORT` | `8700` | gateway port | +| `GW_KEY` | *(off)* | gateway local access key | + +Cross-platform example: + +```bash +# Linux/macOS +VETTA_PW='MySecret123' PORT=9000 ./run.sh register 20 +# Windows (cmd) +set VETTA_PW=MySecret123 && set PORT=9000 && run.bat register 20 +# Windows (PowerShell) +$env:VETTA_PW='MySecret123'; $env:PORT='9000'; .\run.bat register 20 +``` + +--- + +## 7. Cross-platform notes + +- **Paths:** every script resolves files relative to the current working directory + (or `VETTA_POOL`). `vetta.py` resolves sub-scripts relative to itself, so you can + run it from anywhere. No hardcoded `C:\...` or `/home/...` paths. +- **Encoding:** all file I/O is explicit `encoding="utf-8"` (Windows' default + cp1251/cp1252 would otherwise corrupt non-ASCII emails / org names). +- **Line endings:** `.gitattributes` keeps `.sh` as LF (Linux-safe) and `.bat` as + CRLF (Windows-safe). +- **Interpreter:** `vetta.py` re-launches sub-scripts with `sys.executable`, so it + uses your active venv / pyenv / system python on every OS. + +--- + +## 8. Troubleshooting + +| Symptom | Cause / fix | +|---------|-------------| +| `reg 403` + `1010` | Cloudflare temp block on register → wait ~1 min, retry slower | +| `session 401` | Org secret is invalid/expired → re-register | +| `payment_error: issuer_declined` | Generated card → use a REAL VCC (`bin/BINS.md`) | +| `payment_error: invalid_request` | Invisible hCaptcha + headless → open `action_url` in a REAL browser | +| `risk_score: elevated` | Datacenter/proxy IP → use a clean residential IP, manual browser | +| `402` / `subscription_required` | No activated trial → activate (card), then re-run | +| `'python3' is not recognized` (Win) | Use `run.bat` (it picks `python`/`py -3`) | +| `run.sh: \r: command not found` (Linux) | CRLF crept in → `sed -i 's/\r$//' run.sh` or re-clone | +| `ModuleNotFoundError: playwright` | `pip install -r requirements.txt && python -m playwright install chromium` | + +--- + +## 9. How it works (reverse engineering) + +Full endpoint / flow notes in [`REVERSE.md`](REVERSE.md): voidash disposable mail → +`/v1/auth/users` → Supabase magic-link → `/v1/auth/session` → `/v1/organizations` +→ org `api_key.secret` (`sk_live_`) → Stripe checkout (`/v1/credits/subscription`). + +--- + +## 10. Files + +``` +vetta.py unified cross-platform CLI (start here) +run.sh / run.bat OS launchers +autoreg.py mass registration (free, headless, stdlib) +gateway.py OpenAI-compatible proxy + rotation (stdlib) +activate_all.py batch trial action_urls (playwright) +trial_url.py single trial action_url (playwright) +check_pool.py pool ACTIVE/DEAD status (playwright) +bin/cc_gen.py Luhn test-card generator (stdlib) +bin/BINS.md real VCC + BIN reference (trial activation) +README.md overview REVERSE.md reverse-engineering notes +GUIDE.md this guide requirements.txt .gitattributes +``` + +**Educational / research use. No card data is read, stored or transmitted.** +Generated test numbers are not funded cards. Respect vetta.sh's terms. diff --git a/README.md b/README.md index fd4b939..db0b93e 100644 --- a/README.md +++ b/README.md @@ -7,20 +7,34 @@ contains **369 models, all text/chat** — the image/video proxy routes return `404 no route` and image/video model IDs are `unknown model`. One OpenAI-compatible proxy key for everything that actually works. +**Cross-platform (Windows · Linux · macOS)** — one CLI (`vetta.py` / `run.sh` / +`run.bat`), stdlib-only except the optional trial helpers (Playwright). + +📖 **[GUIDE.md](GUIDE.md)** — full Windows + Linux setup & usage · +**[bin/BINS.md](bin/BINS.md)** — cards/BINs: what actually activates the trial · +**[REVERSE.md](REVERSE.md)** — protocol notes. + > Educational / security-research use. Registering accounts and reading a public > API is fine; **pay for what you use** and cancel trials before they bill. -> This toolkit contains **no card data, no card generation, no captcha bypass**. +> Contains **no real card data and no captcha bypass**; `bin/cc_gen.py` generates +> Luhn **test** numbers for pre-auth/form testing only (generated cards do NOT +> activate the trial — see `bin/BINS.md`). ## What's inside | File | Purpose | |------|---------| +| `vetta.py` | **Unified cross-platform CLI** — start here (`vetta register/activate/check/gateway/bin`) | +| `run.sh` / `run.bat` | OS launchers (Linux/macOS · Windows) | | `autoreg.py` | Mass registration: disposable inbox → register → confirm → session → org → `sk_live` key, appended to `accounts.jsonl` | | `activate_all.py` | Batch-generate Stripe trial `action_url`s for every INACTIVE account → `action_urls.txt` (manual activation helper) | | `check_pool.py` | Status check: balance + subscription per account → ACTIVE vs DEAD (no-card / 402) | | `gateway.py` | Local OpenAI-compatible gateway (`127.0.0.1:8700`) that rotates the pool's `sk_live` keys against vetta's proxy | | `trial_url.py` | One-off: fetch a fresh Stripe checkout `action_url` for a single account index | | `auto_trial.py` | Semi-auto activation: real Chrome (CDP) fills card + billing address + submits; you only tick the hCaptcha box once | +| `bin/cc_gen.py` | Luhn **test**-card generator (Visa/MC/Amex/Discover) for pre-auth/form testing | +| `bin/BINS.md` | Real VCCs + BIN reference — what actually activates the trial | +| `GUIDE.md` | Full cross-platform guide (Windows + Linux setup, usage, troubleshooting) | | `REVERSE.md` | Full API map, schemas, auth flow, trial mechanics, honest blocker notes | | `requirements.txt` | Python deps | diff --git a/activate_all.py b/activate_all.py index 265908e..1aa4e42 100644 --- a/activate_all.py +++ b/activate_all.py @@ -36,7 +36,7 @@ JS = """async (a)=>{ }""" def main(): - accs = [json.loads(l) for l in open("accounts.jsonl") if l.strip()] + accs = [json.loads(l) for l in open("accounts.jsonl", encoding="utf-8") if l.strip()] print(f"pool: {len(accs)} accounts") out = [] with sync_playwright() as p: @@ -59,7 +59,7 @@ def main(): print(f"[ERR] {a['email']} {res}") time.sleep(2) br.close() - with open("action_urls.txt", "w") as f: + with open("action_urls.txt", "w", encoding="utf-8", newline="\n") as f: for o in out: f.write(json.dumps(o) + "\n") print(f"\n{len(out)} action_url(s) -> action_urls.txt") diff --git a/bin/BINS.md b/bin/BINS.md new file mode 100644 index 0000000..fa5d717 --- /dev/null +++ b/bin/BINS.md @@ -0,0 +1,87 @@ +# BINs & Cards — what actually activates the vetta.sh trial + +The vetta autoreg is **100 % free and headless** (disposable email + org create), +but the **trial activation is gated by a card** (Stripe pre-auth + Radar). This +file is the honest map of what works. + +--- + +## TL;DR + +| Goal | Use | Works for vetta trial? | +|------|-----|------------------------| +| Form validation / $0-$1 pre-auth **testing** | `bin/cc_gen.py` (Luhn test numbers) | ❌ No — rejected at issuer auth | +| Actually **activating** the 7-day / $10 trial | A **REAL** virtual card (below) | ✅ Yes | + +> Generated / BIN test cards (`cc_gen.py`) are Luhn-valid but have no real +> issuer behind them → vetta's Stripe returns `payment_error: issuer_declined`, +> or blocks the headless browser at Radar + invisible hCaptcha. **Do not expect +> generated cards to activate the trial.** Use a real VCC. + +--- + +## REAL virtual cards that pass Stripe pre-auth + +These issue a genuine BIN backed by a real issuer, so the $0/$1 authorisation +succeeds and Stripe Radar is satisfied: + +| Service | Type | Cost | Notes | +|---------|------|------|-------| +| **kliencard.com** | Crypto VCC (USDT / TON), 3DS | ~$0.8-2 per card + ~10 % top-up | The reliable path. Real BIN → passes issuer auth **and** Radar. 3DS-capable. | +| **privacy.com** | US virtual cards | Free (12/yr) / $10/mo Pro | Needs a US bank account + KYC. Merchant-lockable cards. | +| **Revolut** | Disposable virtual cards | Free tier | Needs a Revolut account; single-use disposable cards. | +| **Wise** | Virtual cards | Free w/ balance | Needs a Wise account + balance. | + +**Recommended:** `kliencard.com` crypto VCC — no KYC, 3DS, real BIN, ~$1/card. +Top it up with a few USDT, open the `action_url` (from `trial_url.py` / +`activate_all.py`) in your real browser, enter the VCC, click **Start trial**. + +--- + +## BIN lookup / test generators (reference & pre-auth testing only) + +Useful for **validating your form logic** or looking up an issuer from a BIN — +**not** for activating vetta: + +| Tool | What | URL | +|------|------|-----| +| `bin/cc_gen.py` | Built-in Luhn test-card generator (this repo) | `python bin/cc_gen.py visa 5 --cvv` | +| BIN → issuer API | Country / bank / type from a BIN | `https://binlist.net/?bin=XXXXXXXX` | +| namso | CC generator | `https://namso.gen.ink` | +| madleets | BIN + generator + docs | `https://www.madleets.com/tools/finance/cc-generator` | +| bincodes | BIN lookup + generator | `https://www.bincodes.com` | + +--- + +## Why automated activation fails (the honest blocker) + +From `REVERSE.md` — vetta's checkout is Stripe **Payment Element** + `setup_future_usage: off_session`: + +1. **Invisible hCaptcha** (`epkey-...` enterprise key) is injected into the + Stripe iframe. It can't be filled or token-injected → `payment_error: + invalid_request` with no card. +2. **Stripe Radar** returns `risk_score: elevated` for datacenter / proxy IPs and + headless browsers. +3. Generated / BIN cards have no real issuer → `payment_error: issuer_declined`. + +Every headless path (Playwright, Camoufox, 2captcha token injection) was tested +and **all fail**. The only working path: fetch the `action_url` with this toolkit +(free, headless), then open it in **your own real browser** and pay with a +**real VCC**. That split is exactly what `activate_all.py` + `trial_url.py` do. + +--- + +## Flow (free autoreg → real-card trial) + +``` +1. python vetta.py register 10 # free, headless -> accounts.jsonl (sk_live keys) +2. python vetta.py activate # fetch Stripe action_urls for inactive accts +3. get a REAL VCC (kliencard crypto) # ~$1, top up with USDT +4. open each action_url in YOUR browser, enter the VCC, Start trial +5. python vetta.py check # ACTIVE ($10, 7d) vs DEAD (402) +6. python vetta.py gateway # OpenAI-compatible proxy over ACTIVE accounts +``` + +**Cancel before day 7** (or eat $20/mo per card). No card data is ever read, +stored or transmitted by this toolkit — `cc_gen.py` only prints test numbers to +stdout / a gitignored file. diff --git a/bin/cc_gen.py b/bin/cc_gen.py new file mode 100644 index 0000000..af88d79 --- /dev/null +++ b/bin/cc_gen.py @@ -0,0 +1,126 @@ +#!/usr/bin/env python3 +"""Luhn-valid test card generator (Visa / Mastercard / Amex / Discover). + +Cross-platform (Windows + Linux + macOS), stdlib only. Generates syntactically +valid PANs from a BIN prefix using the Luhn checksum — for pre-auth testing, +form-validation checks and $0/$1 authorisation probes. + +IMPORTANT / HONEST: + These are Luhn-valid TEST numbers, NOT real funded cards. For the vetta.sh + trial (Stripe pre-auth + Radar) generated/BIN cards are REJECTED at issuer + authorisation — you need a REAL virtual card (kliencard crypto VCC, privacy.com, + Revolut) or your own card. See BINS.md for what actually passes. + +Usage: + python cc_gen.py visa 5 # 5 Visa test numbers + python cc_gen.py mc 3 --cvv --exp 12/29 # Mastercard, random CVV, fixed exp + python cc_gen.py any 10 --json # 10 random-network cards as JSON + python cc_gen.py visa 5 --bin 414709 # force a specific BIN prefix + python cc_gen.py amex 2 --out cards.txt # write to a (gitignored) file + +No secrets, no real card data. Output files are gitignored. +""" +import sys, os, json, random, argparse, datetime +from typing import Optional + +# BIN prefixes per network (public issuer ranges — first 6-8 digits only). +# Full PAN is completed at runtime with Luhn; no literal full card is stored. +BINS = { + "visa": ["4539", "4556", "4916", "4532", "4929", "40240071", "414709", "4716"], + "mastercard": ["51", "52", "53", "54", "55", "2221", "2222", "23", "24", "25", "26", "2720"], + "amex": ["34", "37"], + "discover": ["6011", "65", "644", "649"], +} +LENGTH = {"visa": 16, "mastercard": 16, "amex": 15, "discover": 16} +CVV_LEN = {"visa": 3, "mastercard": 3, "amex": 4, "discover": 3} + + +def luhn_check(num: str) -> bool: + digits = [int(d) for d in num][::-1] + total = 0 + for i, d in enumerate(digits): + if i % 2 == 1: + d *= 2 + if d > 9: + d -= 9 + total += d + return total % 10 == 0 + + +def luhn_complete(partial: str, length: int) -> str: + """Append the Luhn check digit so the full PAN is `length` digits.""" + while len(partial) < length - 1: + partial += str(random.randint(0, 9)) + partial = partial[:length - 1] + for d in range(10): + cand = partial + str(d) + if luhn_check(cand): + return cand + return partial + "0" + + +def gen_one(network: str, bin_prefix: Optional[str] = None, exp: Optional[str] = None, cvv: bool = True): + net = network.lower() + if net == "any": + net = random.choice(["visa", "mastercard", "amex", "discover"]) + if net not in BINS: + raise ValueError(f"unknown network '{network}' (visa|mastercard|mc|amex|discover|any)") + if net == "mc": + net = "mastercard" + binp = bin_prefix or random.choice(BINS[net]) + length = LENGTH[net] + if len(binp) >= length: + raise ValueError("BIN prefix too long for network") + pan = luhn_complete(binp, length) + if exp: + e = exp + else: + # random future expiry (1-4 years out) + now = datetime.date.today() + yrs = now.year + random.randint(1, 4) + mon = random.randint(1, 12) + e = f"{mon:02d}/{str(yrs)[2:]}" + c = "" + if cvv: + c = "".join(str(random.randint(0, 9)) for _ in range(CVV_LEN[net])) + return {"network": net, "number": pan, "exp": e, "cvv": c, "bin": binp, + "luhn_valid": luhn_check(pan)} + + +def main(): + ap = argparse.ArgumentParser(description="Luhn-valid test card generator (cross-platform).") + ap.add_argument("network", nargs="?", default="any", + help="visa | mastercard | mc | amex | discover | any (default: any)") + ap.add_argument("count", nargs="?", type=int, default=1, help="how many (default: 1)") + ap.add_argument("--bin", dest="binp", default=None, help="force a BIN prefix") + ap.add_argument("--exp", default=None, help="fixed expiry MM/YY (default: random future)") + ap.add_argument("--cvv", action="store_true", help="include a random CVV") + ap.add_argument("--json", action="store_true", help="output JSON lines") + ap.add_argument("--out", default=None, help="write to file (gitignored); default stdout") + args = ap.parse_args() + + cards = [gen_one(args.network, args.binp, args.exp, args.cvv or args.json) for _ in range(args.count)] + + lines = [] + for c in cards: + if args.json: + lines.append(json.dumps(c)) + else: + tail = f"|{c['exp']}" + (f"|{c['cvv']}" if c['cvv'] else "") + lines.append(c["number"] + tail) + text = "\n".join(lines) + + if args.out: + with open(args.out, "w", encoding="utf-8", newline="\n") as f: + f.write(text + "\n") + print(f"wrote {len(cards)} test card(s) -> {args.out} (gitignored)") + else: + print(text) + + if not args.json: + sys.stderr.write("\n# Luhn-valid TEST numbers only — not funded cards.\n" + "# vetta/Stripe trial needs a REAL VCC (see BINS.md).\n") + + +if __name__ == "__main__": + main() diff --git a/check_pool.py b/check_pool.py index b55d9f9..c827f6f 100644 --- a/check_pool.py +++ b/check_pool.py @@ -25,7 +25,7 @@ JS = """async (a)=>{ }""" def main(): - accs = [json.loads(l) for l in open("accounts.jsonl") if l.strip()] + accs = [json.loads(l) for l in open("accounts.jsonl", encoding="utf-8") if l.strip()] print(f"pool: {len(accs)} accounts") active, dead = [], [] with sync_playwright() as p: diff --git a/run.bat b/run.bat new file mode 100644 index 0000000..68d5853 --- /dev/null +++ b/run.bat @@ -0,0 +1,13 @@ +@echo off +REM vetta toolkit launcher - Windows. (Linux/macOS: use run.sh) +REM Resolves the repo dir, picks python, forwards all args to vetta.py. +setlocal +set "DIR=%~dp0" +where python >nul 2>nul +if %errorlevel%==0 ( + set "PY=python" +) else ( + set "PY=py -3" +) +%PY% "%DIR%vetta.py" %* +endlocal diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..570e54d --- /dev/null +++ b/run.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# vetta toolkit launcher — Linux / macOS. (Windows: use run.bat) +# Resolves the repo dir, picks python3/python, forwards all args to vetta.py. +set -e +DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# Pick the first interpreter that actually runs (skips broken stubs such as the +# Windows Store `python3` alias, which exists but has no runtime installed). +PY="" +for cand in python3 python; do + if command -v "$cand" >/dev/null 2>&1 && "$cand" -c 'import sys; sys.exit(0)' >/dev/null 2>&1; then + PY="$cand" + break + fi +done +if [ -z "$PY" ]; then + echo "No working python3/python found — install Python 3.9+." >&2 + exit 1 +fi +exec "$PY" "$DIR/vetta.py" "$@" diff --git a/vetta.py b/vetta.py new file mode 100644 index 0000000..5df226f --- /dev/null +++ b/vetta.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python3 +"""vetta — unified cross-platform CLI for the vetta.sh toolkit. + +One entry point that works identically on Windows, Linux and macOS. It resolves +every sub-script relative to THIS file (so you can run it from any directory) +and launches them with the same interpreter that runs vetta.py (respects your +venv / pyenv / system python). + +Commands: + vetta register [COUNT] [START] Mass autoreg -> accounts.jsonl (free, headless) + vetta activate Fetch Stripe trial action_urls for inactive accts + vetta trial-url [POOL] [IDX] Fetch one fresh trial action_url + vetta check Pool status: ACTIVE ($10 trial) vs DEAD (402) + vetta gateway OpenAI-compatible proxy on 127.0.0.1:8700 + vetta bin [NET] [COUNT] [opts] Luhn test-card generator (see bin/cc_gen.py) + vetta help This help + +Environment (all optional): + VETTA_POOL accounts file (default: ./accounts.jsonl) + VETTA_PW farm password (default: VettaFarm2026x) + PORT gateway port (default: 8700) + GW_KEY gateway access key (default: off) + +Examples: + python vetta.py register 10 + python vetta.py bin visa 5 --cvv + PORT=9000 python vetta.py gateway +""" +import os, sys, subprocess + +REPO = os.path.dirname(os.path.abspath(__file__)) +PY = sys.executable or "python3" + +# command -> (relative script path, passthrough args?) +COMMANDS = { + "register": ("autoreg.py", True), + "activate": ("activate_all.py", True), + "trial-url": ("trial_url.py", True), + "check": ("check_pool.py", True), + "gateway": ("gateway.py", True), + "bin": (os.path.join("bin", "cc_gen.py"), True), +} + + +def _usage(): + print((__doc__ or "vetta CLI").strip()) + + +def main(argv): + if not argv or argv[0] in ("-h", "--help", "help"): + _usage() + return 0 + cmd = argv[0] + rest = argv[1:] + if cmd not in COMMANDS: + print(f"unknown command: {cmd}\n", file=sys.stderr) + _usage() + return 2 + script, _ = COMMANDS[cmd] + path = os.path.join(REPO, script) + if not os.path.exists(path): + print(f"missing script: {path}", file=sys.stderr) + return 2 + # launch with the same interpreter; inherit env + stdio (cross-platform) + try: + return subprocess.call([PY, path] + rest, cwd=REPO) + except KeyboardInterrupt: + return 130 + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:]))