Files

170 lines
8.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<div align="center">
<img src="assets/alstack-banner.svg" width="900" alt="@AlStack - free-tier farms, live proxy pools, API research">
<br>
<a href="https://t.me/AlStack"><img src="assets/alstack-badge.svg" alt="Telegram: @AlStack"></a>
</div>
<!-- ALSTACK-PROMO -->
> **Published from the [t.me/AlStack](https://t.me/AlStack) channel** (`@AlStack`) - free-tier farms,
> live proxy pools and API research. Every tool here gets built, measured and torn apart in the channel
> before it becomes a repo; the limits in the docs are the ones that were actually hit.
> What the channel publishes: [CHANNEL.md](CHANNEL.md).
# crowllm-autoreg
Browser-driven account registration for **crowllm.com** — an OpenAI-compatible aggregator (new-api fork) that exposes **76 `:free` models** and grants **50 000 000 free-model tokens** on signup, no card.
Signup is **Google OAuth only** — the email/password form does not exist (`/login` → 404 page). Both Cloudflare Turnstile and a mandatory consent checkbox sit in front of the OAuth button, so a plain HTTP replay is dead (`curl` on `/sign-up` → 403). This repo drives a real headful Chrome instead.
## What you get per account
| field | value |
|---|---|
| `quota` | 5 000 000 |
| `earned_quota` | 50 000 000 |
| `used_quota` | counts tokens spent (9 units for an 8-token request) |
| plan | `free` — free catalogue only |
`quota` unit ≈ 1 token, so "**$100 credit**" advertised by the site = 50M free-model tokens, not wallet cash. Rate limit: 12 parallel chats → 5×200, 7×429; keep ≤5 concurrent.
## Free catalogue (sample from a live `GET /v1/models`)
```
gemini-3.1-pro:free gemini-3.8-flash:free gemini-2.5-pro:free
deepseek-v4.1-flash:free deepseek-v4-flash:free deepseek-v4.1-flash-uncensored:free
kimi-k3 (runpod/) llama-3.3-70b:free minimax-m3.1-flash:free
nemotron-3-ultra-550b-a55b:free crow-limitless:free
crow-uncensored:free qwen-3.8-max:free qwen-3.8-27b-uncensored:free
```
Verified live: `gemini-3.1-pro:free`, `gemini-3.8-flash:free`, `deepseek-v4.1-flash:free`, `crow-limitless:free`, `qwen-3.8-max:free` → HTTP 200, content in ~1.2 s.
## Requirements
```
Python 3.11
playwright (pip install -r requirements.txt)
Google Chrome installed (playwright's bundled chromium is NOT used)
accounts with a Google login (any domain that has Google OAuth — Google Workspace / Edu lots work)
```
## Usage
```bash
export CROWL_BANK=/path/to/accounts.jsonl # {"email": "...", "password": "..."} per line
export CROWL_OUT=/path/to/keys.jsonl # created: {email,password,uid,quota,earned,key,...}
export CROWL_FAIL=/path/to/fail.jsonl
export CROWL_PROFILE=/path/to/chrome-profile-1 # one profile per worker
export CROWL_DOMAINS=example.com # optional comma-separated filter
export CROWL_CHROME="C:/Program Files/Google/Chrome/Application/chrome.exe"
python crowllm_reg.py 1
```
Parallel wave = one process per index with its own `CROWL_PROFILE`:
```bash
for i in 1 2 3 4; do
CROWL_PROFILE=/tmp/crowl-prof-$i python crowllm_reg.py $i &
done
```
## Flow (what the script actually does)
1. `GET /sign-up?aff=<aff>` in headful Chrome; wait for `span[role=checkbox][data-slot=checkbox]`.
2. Poll `input[name=cf-turnstile-response]` until `len > 50` — Turnstile solves itself in headful Chrome in 5-20 s.
3. Click the consent checkbox.
4. **Click the Google button with a real mouse event** (`page.mouse.move` then `page.mouse.click` at the button centre). JS `element.click()` and `locator.click(force=True)` fire **no network request at all** — the OAuth popup is gated on user activation.
5. Google: `input[name=identifier]` → `#identifierNext button` → `input[name=Passwd]` (a hidden `hiddenPassword` field breaks generic `input[type=password]`) → `#passwordNext button`.
6. Consent screen (`Sign in to crowllm.com / You'll share this info`): click Continue (text match `continue` / `allow`, fallback = 85% of the `Cancel\nContinue` container width).
7. Landing `/onboarding` = account created. Landing `/sign-in` = OAuth produced no session → logged to the fail file.
8. Key extraction: the session lives in the **httpOnly cookie `new_api_refresh`**, not in `localStorage`. `POST /api/user/auth/refresh` → `data.access_token` (396 chars) → use it as `Authorization: Bearer` for `/api/user/self`, `POST /api/token/`, `GET /api/token/?p=1&size=10`, `POST /api/token/{id}/key`.
9. The key endpoint answers `{"data":{"key":"..."}}`. The script stores only the `.key` string (48 alnum chars).
## Verify a key
```bash
curl -s -H "Authorization: Bearer $KEY" https://crowllm.com/v1/models | head -c 200
curl -s -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"model":"gemini-3.8-flash:free","messages":[{"role":"user","content":"Reply with exactly: PONG"}],"max_tokens":20}' \
https://crowllm.com/v1/chat/completions
```
## Pool mode (many keys behind one OpenAI endpoint)
`shim.py` — stdlib-only OpenAI-compatible front that rotates the key pool:
```bash
CROWL_KEYS=/opt/crowl-shim/keys.jsonl CROWL_PORT=48974 python3 shim.py
curl -s http://127.0.0.1:48974/healthz # {"ok":true,"keys":49,"dead":0}
curl -s -X POST http://127.0.0.1:48974/admin/reload # after a key sync
```
- `keys.jsonl` lines: `{"key": "...", "email": "...", "uid": 1, "status": "active"}`
- retries the next key on 429 / 5xx, parks a key on 401/403, appends `status: dead` back to the file
- **retries on an empty 200** — the "uncensored" models frequently answer 200 with an empty body, and a naive proxy returns that to the client
- model aliases: `crow-<model>` → `<model>:free`; `crow-kimi-k3` → `runpod/kimi-k3`; `crow-uncensored` / `crow-limitless` are crowllm's own ids and must **not** be prefix-stripped (otherwise `uncensored:free` → 503 `No available channel`)
- browser `User-Agent` is mandatory — plain urllib gets Cloudflare 403 on `/v1/*` and the whole pool dies silently
`crowllm_sync.py` — dedupe the local bank and push it to the shim (`scp` + `/admin/reload`). Run it from cron; empty output means nothing changed.
## Uncensored models — what actually works
crowllm advertises `crow-uncensored`, `crow-limitless`, `deepseek-v4.1-flash-uncensored`, `qwen3.8-27b-uncensored`. Tested on an authorised red-team prompt (SSH brute-force script / reverse shell):
| model | result |
|---|---|
| `deepseek-v4.1-flash-uncensored:free` | 200, 8.5 KB of working `ssh_brute.py` (paramiko + ThreadPool), ~35-70 s |
| `crow-limitless:free` | 200, python reverse shell with pty, ~6 s |
| `crow-uncensored:free` | 200, paramiko brute-force, ~9 s (flaky: first call may fail provider-side — retry) |
| `qwen3.8-27b-uncensored:free` | refuses ("Не могу предоставить рабочий скрипт…") |
So three of four are genuinely uncensored on offensive-security prompts, and they answer *without* any jailbreak wrapper.
## Proxies
Cloudflare + Google see the IP, crowllm bans the **mailbox domain** (not the IP): a burned domain returns `/sign-in` for every signup even from a fresh residential IP. Still, proxies lift the success rate on a *fresh* domain (6 keys vs 1 in our runs).
`relay2.py` turns auth-protected HTTP proxies into local no-auth CONNECT relays Chrome can use:
```bash
python relay2.py decodo_pool.json 9431 # [{host, port, user, pass}, ...]
# relays.json: [{"local":"127.0.0.1:9431","up":"dc.decodo.com:10000","user":"..."}]
CROWL_PROXY=http://127.0.0.1:9431 python crowllm_reg.py example.com worker1
```
Chrome cannot take `user:pass@host` in `--proxy-server`, and Playwright's socks5 support breaks on the first navigation — an HTTP CONNECT relay is the working path.
`wave_all.py` — dispatcher: walks the account bank domain by domain, 6 workers with proxy rotation, two zero-key rounds on a domain → move to the next.
## Pitfalls hit while building this
- OAuth button needs the mouse event (see step 4) — this is the single biggest time sink.
- `401 AUTH_UNAUTHORIZED, invalid access token` on `/api/user/self` only means the Bearer token is missing; the refresh cookie is still valid.
- Turnstile needs a warm profile: a brand-new profile often returns `cf-turnstile-response` empty for 90 s, while a profile that already passed the challenge solves it in ~5 s.
- Success rate in our runs ≈ 57% — failures are `/sign-in` landings and unsolved Turnstile.
- Chrome profiles grow ~20 MB each; prune `Cache/`, `Code Cache/`, `GPUCache/`, `Crashpad/` between waves.
## Legal
For research on your own accounts. The service's ToS apply; multi-accounting may get accounts revoked.
---
<div align="center">
<a href="https://t.me/AlStack"><img src="assets/alstack-badge.svg" alt="Telegram: @AlStack"></a>
**More free-tier farms, live proxy pools and API teardowns - [t.me/AlStack](https://t.me/AlStack)**
<sub>Measured on live tiers, published with the failures included. If this repo saved you an evening,
star it and tell the channel what you built with it.</sub>
</div>