runware autoreg: http-only signup, trial credit gates, model probe
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
bank*.jsonl
|
||||
attempts.jsonl
|
||||
*.log
|
||||
account*.json
|
||||
acc_zero.json
|
||||
tmpmail_test.json
|
||||
__pycache__/
|
||||
@@ -0,0 +1,51 @@
|
||||
🦀 RUNWARE: 19 МОДЕЛЕЙ НА $2 TRIAL — ТОЧНЫЙ СПИСОК, СНЯТЫЙ С ЖИВЫХ АККАУНТОВ
|
||||
|
||||
🩸 Что даёт
|
||||
$2 на API-кредит новому аккаунту. Без карты. Не на «поиграть в плейграунде», а на реальные вызовы `api.runware.ai/v1/chat/completions`.
|
||||
Кредит привязан к домену почты, а не к аккаунту: один домен = один раз.
|
||||
|
||||
🩸 Что отвечало на эти $2 (замер 01.11, 19 моделей из каталога)
|
||||
|
||||
```
|
||||
anthropic-claude-opus-5-5 anthropic-claude-sonnet-5-5
|
||||
anthropic-claude-sonnet-5 anthropic-claude-opus-4-6
|
||||
anthropic-claude-opus-4-5 anthropic-claude-fable-5-1
|
||||
openai-gpt-6-astra openai-gpt-6-sol
|
||||
openai-gpt-6-luna openai-gpt-oss-safeguard-20b
|
||||
google-gemini-3-8-flash google-gemini-3-7-flash
|
||||
google-gemini-3-6-flash google-gemini-3-5-flash-lite
|
||||
zai-glm-5-3 zai-glm-5-3-flash
|
||||
moonshotai-kimi-k3 deepseek-v4-1-flash
|
||||
mistralai-shieldstral-1-0-3b
|
||||
```
|
||||
|
||||
Не отвечают на trial, только за депозит: `gpt-5-4`, `gpt-5-4-mini`, `gpt-5-4-pro`, `gpt-5-5`, `gemini-3-1-pro`, `gemini-3-flash`, `glm-5-1`, `glm-5-2`, `claude-opus-4-7`, `claude-opus-4-8`, `claude-haiku-4-5`, `minimax-m3`, `minimax-m2-7`, `grok-4-3`, `deepseek-v4-pro`, `gemma-4-31b`.
|
||||
Имена в API точно такие, со слитными дефисами: `anthropic-claude-opus-5-5`, а не `claude-opus-5.5`.
|
||||
|
||||
🩸 Как забрать
|
||||
Регистрация целиком по HTTP, браузера нет. Капча на форме — reCAPTCHA v2 invisible, уходит в заголовке:
|
||||
|
||||
```
|
||||
POST https://my.runware.ai/v1/users X-ReCaptcha-Token: <cap>
|
||||
{"email": "...", "acceptedTermsAndPrivacy": true,
|
||||
"authToken": {"type": "Password", "principle": "<email>", "secret": "<pw>"}}
|
||||
POST /v1/users/verify {"hash": "<вся строка из ссылки verify>"}
|
||||
POST /v1/auth {"principle","secret"} -> JWT
|
||||
POST /v1/users/complete-registration firstName,lastName,jobTitle,
|
||||
accountType:"Individual", airSource:<slug>
|
||||
GET /v1/users/{uid}/engagements -> org
|
||||
GET /v1/organizations/{org} -> workingCreditAmount
|
||||
POST /v1/organizations/{org}/api-keys {"name","type":"Bearer"} -> key
|
||||
```
|
||||
|
||||
🩸 Где я упёрся
|
||||
Домены выжжены. В журнале **2 516** попыток на **2 373** домена, кредит получили **20** аккаунтов (0,8%). Все 2 340 доменов почтового пула уже пробованы, новых ноль.
|
||||
Сегодняшняя проверка на временном домене: три аккаунта подряд, signup `201`, verify `201`, complete `201` — и `workingCreditAmount: 0.0`, `isTrial: true`. Ключ без кредита не выдаётся вообще: `POST /api-keys` → `403`.
|
||||
На старом домене сервис отвечает прямым текстом: *«Free credit has already been claimed for this business domain»*.
|
||||
И главное: 574 ключа из прошлых волн, у которых в банке стояло `credit: 2.0`, сегодня отдают `401 Invalid API key`. Кредит был, ключи отозваны.
|
||||
|
||||
Итог: $2 живут только на свежем бизнес-домене. Пока нет нового пула доменов — фармить нечего.
|
||||
|
||||
Всё в одной репе: [runware-autoreg](https://git.reformboss.com/reform/runware-autoreg) — полный цикл без браузера, режим `--mode probe` (проверить домен за одну капчу), пробник моделей и логи с цифрами выше.
|
||||
|
||||
💀 [**иишко**](https://t.me/AlStack) | [**Чат**](https://t.me/+h3Su0z0zl-M3NWNi) | [**Бесплатное API**](https://t.me/iishkogatewaybot)
|
||||
@@ -0,0 +1,110 @@
|
||||
# runware-autoreg
|
||||
|
||||
Авторег [runware.ai](https://runware.ai) без браузера: регистрация → верификация почты → организация → trial-кредит `$2` → API-ключ. Плюс пробник моделей, который показывает, что реально отвечает на trial-балансе.
|
||||
|
||||
Один человеческий гейт — reCAPTCHA v2 (invisible) на форме. Она решается 2captcha и уходит в заголовке `X-ReCaptcha-Token`; сам signup — обычный JSON POST.
|
||||
|
||||
## Что нужно
|
||||
|
||||
| Переменная | Что это |
|
||||
|---|---|
|
||||
| `TWOCAPTCHA_KEY` | ключ 2captcha (reCAPTCHA v2, sitekey `6LeflmosAAAAADd9OnG1BM7dRAvEEicuMqVIqMFk`) |
|
||||
| `RW_PROXIES` | необязательно: `http://user:pass@host:port` через запятую |
|
||||
| `RW_MAIL_POOL` | файл `address:password`, только для провайдера `imap` |
|
||||
| `RW_IMAP_MAP` | json `{домен: [host, port]}` для тех же ящиков |
|
||||
| `RW_BANK` | куда писать аккаунты с кредитом (jsonl) |
|
||||
| `RW_LOG` | журнал всех попыток (jsonl) |
|
||||
|
||||
Секретов в коде нет: ключи только из env.
|
||||
|
||||
## Прогон
|
||||
|
||||
```bash
|
||||
# 1) полный цикл на случайных доменах: каждая почта = новый домен
|
||||
python rw_tmpmail.py 3 420
|
||||
|
||||
# 2) полный цикл на своих IMAP-ящиках
|
||||
python rw_reg.py --domains domain-a.com,domain-b.com --mode cycle
|
||||
|
||||
# 3) только проверка «пускает ли домен» (без ожидания письма)
|
||||
python rw_reg.py --domains domain-a.com --mode probe
|
||||
|
||||
# 4) что отвечает на кредите
|
||||
python rw_models.py --key <key> --json models.json
|
||||
```
|
||||
|
||||
`rw_reg.py --provider voidash --inspect` дополнительно дампит объект организации и дёргает вероятные credit-эндпоинты — удобно, когда надо доказать, что кредита нет, а не «не дошло».
|
||||
|
||||
## Эндпоинты (проверено)
|
||||
|
||||
```
|
||||
POST https://my.runware.ai/v1/users X-ReCaptcha-Token: <token>
|
||||
{"email","acceptedTermsAndPrivacy":true,
|
||||
"authToken":{"type":"Password","principle":<email>,"secret":<pw>}}
|
||||
201 = аккаунт создан; текст message решает судьбу домена
|
||||
|
||||
POST /v1/users/verify {"hash": <ВСЯ строка из ссылки verify-account?token=...>}
|
||||
POST /v1/auth {"principle","secret"} -> token (JWT), uid в payload
|
||||
POST /v1/users/complete-registration
|
||||
firstName,lastName,jobTitle,accountType:"Individual",signUpSource,
|
||||
subscribedEmails:false,organisationName,"airSource":<уникальный slug>,teamSize:"1"
|
||||
GET /v1/users/{uid}/engagements -> список организаций
|
||||
GET /v1/organizations/{org} -> workingCreditAmount, freeCreditAmount, isTrial
|
||||
POST /v1/organizations/{org}/api-keys {"name","type":"Bearer"} -> key
|
||||
POST https://api.runware.ai/v1/chat/completions Authorization: Bearer <key>
|
||||
```
|
||||
|
||||
## Гейты, которые решают всё
|
||||
|
||||
1. **Кредит привязан к домену почты, а не к аккаунту.** Один и тот же домен даёт `$2` один раз. Повторная регистрация на нём возвращает `message`: *"Free credit has already been claimed for this business domain"* — аккаунт создаётся, ключа нет.
|
||||
2. **Фримейл не проходит вообще:** gmail/outlook/yahoo/rambler/t-online получают *"generic email addresses are not eligible for free credit"*.
|
||||
3. **Без кредита ключ не выдаётся:** `POST /organizations/{org}/api-keys` → `403`. То есть «зарегал и проверил модели» на нулевом балансе невозможно.
|
||||
4. **Rate limit:** `429 Rate limit exceeded. Please try again later or solve the reCaptcha.` — один поток на прокси, пауза 3–7 с.
|
||||
5. **Прокси:** рега идёт и с домашнего IP, но при волне лучше разные egress (проверено на IPv6-боксах и мобильном модеме).
|
||||
|
||||
## Что реально было на trial (замер 01.11.2026, `$2`-аккаунты)
|
||||
|
||||
Отвечали `200`:
|
||||
|
||||
```
|
||||
moonshotai-kimi-k3 anthropic-claude-opus-5-5
|
||||
google-gemini-3-8-flash anthropic-claude-sonnet-5-5
|
||||
google-gemini-3-7-flash anthropic-claude-sonnet-5
|
||||
google-gemini-3-6-flash anthropic-claude-opus-4-6
|
||||
google-gemini-3-5-flash-lite anthropic-claude-opus-4-5
|
||||
zai-glm-5-3 anthropic-claude-fable-5-1
|
||||
zai-glm-5-3-flash openai-gpt-6-astra
|
||||
deepseek-v4-1-flash openai-gpt-6-sol
|
||||
mistralai-shieldstral-1-0-3b openai-gpt-6-luna
|
||||
openai-gpt-oss-safeguard-20b
|
||||
```
|
||||
|
||||
Только за деньги (`paid`, trial-кредит не тратится): `google-gemini-3-1-pro`, `google-gemini-3-flash`, `openai-gpt-5-4*`, `openai-gpt-5-5`, `zai-glm-5-1`, `zai-glm-5-2`, `anthropic-claude-opus-4-7`, `anthropic-claude-opus-4-8`, `anthropic-claude-haiku-4-5`, `minimax-m3`, `minimax-m2-7`, `xai-grok-4-3`, `deepseek-v4-pro`, `deepseek-v4-flash`, `google-gemma-4-31b`.
|
||||
|
||||
## Замер 04.11.2026 (почему тема больше не кормит)
|
||||
|
||||
| Проверка | Результат |
|
||||
|---|---|
|
||||
| 3 аккаунта на `voidash.cyou` | кредит `0.0`, `isTrial: true`, ключ `403` |
|
||||
| домен `voidash.cyou` | `Free credit has already been claimed for this business domain` |
|
||||
| пул mail66k: 2 340 уникальных домена с IMAP | все уже пробованы, новых 0 |
|
||||
| старый банк: 574 ключа с `credit 2.0` | `401 Invalid API key` (20/20 выборки) |
|
||||
| 2 516 попыток в журнале | 20 аккаунтов с кредитом (0,8 %) |
|
||||
|
||||
Вывод: `$2` существует, но живёт только на **свежем бизнес-домене**, а свежих доменов с читаемой почтой у нас больше нет. Авторег имеет смысл запускать только при появлении нового пула доменов (DDNS-зона, купленный домен, новый почтовый провайдер) — и проверять гейт одним `--mode probe` до волны.
|
||||
|
||||
## Пиитфолы
|
||||
|
||||
- `POST /v1/users` с невалидным reCAPTCHA-токеном → `429`, а не `400`: не путать с rate limit по IP.
|
||||
- `verify` ждёт **всю** строку из ссылки (`token=..;userId=..;timestamp=..`), а не только 64 hex: обрезанный хеш → `422 Invalid token hash`.
|
||||
- `complete-registration` требует уникальный `airSource` (slug): повтор → `Organization with air source already exists`.
|
||||
- Письмо Runware идёт через трекер `urlNNNN.runware.ai/ls/click?...` — реальный `token=` достаётся только переходом по ссылке, из HTML письма его не видно.
|
||||
- Кириллица в консоли Windows валит скрипт `UnicodeEncodeError`, если писать `print` без ASCII-обёртки; в коде стоит `ascii/replace`.
|
||||
- Один поток на прокси: два параллельных процесса через один egress дают `WinError 10060` на первом же запросе и выглядят как «сервис лёг».
|
||||
|
||||
## Файлы
|
||||
|
||||
- `rw_reg.py` — цикл на IMAP-ящиках или voidash, режимы `probe` / `cycle`, инспектор кредита
|
||||
- `rw_tmpmail.py` — цикл на tempmail.lol (каждый ящик = новый домен)
|
||||
- `rw_models.py` — каталог + проба моделей по ключу
|
||||
- `rw_balance.py` — проверка остатка кредита по ключу
|
||||
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Runware balance: сколько trial-кредита осталось на аккаунте.
|
||||
|
||||
Ключ API баланс не показывает, поэтому логинимся паролем и читаем организации.
|
||||
|
||||
Usage:
|
||||
python rw_balance.py --email a@b.c --pw 'Rw4re!xxxx'
|
||||
python rw_balance.py --bank bank.jsonl [--limit 20]
|
||||
"""
|
||||
import argparse
|
||||
import json
|
||||
import sys
|
||||
|
||||
import rw_reg as R
|
||||
|
||||
|
||||
def account_credit(email, pw):
|
||||
a, err = R.auth(email, pw)
|
||||
if not a:
|
||||
return {"email": email, "error": err}
|
||||
info, orgs, err = R.credit(a["token"], a["uid"])
|
||||
return {"email": email, "orgs": len(orgs), "credit": (info or {}).get("credit"),
|
||||
"isTrial": (info or {}).get("isTrial"), "err": err}
|
||||
|
||||
|
||||
def main():
|
||||
ap = argparse.ArgumentParser()
|
||||
ap.add_argument("--email")
|
||||
ap.add_argument("--pw")
|
||||
ap.add_argument("--bank")
|
||||
ap.add_argument("--limit", type=int, default=20)
|
||||
a = ap.parse_args()
|
||||
if a.bank:
|
||||
rows = [json.loads(l) for l in open(a.bank, encoding="utf-8") if l.strip()][:a.limit]
|
||||
total = 0.0
|
||||
for r in rows:
|
||||
res = account_credit(r["email"], r["pw"])
|
||||
print(json.dumps(res, ensure_ascii=False))
|
||||
total += float(res.get("credit") or 0)
|
||||
print("total credit in sample: %.2f" % total)
|
||||
return 0
|
||||
if not (a.email and a.pw):
|
||||
raise SystemExit("need --email/--pw or --bank")
|
||||
print(json.dumps(account_credit(a.email, a.pw), ensure_ascii=False))
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Probe which Runware models actually answer on a $2 trial key.
|
||||
|
||||
Reads the catalog from GET /v1/models, then sends one tiny chat request per
|
||||
model, records HTTP code, latency and first characters of the answer.
|
||||
|
||||
Usage:
|
||||
python rw_models.py --key <rw-key> [--only claude,gemini] [--max 40] [--json out.json]
|
||||
"""
|
||||
import argparse
|
||||
import json
|
||||
import time
|
||||
import urllib.request
|
||||
|
||||
API = "https://api.runware.ai/v1"
|
||||
|
||||
|
||||
def post(path, key, payload, timeout=90):
|
||||
data = json.dumps(payload).encode()
|
||||
req = urllib.request.Request(API + path, data=data, method="POST", headers={
|
||||
"Authorization": "Bearer " + key,
|
||||
"Content-Type": "application/json",
|
||||
"User-Agent": "Mozilla/5.0"})
|
||||
t0 = time.time()
|
||||
try:
|
||||
with urllib.request.urlopen(req, timeout=timeout) as r:
|
||||
body = r.read().decode("utf-8", "replace")
|
||||
code = r.status
|
||||
except Exception as e:
|
||||
code = getattr(e, "code", 0) or 0
|
||||
try:
|
||||
body = e.read().decode("utf-8", "replace")
|
||||
except Exception:
|
||||
body = str(e)
|
||||
return code, body, round(time.time() - t0, 2)
|
||||
|
||||
|
||||
def get(path, key, timeout=60):
|
||||
req = urllib.request.Request(API + path, headers={
|
||||
"Authorization": "Bearer " + key, "User-Agent": "Mozilla/5.0"})
|
||||
try:
|
||||
with urllib.request.urlopen(req, timeout=timeout) as r:
|
||||
return r.status, r.read().decode("utf-8", "replace")
|
||||
except Exception as e:
|
||||
code = getattr(e, "code", 0) or 0
|
||||
try:
|
||||
return code, e.read().decode("utf-8", "replace")
|
||||
except Exception:
|
||||
return code, str(e)
|
||||
|
||||
|
||||
def catalog(key):
|
||||
code, body = get("/models", key)
|
||||
if code != 200:
|
||||
return [], code, body[:200]
|
||||
try:
|
||||
j = json.loads(body)
|
||||
except Exception:
|
||||
return [], code, body[:200]
|
||||
data = j.get("data") or j
|
||||
ids = []
|
||||
for item in data:
|
||||
mid = item.get("id") or item.get("model") or item.get("name")
|
||||
if mid:
|
||||
ids.append(mid)
|
||||
return sorted(set(ids)), code, ""
|
||||
|
||||
|
||||
def probe(key, model):
|
||||
payload = {"model": model,
|
||||
"messages": [{"role": "user", "content": "reply with the single word ok"}],
|
||||
"max_tokens": 16}
|
||||
code, body, dt = post("/chat/completions", key, payload)
|
||||
text = ""
|
||||
try:
|
||||
j = json.loads(body)
|
||||
ch = (j.get("choices") or [{}])[0]
|
||||
text = ((ch.get("message") or {}).get("content") or "")[:60]
|
||||
if not text:
|
||||
text = json.dumps(j)[:60]
|
||||
except Exception:
|
||||
text = body[:80].replace("\n", " ")
|
||||
return {"model": model, "code": code, "sec": dt, "text": text}
|
||||
|
||||
|
||||
def main():
|
||||
ap = argparse.ArgumentParser()
|
||||
ap.add_argument("--key", required=True)
|
||||
ap.add_argument("--only", default="")
|
||||
ap.add_argument("--max", type=int, default=40)
|
||||
ap.add_argument("--json", default="")
|
||||
a = ap.parse_args()
|
||||
ids, code, err = catalog(a.key)
|
||||
print("catalog http=%s models=%d %s" % (code, len(ids), err))
|
||||
if a.only:
|
||||
keys = [k.strip().lower() for k in a.only.split(",") if k.strip()]
|
||||
ids = [m for m in ids if any(k in m.lower() for k in keys)]
|
||||
ids = ids[:a.max]
|
||||
out = []
|
||||
for m in ids:
|
||||
rec = probe(a.key, m)
|
||||
print("%-46s %s %5.2fs %s" % (rec["model"], rec["code"], rec["sec"], rec["text"]))
|
||||
out.append(rec)
|
||||
ok = [r for r in out if r["code"] == 200]
|
||||
print("\nanswered %d/%d" % (len(ok), len(out)))
|
||||
if a.json:
|
||||
json.dump(out, open(a.json, "w", encoding="utf-8"), ensure_ascii=False, indent=1)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
@@ -0,0 +1,494 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Runware autoreg: signup -> e-mail verify -> org -> $2 trial credit -> API key.
|
||||
|
||||
Single-file, stdlib + requests. No browser: the only human gate is reCAPTCHA v2,
|
||||
which is solved through 2captcha and passed in the X-ReCaptcha-Token header.
|
||||
|
||||
Config through env (nothing secret is hardcoded):
|
||||
RW_MAIL_POOL file with `address:password` lines (IMAP readable mailboxes)
|
||||
RW_IMAP_MAP json {domain: [host, port]} map for the same mailboxes
|
||||
RW_BANK output jsonl for accounts that actually received credit
|
||||
RW_LOG output jsonl for every attempt
|
||||
TWOCAPTCHA_KEY 2captcha client key
|
||||
RW_PROXIES comma separated http://user:pass@host:port list (optional)
|
||||
|
||||
Usage:
|
||||
python rw_reg.py --domains a.com,b.com --mode probe # signup only, no IMAP wait
|
||||
python rw_reg.py --domains a.com --mode cycle # full path, saves key
|
||||
python rw_reg.py --batch 10 --mode cycle # first 10 untried domains
|
||||
"""
|
||||
import argparse
|
||||
import base64
|
||||
import email
|
||||
import imaplib
|
||||
import json
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
import string
|
||||
import sys
|
||||
import time
|
||||
import urllib.parse
|
||||
|
||||
import requests
|
||||
|
||||
RW = "https://my.runware.ai/v1"
|
||||
SITEKEY = "6LeflmosAAAAADd9OnG1BM7dRAvEEicuMqVIqMFk"
|
||||
PAGEURL = "https://my.runware.ai/signup"
|
||||
UA = ("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
|
||||
"(KHTML, like Gecko) Chrome/140.0 Safari/537.36")
|
||||
HDR = {"Content-Type": "application/json", "Origin": "https://runware.ai",
|
||||
"Referer": "https://runware.ai/", "User-Agent": UA}
|
||||
|
||||
POOL = os.environ.get("RW_MAIL_POOL", "")
|
||||
IMAPMAP_PATH = os.environ.get("RW_IMAP_MAP", "")
|
||||
BANK = os.environ.get("RW_BANK", "bank.jsonl")
|
||||
LOG = os.environ.get("RW_LOG", "attempts.jsonl")
|
||||
CAPKEY = os.environ.get("TWOCAPTCHA_KEY", "")
|
||||
PROXIES = [p.strip() for p in os.environ.get("RW_PROXIES", "").split(",") if p.strip()]
|
||||
|
||||
# runware refusals that mean "this domain is finished, do not waste a captcha again"
|
||||
DEAD_MARKS = ("cannot create an account with this email",
|
||||
"already been claimed for this business domain")
|
||||
|
||||
|
||||
def log(*a):
|
||||
line = " ".join(str(x) for x in a)
|
||||
print(line.encode("ascii", "replace").decode(), flush=True)
|
||||
|
||||
|
||||
def append(path, rec):
|
||||
with open(path, "a", encoding="utf-8") as f:
|
||||
f.write(json.dumps(rec, ensure_ascii=False) + "\n")
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- captcha
|
||||
def solve_recaptcha(tries=40):
|
||||
if not CAPKEY:
|
||||
return None, "no TWOCAPTCHA_KEY"
|
||||
r = requests.get("https://2captcha.com/in.php", timeout=40, params={
|
||||
"key": CAPKEY, "method": "userrecaptcha", "googlekey": SITEKEY,
|
||||
"pageurl": PAGEURL, "json": 1}).json()
|
||||
if r.get("status") != 1:
|
||||
return None, "submit:" + str(r)[:120]
|
||||
cid = r["request"]
|
||||
for _ in range(tries):
|
||||
time.sleep(5)
|
||||
try:
|
||||
rr = requests.get("https://2captcha.com/res.php", timeout=40, params={
|
||||
"key": CAPKEY, "action": "get", "id": cid, "json": 1}).json()
|
||||
except Exception:
|
||||
continue
|
||||
if rr.get("status") == 1:
|
||||
return rr["request"], None
|
||||
if rr.get("request") != "CAPCHA_NOT_READY":
|
||||
return None, "solve:" + str(rr)[:120]
|
||||
return None, "solve:timeout"
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- signup
|
||||
def signup(addr, pw, captcha, proxy=None):
|
||||
s = requests.Session()
|
||||
if proxy:
|
||||
s.proxies.update({"http": proxy, "https": proxy})
|
||||
body = {"email": addr, "acceptedTermsAndPrivacy": True,
|
||||
"authToken": {"type": "Password", "principle": addr, "secret": pw}}
|
||||
for attempt in range(3):
|
||||
try:
|
||||
r = s.post(RW + "/users", json=body,
|
||||
headers={**HDR, "X-ReCaptcha-Token": captcha}, timeout=60)
|
||||
except Exception as e:
|
||||
time.sleep(7)
|
||||
continue
|
||||
if r.status_code in (200, 201, 403, 422) or attempt == 2:
|
||||
try:
|
||||
j = r.json()
|
||||
msg = j.get("message") or (j.get("errors") or [{}])[0].get("message") or ""
|
||||
except Exception:
|
||||
msg = r.text[:160]
|
||||
return r.status_code, msg, r.text[:400]
|
||||
time.sleep(7)
|
||||
return 0, "no response", ""
|
||||
|
||||
|
||||
def verify_account(token_hash):
|
||||
r = requests.post(RW + "/users/verify", json={"hash": token_hash},
|
||||
headers={"Content-Type": "application/json",
|
||||
"Origin": "https://runware.ai", "User-Agent": UA}, timeout=60)
|
||||
return r.status_code, r.text[:300]
|
||||
|
||||
|
||||
def auth(addr, pw):
|
||||
r = requests.post(RW + "/auth", json={"principle": addr, "secret": pw},
|
||||
headers={"Content-Type": "application/json",
|
||||
"Origin": "https://runware.ai", "User-Agent": UA}, timeout=60)
|
||||
if r.status_code not in (200, 201):
|
||||
return None, "auth_%s %s" % (r.status_code, r.text[:150])
|
||||
tok = (r.json() or {}).get("token")
|
||||
if not tok:
|
||||
return None, "auth_no_token " + r.text[:150]
|
||||
payload = tok.split(".")[1]
|
||||
payload += "=" * (-len(payload) % 4)
|
||||
uid = json.loads(base64.urlsafe_b64decode(payload)).get("userId")
|
||||
return {"token": tok, "uid": uid}, None
|
||||
|
||||
|
||||
def complete_registration(tok):
|
||||
slug = "".join(random.choice(string.ascii_lowercase) for _ in range(10))
|
||||
body = {"firstName": "Team", "lastName": "Ops", "jobTitle": "Founder",
|
||||
"accountType": "Individual", "signUpSource": "Website",
|
||||
"subscribedEmails": False, "organisationName": "Studio " + slug,
|
||||
"airSource": slug, "teamSize": "1"}
|
||||
r = requests.post(RW + "/users/complete-registration", json=body,
|
||||
headers={**HDR, "Authorization": "Bearer " + tok}, timeout=60)
|
||||
return r.status_code, r.text[:300]
|
||||
|
||||
|
||||
def credit(tok, uid):
|
||||
"""returns (best_info, all_org_ids). best_info picks the first org with credit>0."""
|
||||
h = {"Authorization": "Bearer " + tok, "User-Agent": UA}
|
||||
r = requests.get("%s/users/%s/engagements" % (RW, uid), headers=h, timeout=60)
|
||||
if r.status_code != 200:
|
||||
return None, [], "eng_%s %s" % (r.status_code, r.text[:120])
|
||||
orgs = [((e.get("organization") or {}).get("id")) for e in (r.json() or [])]
|
||||
orgs = [o for o in orgs if o]
|
||||
best = None
|
||||
for oid in orgs:
|
||||
rr = requests.get("%s/organizations/%s" % (RW, oid), headers=h, timeout=60)
|
||||
if rr.status_code != 200:
|
||||
continue
|
||||
j = rr.json()
|
||||
try:
|
||||
working = float(j.get("workingCreditAmount") or 0)
|
||||
except Exception:
|
||||
working = 0.0
|
||||
info = {"org": oid, "credit": working, "raw": j.get("workingCreditAmount"),
|
||||
"free": j.get("freeCreditAmount"), "isTrial": j.get("isTrial")}
|
||||
if working > 0:
|
||||
return info, orgs, None
|
||||
best = best or info
|
||||
return best, orgs, None
|
||||
|
||||
|
||||
def make_key(tok, org):
|
||||
r = requests.post("%s/organizations/%s/api-keys" % (RW, org),
|
||||
json={"name": "k" + str(random.randint(100, 999)), "type": "Bearer"},
|
||||
headers={**HDR, "Authorization": "Bearer " + tok}, timeout=60)
|
||||
try:
|
||||
return r.status_code, (r.json() or {}).get("key")
|
||||
except Exception:
|
||||
return r.status_code, None
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- mail
|
||||
def imap_login(host, port, addr, pw, timeout=30):
|
||||
if int(port) == 993:
|
||||
m = imaplib.IMAP4_SSL(host, int(port), timeout=timeout)
|
||||
else:
|
||||
m = imaplib.IMAP4(host, int(port), timeout=timeout)
|
||||
m.starttls()
|
||||
m.login(addr, pw)
|
||||
return m
|
||||
|
||||
|
||||
def grab_token(m):
|
||||
for box in ("INBOX", "Junk", '"Junk Email"', "Spam"):
|
||||
try:
|
||||
typ, _ = m.select(box, readonly=True)
|
||||
except Exception:
|
||||
continue
|
||||
if typ != "OK":
|
||||
continue
|
||||
ids = []
|
||||
for crit in (("FROM", "runware"), ("SUBJECT", "verify"), ("ALL", None)):
|
||||
try:
|
||||
typ, data = (m.search(None, *crit) if crit[1] else m.search(None, "ALL"))
|
||||
except Exception:
|
||||
continue
|
||||
if typ == "OK" and data and data[0]:
|
||||
ids = data[0].split()
|
||||
if ids:
|
||||
break
|
||||
for i in reversed(ids[-5:]):
|
||||
try:
|
||||
typ, msg = m.fetch(i, "(RFC822)")
|
||||
except Exception:
|
||||
continue
|
||||
if typ != "OK" or not msg or not msg[0]:
|
||||
continue
|
||||
mime = email.message_from_bytes(msg[0][1])
|
||||
body = ""
|
||||
for part in mime.walk():
|
||||
if part.get_content_type() in ("text/plain", "text/html"):
|
||||
try:
|
||||
body += part.get_payload(decode=True).decode(
|
||||
part.get_content_charset() or "utf-8", "replace")
|
||||
except Exception:
|
||||
pass
|
||||
if "runware" not in body.lower():
|
||||
continue
|
||||
tok = extract_token(body)
|
||||
if tok:
|
||||
return tok
|
||||
return None
|
||||
|
||||
|
||||
def extract_token(body):
|
||||
b = (body or "").replace("&", "&").replace("=3D", "=")
|
||||
b = re.sub(r"<[^>]+>", " ", b)
|
||||
m = re.search(r"(?:verify-account|verify)[^\s\"'<>]*?token=([^&\"'<>\s]+)", b)
|
||||
if m:
|
||||
return urllib.parse.unquote(m.group(1))
|
||||
for link in re.findall(r"https?://[^\s\"'<>]*(?:ls/click|click\?|track)[^\s\"'<>]*", b):
|
||||
try:
|
||||
r = requests.get(link.replace("&", "&"), allow_redirects=True,
|
||||
timeout=40, headers={"User-Agent": UA})
|
||||
except Exception:
|
||||
continue
|
||||
for cand in (r.url, r.text or ""):
|
||||
mm = re.search(r"token=([^&\"'<>\s]+)", cand)
|
||||
if mm:
|
||||
return urllib.parse.unquote(mm.group(1))
|
||||
m = re.search(r"token=([0-9a-fA-F]{16,}[^&\"'<>\s]*)", b)
|
||||
return urllib.parse.unquote(m.group(1)) if m else None
|
||||
|
||||
|
||||
def wait_token(addr, pw, wait=90):
|
||||
dom = addr.split("@")[-1].lower()
|
||||
hosts = []
|
||||
if IMAPMAP_PATH and os.path.exists(IMAPMAP_PATH):
|
||||
amap = json.load(open(IMAPMAP_PATH, encoding="utf-8"))
|
||||
if dom in amap:
|
||||
val = amap[dom]
|
||||
hosts.append((val[0], int(val[1])))
|
||||
for h in ("imap." + dom, "mail." + dom, dom):
|
||||
for p in (993, 143):
|
||||
if (h, p) not in hosts:
|
||||
hosts.append((h, p))
|
||||
end = time.time() + wait
|
||||
connected = False
|
||||
while time.time() < end:
|
||||
for host, port in hosts[:6]:
|
||||
m = None
|
||||
try:
|
||||
m = imap_login(host, port, addr, pw)
|
||||
connected = True
|
||||
tok = grab_token(m)
|
||||
if tok:
|
||||
return tok, None
|
||||
break
|
||||
except Exception as e:
|
||||
last = "%s:%s %s %s" % (host, port, type(e).__name__, str(e)[:60])
|
||||
finally:
|
||||
try:
|
||||
if m:
|
||||
m.logout()
|
||||
except Exception:
|
||||
pass
|
||||
if not connected:
|
||||
return None, "imap_unreachable " + str(last)[:100]
|
||||
time.sleep(8)
|
||||
return None, "no_mail_in_window"
|
||||
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- voidash inboxes
|
||||
VOID = "https://api.voidash.com/api/v1"
|
||||
|
||||
|
||||
def void_inbox(domain="voidash.cyou"):
|
||||
r = requests.post(VOID + "/inboxes", json={"domain": domain}, timeout=40)
|
||||
if r.status_code not in (200, 201):
|
||||
return None, "inbox_%s %s" % (r.status_code, r.text[:120])
|
||||
j = r.json()
|
||||
return {"address": j["address"], "id": j["id"], "skey": j.get("session_key")}, None
|
||||
|
||||
|
||||
def void_messages(iid, skey):
|
||||
r = requests.get("%s/inboxes/%s/messages?limit=20" % (VOID, iid),
|
||||
headers={"Authorization": "Bearer " + skey}, timeout=40)
|
||||
if r.status_code != 200:
|
||||
return []
|
||||
return r.json().get("messages", [])
|
||||
|
||||
|
||||
def void_body(mid, skey):
|
||||
r = requests.get("%s/messages/%s" % (VOID, mid),
|
||||
headers={"Authorization": "Bearer " + skey}, timeout=40)
|
||||
if r.status_code != 200:
|
||||
return ""
|
||||
j = r.json()
|
||||
return (j.get("text") or "") + "\n" + (j.get("html") or "")
|
||||
|
||||
|
||||
def void_token(iid, skey, wait=90):
|
||||
end = time.time() + wait
|
||||
while time.time() < end:
|
||||
for m in void_messages(iid, skey):
|
||||
body = void_body(m["id"], skey)
|
||||
if "runware" in body.lower() or "verify" in (m.get("subject") or "").lower():
|
||||
tok = extract_token(body)
|
||||
if tok:
|
||||
return tok, None
|
||||
time.sleep(5)
|
||||
return None, "no_mail_in_window"
|
||||
|
||||
|
||||
def inspect_org(tok, org, uid):
|
||||
"""dump the org object and try the obvious claim endpoints"""
|
||||
h = {"Authorization": "Bearer " + tok, "User-Agent": UA}
|
||||
out = {}
|
||||
r = requests.get("%s/organizations/%s" % (RW, org), headers=h, timeout=60)
|
||||
out["org_json"] = r.text[:900]
|
||||
for path in ("/organizations/%s/claim-credit" % org,
|
||||
"/organizations/%s/credit" % org,
|
||||
"/organizations/%s/trial" % org,
|
||||
"/users/%s/claim-credit" % uid):
|
||||
for verb in ("GET", "POST"):
|
||||
try:
|
||||
rr = requests.request(verb, RW + path, json={},
|
||||
headers={**h, "Content-Type": "application/json"},
|
||||
timeout=40)
|
||||
out["%s %s" % (verb, path)] = (rr.status_code, rr.text[:200])
|
||||
except Exception as e:
|
||||
out["%s %s" % (verb, path)] = (0, str(e)[:80])
|
||||
return out
|
||||
|
||||
|
||||
# ---------------------------------------------------------------- one account
|
||||
def gen_pw():
|
||||
return "Rw4re!" + "".join(random.choice(string.ascii_letters + string.digits)
|
||||
for _ in range(10))
|
||||
|
||||
|
||||
def run_one(addr, mail_pw, mode="cycle", idx=0, provider="imap", inbox=None, inspect=False):
|
||||
rec = {"ts": int(time.time()), "email": addr, "domain": addr.split("@")[-1].lower()}
|
||||
pw = gen_pw()
|
||||
rec["pw"] = pw
|
||||
cap, cerr = solve_recaptcha()
|
||||
if not cap:
|
||||
rec.update(stage="captcha_fail", msg=str(cerr)[:120])
|
||||
return rec
|
||||
proxy = PROXIES[idx % len(PROXIES)] if PROXIES else None
|
||||
st, msg, body = signup(addr, pw, cap, proxy)
|
||||
rec.update(signup=st, msg=msg[:160])
|
||||
if st != 201:
|
||||
rec["stage"] = "signup_%s" % st
|
||||
return rec
|
||||
if any(k in msg.lower() for k in DEAD_MARKS):
|
||||
rec["stage"] = "domain_dead"
|
||||
return rec
|
||||
if mode == "probe":
|
||||
rec["stage"] = "signup_ok"
|
||||
return rec
|
||||
if provider == "voidash" and inbox:
|
||||
rec["inbox"] = {"id": inbox["id"], "address": inbox["address"]}
|
||||
tok, err = void_token(inbox["id"], inbox["skey"], wait=200)
|
||||
else:
|
||||
tok, err = wait_token(addr, mail_pw)
|
||||
if not tok:
|
||||
rec.update(stage="mail_fail", msg=str(err))
|
||||
return rec
|
||||
st, vb = verify_account(tok)
|
||||
rec["verify"] = st
|
||||
if st not in (200, 201):
|
||||
rec.update(stage="verify_fail", msg=vb[:150])
|
||||
return rec
|
||||
a, err = auth(addr, pw)
|
||||
if not a:
|
||||
rec.update(stage="auth_fail", msg=str(err)[:150])
|
||||
return rec
|
||||
st, cb = complete_registration(a["token"])
|
||||
rec["complete"] = st
|
||||
time.sleep(2)
|
||||
info, orgs, err = credit(a["token"], a["uid"])
|
||||
rec["credit_info"] = info
|
||||
if inspect and info and info.get("org"):
|
||||
rec["inspect"] = inspect_org(a["token"], info["org"], a["uid"])
|
||||
if not info or (info.get("credit") or 0) <= 0:
|
||||
rec.update(stage="zero_credit", orgs=orgs)
|
||||
return rec
|
||||
st, key = make_key(a["token"], info["org"])
|
||||
rec.update(stage="saved", org=info["org"], credit=info["credit"], key=key)
|
||||
append(BANK, {"email": addr, "pw": pw, "mail_pw": mail_pw,
|
||||
"domain": rec["domain"], "org": info["org"],
|
||||
"credit": info["credit"], "key": key, "ts": rec["ts"]})
|
||||
return rec
|
||||
|
||||
|
||||
def load_pool():
|
||||
by = {}
|
||||
for line in open(POOL, encoding="utf-8", errors="ignore"):
|
||||
line = line.strip()
|
||||
if ":" not in line or "@" not in line:
|
||||
continue
|
||||
addr, _, pw = line.rpartition(":")
|
||||
by.setdefault(addr.split("@")[-1].lower(), []).append((addr, pw))
|
||||
return by
|
||||
|
||||
|
||||
def tried_domains():
|
||||
seen = set()
|
||||
if os.path.exists(LOG):
|
||||
for line in open(LOG, encoding="utf-8", errors="replace"):
|
||||
try:
|
||||
seen.add(json.loads(line).get("domain"))
|
||||
except Exception:
|
||||
pass
|
||||
return seen
|
||||
|
||||
|
||||
def main():
|
||||
ap = argparse.ArgumentParser()
|
||||
ap.add_argument("--domains", default="")
|
||||
ap.add_argument("--batch", type=int, default=0)
|
||||
ap.add_argument("--mode", choices=("probe", "cycle"), default="cycle")
|
||||
ap.add_argument("--sleep", type=float, default=3.0)
|
||||
ap.add_argument("--provider", choices=("imap", "voidash"), default="imap")
|
||||
ap.add_argument("--inspect", action="store_true")
|
||||
a = ap.parse_args()
|
||||
if a.provider == "imap" and not POOL:
|
||||
raise SystemExit("set RW_MAIL_POOL")
|
||||
if a.provider == "voidash":
|
||||
stats = {}
|
||||
for i in range(a.batch or 3):
|
||||
inbox, err = void_inbox()
|
||||
if not inbox:
|
||||
log("[%d] inbox fail %s" % (i, err))
|
||||
break
|
||||
rec = run_one(inbox["address"], "-", "cycle", i, "voidash", inbox, a.inspect)
|
||||
log("[%d] %s -> %s %s" % (i, inbox["address"], rec.get("stage"),
|
||||
str(rec.get("credit_info"))[:90]))
|
||||
append(LOG, rec)
|
||||
stats[rec.get("stage")] = stats.get(rec.get("stage"), 0) + 1
|
||||
time.sleep(a.sleep)
|
||||
log("== done " + json.dumps(stats))
|
||||
return 0
|
||||
pool = load_pool()
|
||||
if a.domains:
|
||||
doms = [d.strip().lower() for d in a.domains.split(",") if d.strip()]
|
||||
else:
|
||||
seen = tried_domains()
|
||||
doms = [d for d, v in sorted(pool.items(), key=lambda x: -len(x[1]))
|
||||
if d not in seen and len(v) >= 2][:a.batch or 10]
|
||||
log("== runware mode=%s domains=%d" % (a.mode, len(doms)))
|
||||
stats = {}
|
||||
for i, d in enumerate(doms):
|
||||
if d not in pool:
|
||||
log("[%d] %s not in pool" % (i, d))
|
||||
continue
|
||||
addr, mail_pw = pool[d][0]
|
||||
try:
|
||||
rec = run_one(addr, mail_pw, a.mode, i)
|
||||
except Exception as e:
|
||||
rec = {"ts": int(time.time()), "email": addr, "domain": d,
|
||||
"stage": "exc", "msg": repr(e)[:160]}
|
||||
log("[%d] %s -> %s %s" % (i, d, rec.get("stage"), (rec.get("msg") or "")[:70]))
|
||||
append(LOG, rec)
|
||||
stats[rec.get("stage")] = stats.get(rec.get("stage"), 0) + 1
|
||||
time.sleep(a.sleep)
|
||||
log("== done " + json.dumps(stats))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Runware x tempmail.lol: fresh random email domain per account.
|
||||
|
||||
The point of this provider: every inbox lives on a NEW domain
|
||||
(<rand>.<zone>), and Runware grants the $2 trial once per business domain,
|
||||
so a fresh domain is the only thing that still yields credit.
|
||||
|
||||
Usage: python rw_tmpmail.py [n] [wait_seconds]
|
||||
"""
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
import requests
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
import rw_reg as R # noqa: E402
|
||||
|
||||
TMP = "https://api.tempmail.lol"
|
||||
|
||||
|
||||
def new_inbox():
|
||||
j = requests.post(TMP + "/v2/inbox/create", json={}, timeout=25).json()
|
||||
return {"address": j["address"], "token": j["token"]}
|
||||
|
||||
|
||||
def messages(token):
|
||||
try:
|
||||
j = requests.get(TMP + "/v2/inbox", params={"token": token}, timeout=25).json()
|
||||
except Exception:
|
||||
return []
|
||||
return j.get("emails") or []
|
||||
|
||||
|
||||
def wait_token(token, wait=360):
|
||||
end = time.time() + wait
|
||||
while time.time() < end:
|
||||
for m in messages(token):
|
||||
body = (m.get("body") or "") + "\n" + (m.get("html") or "")
|
||||
tok = R.extract_token(body)
|
||||
if tok:
|
||||
return tok, None
|
||||
time.sleep(6)
|
||||
return None, "no_mail"
|
||||
|
||||
|
||||
def one(idx, wait=360):
|
||||
ib = new_inbox()
|
||||
addr, token = ib["address"], ib["token"]
|
||||
rec = {"ts": int(time.time()), "email": addr, "domain": addr.split("@")[-1]}
|
||||
pw = R.gen_pw()
|
||||
rec["pw"] = pw
|
||||
cap, cerr = R.solve_recaptcha()
|
||||
if not cap:
|
||||
rec.update(stage="captcha_fail", msg=str(cerr)[:120])
|
||||
return rec
|
||||
st, msg, _ = R.signup(addr, pw, cap)
|
||||
rec.update(signup=st, msg=msg[:140])
|
||||
print("[%d] %s signup=%s %s" % (idx, addr, st, msg[:90]), flush=True)
|
||||
if st != 201:
|
||||
rec["stage"] = "signup_%s" % st
|
||||
return rec
|
||||
tok, err = wait_token(token, wait)
|
||||
if not tok:
|
||||
rec.update(stage="mail_fail", msg=str(err))
|
||||
return rec
|
||||
st, _ = R.verify_account(tok)
|
||||
rec["verify"] = st
|
||||
a, err = R.auth(addr, pw)
|
||||
if not a:
|
||||
rec.update(stage="auth_fail", msg=str(err)[:120])
|
||||
return rec
|
||||
rec["complete"] = R.complete_registration(a["token"])[0]
|
||||
info, orgs, _ = R.credit(a["token"], a["uid"])
|
||||
rec["credit_info"] = info
|
||||
print("[%d] credit=%s" % (idx, info), flush=True)
|
||||
if not info or (info.get("credit") or 0) <= 0:
|
||||
rec["stage"] = "zero_credit"
|
||||
return rec
|
||||
st, key = R.make_key(a["token"], info["org"])
|
||||
rec.update(stage="saved", key=key, org=info["org"], credit=info["credit"])
|
||||
R.append(os.environ.get("RW_BANK", "bank.jsonl"),
|
||||
{"email": addr, "pw": pw, "mailbox_token": token, "domain": rec["domain"],
|
||||
"org": info["org"], "credit": info["credit"], "key": key, "ts": rec["ts"]})
|
||||
return rec
|
||||
|
||||
|
||||
def main():
|
||||
n = int(sys.argv[1]) if len(sys.argv) > 1 else 1
|
||||
wait = int(sys.argv[2]) if len(sys.argv) > 2 else 360
|
||||
log = os.environ.get("RW_LOG", "attempts.jsonl")
|
||||
for i in range(n):
|
||||
try:
|
||||
rec = one(i, wait)
|
||||
except Exception as e:
|
||||
rec = {"ts": int(time.time()), "stage": "exc", "msg": repr(e)[:160]}
|
||||
R.append(log, rec)
|
||||
print("[%d] -> %s" % (i, rec.get("stage")), flush=True)
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user