Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94a841e6a6 |
-71
@@ -1,71 +0,0 @@
|
||||
<div align="center">
|
||||
|
||||
<img src="assets/alstack-banner.svg" width="900" alt="@AlStack">
|
||||
|
||||
<br>
|
||||
|
||||
<a href="https://t.me/AlStack"><img src="assets/alstack-badge.svg" alt="Telegram: @AlStack"></a>
|
||||
|
||||
</div>
|
||||
|
||||
# @AlStack — the channel this repo comes from
|
||||
|
||||
**[t.me/AlStack](https://t.me/AlStack)** — free-tier farms, live proxy pools and API research.
|
||||
One operator, one rule: **no numbers without a proof**. Every limit that appears in these repos was
|
||||
read off a live API call; every farm that ships here was run end to end before it was written up.
|
||||
|
||||
If you only came for `urnet.py`, that is fine — but the next farm will be in the channel first.
|
||||
|
||||
## What lands there
|
||||
|
||||
| type | what it looks like |
|
||||
|---|---|
|
||||
| **New farms** | a free tier gets reversed, the caps get measured, a stdlib script gets shipped |
|
||||
| **Live pools** | working proxy / key pools with `alive` and `unique_ip`, not raw pasted lists |
|
||||
| **API teardowns** | which endpoints matter, which gates exist, which errors mean "dead" and which mean "wait" |
|
||||
| **Failures** | what did not work and why — the part other channels skip, and the part that saves the most time |
|
||||
| **Tooling** | scripts, shims, dashboards, gateways — the plumbing behind the public repos |
|
||||
|
||||
## What it is not
|
||||
|
||||
- not a repost dump — everything is run before it is posted;
|
||||
- not "1000 free proxies" — dead lists are worthless, the channel prints measurements instead;
|
||||
- not a paid group — free, public, no referral pyramids.
|
||||
|
||||
## The repos behind the channel
|
||||
|
||||
Everything below is public, stdlib-first, and documented with measured limits:
|
||||
|
||||
- [ur-network-farm](https://git.reformboss.com/reform/ur-network-farm) — 30 GiB/day + 5 residential
|
||||
proxies per account, zero signup friction (this repo)
|
||||
- [coarena-autoreg](https://git.reformboss.com/reform/coarena-autoreg) — 10 `coa_` keys per account
|
||||
- [camb-autoreg](https://git.reformboss.com/reform/camb-autoreg) — 5000-credit TTS workspaces
|
||||
- [netlify-autoreg](https://git.reformboss.com/reform/netlify-autoreg) — Netlify + AI Gateway keys
|
||||
- [composio-autoreg](https://git.reformboss.com/reform/composio-autoreg) — `ck_` keys, 10k tool calls/mo
|
||||
- [bria-autoreg](https://git.reformboss.com/reform/bria-autoreg) — Bria AI image keys
|
||||
- [wavespeed-autoreg](https://git.reformboss.com/reform/wavespeed-autoreg) — WaveSpeed trials
|
||||
- [eden-autoreg](https://git.reformboss.com/reform/eden-autoreg) — Eden AI register endpoint
|
||||
- [river-autoreg](https://git.reformboss.com/reform/river-autoreg) — River.ai WorkOS flow
|
||||
- [smallest-ai-autoreg](https://git.reformboss.com/reform/smallest-ai-autoreg) — smallest.ai + Waves
|
||||
- [contextdev-autoreg](https://git.reformboss.com/reform/contextdev-autoreg) — context.dev credits
|
||||
- [full-parse-kit](https://git.reformboss.com/reform/full-parse-kit) — 287-source parse pipeline
|
||||
- [form-intake](https://git.reformboss.com/reform/form-intake) — multi-lane form submitter
|
||||
|
||||
## How to read the channel
|
||||
|
||||
1. Post with numbers -> the numbers were measured that day on a live tier. Quotas shift; re-measure.
|
||||
2. Post with a script -> the script is public in one of the repos above. Read the code, not the promise.
|
||||
3. Post with a failure -> the useful one. If a gate is described as closed, assume it is still closed.
|
||||
|
||||
## Start here
|
||||
|
||||
**[t.me/AlStack](https://t.me/AlStack)** — subscribe, read the last 20 posts, then run
|
||||
`python urnet.py farm --count 1`. If it works, you already have 5 residential exits and 30 GiB/day.
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
|
||||
**Channels come and go. Measured limits stay. — [t.me/AlStack](https://t.me/AlStack)**
|
||||
|
||||
</div>
|
||||
@@ -1,20 +1,3 @@
|
||||
<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).
|
||||
|
||||
# WaveSpeed.ai autoreg
|
||||
|
||||
Automated account registration on [wavespeed.ai](https://wavespeed.ai) via GitHub OAuth,
|
||||
@@ -99,36 +82,8 @@ The script skips logins already listed in `WS_USED`.
|
||||
```
|
||||
wavespeed/ws_autoreg.py registration pipeline (GitHub OAuth + Turnstile + key creation)
|
||||
wavespeed/ws_keycheck.py key validation: catalogue, chat completion, media generation
|
||||
wavespeed/ws_classify.py donor pre-flight: ready / flagged / nosession (no captcha spent)
|
||||
```
|
||||
|
||||
## Account-state gates (measured 2026-11-13)
|
||||
|
||||
Mass-registered GitHub accounts are not interchangeable: before spending a Turnstile solve,
|
||||
classify the donor. `wavespeed/ws_classify.py` does exactly this — one login + one authorize
|
||||
fetch per account (~5-8 s, no captcha), verdicts `ready` / `flagged` / `nosession`.
|
||||
|
||||
Three states observed on the same egress:
|
||||
|
||||
| state | signal | share |
|
||||
|---|---|---|
|
||||
| `ready` | authorize page renders (200 with `authenticity_token` + `authorize`) | ~17% of day-old accounts |
|
||||
| `flagged` | `200` on `/dashboard` with flash *"This account is flagged, and therefore cannot authorize a third party application"* | ~8% |
|
||||
| `nosession` | authorize redirects to `/login?client_id=...` | ~75% |
|
||||
|
||||
- Fresh accounts (registered the same day at scale) are `flagged` almost immediately —
|
||||
GitHub refuses third-party authorization client-side, nothing in the flow can fix it.
|
||||
- Month-old pools die on 2FA: `/sessions/two-factor/app` rejects the stored TOTP secret
|
||||
(the post to `/sessions/two-factor` returns the same page, session never establishes).
|
||||
- A burned residential IP shows `nosession` for every account: logins pass but the session
|
||||
does not survive the next request. This is the GitHub-side per-IP login budget, not a
|
||||
credential problem.
|
||||
- On the `ready` subset the trial grant is far better than the earlier 4-6% estimate:
|
||||
a 2/2 run and a 17% ready-rate means the practical cost is ~6 accounts per `$1`,
|
||||
not ~20.
|
||||
|
||||
Recommended order: classify → run the pipeline only on `ready` → keep one GH lane at a time.
|
||||
|
||||
## Notes / pitfalls
|
||||
|
||||
- `verified-device` on the GitHub login means the account needs an e-mail code — use
|
||||
@@ -143,18 +98,4 @@ Recommended order: classify → run the pipeline only on `ready` → keep one GH
|
||||
|
||||
## License
|
||||
|
||||
MIT — see `LICENSE`.
|
||||
|
||||
|
||||
---
|
||||
|
||||
<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>
|
||||
MIT — see `LICENSE`.
|
||||
@@ -1,17 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="360" height="46" viewBox="0 0 360 46" role="img" aria-label="Telegram @AlStack">
|
||||
<defs>
|
||||
<linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0" stop-color="#1b2836"/>
|
||||
<stop offset="1" stop-color="#0d141c"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="a" x1="0" y1="0" x2="1" y2="0">
|
||||
<stop offset="0" stop-color="#2ea8ff"/>
|
||||
<stop offset="1" stop-color="#00d6a4"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect x="0.5" y="0.5" width="359" height="45" rx="9" fill="url(#g)" stroke="#22384d"/>
|
||||
<rect x="0.5" y="0.5" width="112" height="45" rx="9" fill="url(#a)" opacity="0.16"/>
|
||||
<text x="18" y="29" font-family="'DejaVu Sans Mono',Consolas,monospace" font-size="14" font-weight="700" fill="#7fb6d9" letter-spacing="1.2">TELEGRAM</text>
|
||||
<circle cx="128" cy="23" r="4" fill="#00d6a4"/>
|
||||
<text x="144" y="30" font-family="'DejaVu Sans Mono',Consolas,monospace" font-size="18" font-weight="700" fill="#e8f4ff">@AlStack</text>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1017 B |
@@ -1,31 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="260" viewBox="0 0 1200 260" role="img" aria-label="@AlStack — free-tier farms, proxy pools, API research">
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0" stop-color="#0b1219"/>
|
||||
<stop offset="0.55" stop-color="#101b25"/>
|
||||
<stop offset="1" stop-color="#0b1219"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="accent" x1="0" y1="0" x2="1" y2="0">
|
||||
<stop offset="0" stop-color="#2ea8ff"/>
|
||||
<stop offset="1" stop-color="#00d6a4"/>
|
||||
</linearGradient>
|
||||
<pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse">
|
||||
<path d="M40 0 H0 V40" fill="none" stroke="#16232f" stroke-width="1"/>
|
||||
</pattern>
|
||||
</defs>
|
||||
<rect width="1200" height="260" fill="url(#bg)"/>
|
||||
<rect width="1200" height="260" fill="url(#grid)" opacity="0.55"/>
|
||||
<rect x="0" y="0" width="1200" height="5" fill="url(#accent)"/>
|
||||
<rect x="72" y="56" width="6" height="148" rx="3" fill="url(#accent)"/>
|
||||
<text x="104" y="104" font-family="'DejaVu Sans Mono',Consolas,monospace" font-size="20" font-weight="700" fill="#7fb6d9" letter-spacing="3.4">URNET / UR-NETWORK-FARM</text>
|
||||
<text x="102" y="164" font-family="'DejaVu Sans Mono',Consolas,monospace" font-size="62" font-weight="700" fill="#eaf5ff">@AlStack</text>
|
||||
<text x="104" y="200" font-family="'DejaVu Sans Mono',Consolas,monospace" font-size="19" fill="#93b4c9">free-tier farms · live proxy pools · API research</text>
|
||||
<g transform="translate(760,74)">
|
||||
<rect x="0" y="0" width="368" height="112" rx="12" fill="#0e1a24" stroke="#22384d"/>
|
||||
<text x="22" y="34" font-family="'DejaVu Sans Mono',Consolas,monospace" font-size="15" fill="#5f8ba8">$ git clone</text>
|
||||
<text x="22" y="60" font-family="'DejaVu Sans Mono',Consolas,monospace" font-size="15" fill="#eaf5ff">ur-network-farm</text>
|
||||
<text x="22" y="88" font-family="'DejaVu Sans Mono',Consolas,monospace" font-size="15" fill="#00d6a4">→ t.me/AlStack</text>
|
||||
<text x="22" y="108" font-family="'DejaVu Sans Mono',Consolas,monospace" font-size="13" fill="#5f8ba8">new farms drop in the channel first</text>
|
||||
</g>
|
||||
<text x="104" y="238" font-family="'DejaVu Sans Mono',Consolas,monospace" font-size="15" fill="#4d7188">t.me/AlStack · zero-cost egress · stdlib only · no card, no email, no captcha</text>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.3 KiB |
@@ -1,141 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Pre-flight classifier for GitHub accounts used as WaveSpeed OAuth donors.
|
||||
|
||||
WaveSpeed is GitHub-OAuth only, so an account that GitHub refuses to authorize is
|
||||
worthless no matter how many times you retry. Two failure modes dominate and are
|
||||
invisible until the full (captcha-paid) pipeline runs:
|
||||
|
||||
* ``flagged`` — "This account is flagged, and therefore cannot authorize
|
||||
a third party application". Freshly mass-registered accounts hit this almost
|
||||
immediately; nothing can be done client-side.
|
||||
* ``nosession`` — /login lands without an authenticated session (password
|
||||
changed, device verification required, or the egress IP already burned its
|
||||
GitHub login budget). The authorize URL then redirects to /login.
|
||||
|
||||
Only ``ready`` accounts deserve a Turnstile solve. Classifying costs one login and
|
||||
one page fetch per account (~5-8 s) and no captcha money.
|
||||
|
||||
Usage:
|
||||
python ws_classify.py <pool.json> <limit> [skip]
|
||||
# appends ready accounts to pool_ready.json, verdicts to classify.log
|
||||
|
||||
Pool format: JSON list (or JSONL) of {login, password, totp, email, email_pw}.
|
||||
"""
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
import requests
|
||||
|
||||
HOME = os.path.dirname(os.path.abspath(__file__))
|
||||
OUT = os.path.join(HOME, "pool_ready.json")
|
||||
SEEN = os.path.join(HOME, "classify_seen.txt")
|
||||
LOG = os.path.join(HOME, "classify.log")
|
||||
|
||||
UA = ("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
|
||||
"(KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36")
|
||||
CLIENT_ID = os.environ.get("WS_GH_CLIENT_ID", "Ov23liO4t6o6MsNlCsE9")
|
||||
AUTH = ("https://github.com/login/oauth/authorize?client_id=%s"
|
||||
"&redirect_uri=https%%3A%%2F%%2Fwavespeed.ai%%2Fcenter%%2Fdefault%%2Fgithub%%2Fcallback"
|
||||
"&response_type=code" % CLIENT_ID)
|
||||
|
||||
|
||||
def log(msg):
|
||||
print(msg, flush=True)
|
||||
with open(LOG, "a", encoding="utf-8") as f:
|
||||
f.write(time.strftime("%H:%M:%S ") + msg + "\n")
|
||||
|
||||
|
||||
def gh_login(acc):
|
||||
"""Direct (residential) login. Returns (session, verdict)."""
|
||||
s = requests.Session()
|
||||
s.headers.update({"User-Agent": UA, "Accept-Language": "en-US,en;q=0.9"})
|
||||
r = s.get("https://github.com/login", timeout=45)
|
||||
import re
|
||||
m = re.search(r'name="authenticity_token" value="([^"]+)"', r.text)
|
||||
if not m:
|
||||
return None, "no-csrf"
|
||||
r = s.post("https://github.com/session",
|
||||
data={"authenticity_token": m.group(1), "login": acc["login"],
|
||||
"password": acc["password"], "commit": "Sign in", "return_to": ""},
|
||||
timeout=45, allow_redirects=True)
|
||||
if "verified-device" in r.url:
|
||||
return None, "verified-device"
|
||||
if "two-factor" in r.url:
|
||||
if not acc.get("totp"):
|
||||
return None, "2fa-no-secret"
|
||||
try:
|
||||
import pyotp
|
||||
except ImportError:
|
||||
return None, "2fa-no-pyotp"
|
||||
m2 = re.search(r'name="authenticity_token" value="([^"]+)"', r.text)
|
||||
r = s.post("https://github.com/sessions/two-factor",
|
||||
data={"authenticity_token": m2.group(1) if m2 else "",
|
||||
"otp": pyotp.TOTP(acc["totp"]).now()},
|
||||
timeout=45, allow_redirects=True)
|
||||
if "two-factor" in r.url:
|
||||
return None, "2fa-fail"
|
||||
if "github.com/login" in r.url:
|
||||
return None, "login-fail"
|
||||
return s, "ok"
|
||||
|
||||
|
||||
def classify(acc):
|
||||
s, verdict = gh_login(acc)
|
||||
if not s:
|
||||
return "login:" + verdict
|
||||
try:
|
||||
r = s.get(AUTH, timeout=45, allow_redirects=True)
|
||||
body = r.text.lower()
|
||||
if "cannot authorize a third party application" in body:
|
||||
return "flagged"
|
||||
if "login/oauth/authorize" in r.url and "authorize" in body:
|
||||
return "ready"
|
||||
if "/login" in r.url:
|
||||
return "nosession"
|
||||
return "other:" + r.url[:60]
|
||||
except Exception as e: # noqa: BLE001
|
||||
return "authz-err:" + repr(e)[:60]
|
||||
|
||||
|
||||
def load_pool(path):
|
||||
txt = open(path, encoding="utf-8", errors="replace").read().strip()
|
||||
if txt.startswith("["):
|
||||
return json.loads(txt)
|
||||
out = []
|
||||
for line in txt.splitlines():
|
||||
line = line.strip()
|
||||
if line:
|
||||
try:
|
||||
out.append(json.loads(line))
|
||||
except Exception: # noqa: BLE001
|
||||
pass
|
||||
return out
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 2:
|
||||
print(__doc__)
|
||||
return
|
||||
pool = load_pool(sys.argv[1])
|
||||
limit = int(sys.argv[2]) if len(sys.argv) > 2 else 50
|
||||
skip = int(sys.argv[3]) if len(sys.argv) > 3 else 0
|
||||
done = set(open(SEEN).read().split()) if os.path.exists(SEEN) else set()
|
||||
todo = [a for a in pool if a.get("login") and a["login"] not in done]
|
||||
log("pool=%d done=%d todo=%d" % (len(pool), len(done), len(todo)))
|
||||
good = 0
|
||||
for acc in todo[skip:skip + limit]:
|
||||
verdict = classify(acc)
|
||||
if verdict == "ready":
|
||||
good += 1
|
||||
with open(OUT, "a", encoding="utf-8") as f:
|
||||
f.write(json.dumps(acc, ensure_ascii=False) + "\n")
|
||||
with open(SEEN, "a") as f:
|
||||
f.write(acc["login"] + "\n")
|
||||
log("%s -> %s" % (acc["login"], verdict))
|
||||
log("DONE ready=%d of %d" % (good, limit))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
-152
@@ -1,152 +0,0 @@
|
||||
"""WaveSpeed autoreg worker. One account = GH OAuth + Turnstile(2cap) + NL egress -> $1 trial."""
|
||||
import requests, re, json, sys, time, os, uuid
|
||||
import pyotp
|
||||
|
||||
HOME = os.environ.get("WS_HOME", os.path.dirname(os.path.abspath(__file__)))
|
||||
BANK = os.path.join(HOME, "bank.jsonl")
|
||||
USED = os.path.join(HOME, "used_gh.txt")
|
||||
UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36"
|
||||
KEY2CAP = os.environ.get("TWOCAPTCHA_KEY", "").strip() or open(os.path.join(HOME, ".2cap_key")).read().strip()
|
||||
SITE = "0x4AAAAAADkE2yCxK2sRF0Q4"
|
||||
CLIENT = "Ov23liO4t6o6MsNlCsE9"
|
||||
BOXES = [b.strip() for b in os.environ.get("WS_BOXES", "").split(",") if b.strip()]
|
||||
PXAUTH = os.environ.get("PROXY_AUTH", "") # user:pass for the HTTP CONNECT proxy pool
|
||||
|
||||
|
||||
def proxies(i):
|
||||
b = BOXES[i % len(BOXES)]
|
||||
px = "http://%s@%s:8888" % (PXAUTH, b)
|
||||
return {"http": px, "https": px}
|
||||
|
||||
|
||||
def ts_token():
|
||||
s = requests.Session()
|
||||
r = s.post("https://api.2captcha.com/createTask", json={"clientKey": KEY2CAP, "task": {
|
||||
"type": "TurnstileTaskProxyless", "websiteURL": "https://wavespeed.ai/sign-in",
|
||||
"websiteKey": SITE, "action": "login", "userAgent": UA}}, timeout=30).json()
|
||||
tid = r.get("taskId")
|
||||
if not tid:
|
||||
raise RuntimeError("2cap: %s" % str(r)[:150])
|
||||
for _ in range(40):
|
||||
time.sleep(5)
|
||||
res = s.post("https://api.2captcha.com/getTaskResult", json={"clientKey": KEY2CAP, "taskId": tid}, timeout=30).json()
|
||||
if res.get("status") == "ready":
|
||||
return res["solution"]["token"]
|
||||
if res.get("errorId"):
|
||||
raise RuntimeError("2cap err: %s" % str(res)[:150])
|
||||
raise RuntimeError("turnstile timeout")
|
||||
|
||||
|
||||
def gh_login(s, login, password, totp_secret):
|
||||
r = s.get("https://github.com/login", timeout=45)
|
||||
m = re.search(r'name="authenticity_token" value="([^"]+)"', r.text)
|
||||
if not m:
|
||||
return "no-csrf"
|
||||
r = s.post("https://github.com/session", data={"authenticity_token": m.group(1), "login": login,
|
||||
"password": password, "commit": "Sign in", "return_to": ""}, timeout=45, allow_redirects=True)
|
||||
if "two-factor" in r.url:
|
||||
if not totp_secret:
|
||||
return "2fa-no-secret"
|
||||
code = pyotp.TOTP(totp_secret).now()
|
||||
m2 = re.search(r'name="authenticity_token" value="([^"]+)"', r.text)
|
||||
r = s.post("https://github.com/sessions/two-factor", data={"authenticity_token": m2.group(1) if m2 else "",
|
||||
"otp": code}, timeout=45, allow_redirects=True)
|
||||
if "two-factor" in r.url:
|
||||
return "2fa-fail"
|
||||
if "github.com/login" in r.url:
|
||||
return "login-fail"
|
||||
return "ok"
|
||||
|
||||
|
||||
def balance_of(s):
|
||||
d = s.get("https://wavespeed.ai/dashboard", timeout=60)
|
||||
m = re.search(r'Current credit balance.{0,220}?\$\s*<!-- -->([0-9.]+)', d.text, re.S)
|
||||
return (m.group(1) if m else None), d.text
|
||||
|
||||
|
||||
def reg(acc, idx=0):
|
||||
t0 = time.time()
|
||||
out = {"gh_login": acc["login"], "ts": int(t0), "box": BOXES[idx % len(BOXES)]}
|
||||
gs = requests.Session(); gs.headers.update({"User-Agent": UA, "Accept-Language": "en-US,en;q=0.9"})
|
||||
st = gh_login(gs, acc["login"], acc["password"], acc.get("totp", ""))
|
||||
out["gh"] = st
|
||||
if st != "ok":
|
||||
return out
|
||||
ws = requests.Session(); ws.headers.update({"User-Agent": UA, "Accept-Language": "en-US,en;q=0.9"})
|
||||
ws.proxies.update(proxies(idx))
|
||||
_host = "api.ipify.org" if "127.0.0.1" in ws.proxies.get("http", "") else "api6.ipify.org"
|
||||
try:
|
||||
out["egress"] = requests.get("https://%s?format=json" % _host, proxies=ws.proxies, timeout=25).json().get("ip", "?")
|
||||
except Exception as e:
|
||||
out["egress"] = "?"
|
||||
tok = ts_token()
|
||||
r = ws.get("https://wavespeed.ai/center/default/github/login", params={"cf-turnstile-response": tok},
|
||||
allow_redirects=False, timeout=60)
|
||||
if r.status_code != 302:
|
||||
out["err"] = "hop %s" % r.status_code
|
||||
return out
|
||||
authz = r.headers["location"]
|
||||
code = None
|
||||
for attempt in range(2):
|
||||
r2 = gs.get(authz, timeout=45, allow_redirects=False)
|
||||
loc = r2.headers.get("location", "")
|
||||
if loc.startswith("https://wavespeed.ai/center/default/github/callback"):
|
||||
code = loc
|
||||
break
|
||||
if "login/oauth/authorize" in r2.url:
|
||||
m = re.search(r'name="authenticity_token" value="([^"]+)"', r2.text)
|
||||
r2 = gs.post(r2.url, data={"authenticity_token": m.group(1) if m else "", "authorize": "1"},
|
||||
timeout=45, allow_redirects=False)
|
||||
loc = r2.headers.get("location", "")
|
||||
if loc.startswith("https://wavespeed.ai/center/default/github/callback"):
|
||||
code = loc
|
||||
break
|
||||
if loc.startswith("https://wavespeed.ai"):
|
||||
code = loc
|
||||
break
|
||||
time.sleep(2)
|
||||
if not code:
|
||||
out["err"] = "no-callback(%s)" % (loc[:60] if loc else "empty")
|
||||
return out
|
||||
r3 = ws.get(code, timeout=60, allow_redirects=True)
|
||||
out["landed"] = r3.url
|
||||
if "dashboard" not in r3.url:
|
||||
t = re.sub(r"\s+", " ", re.sub(r"<[^>]+>", " ", r3.text))
|
||||
out["err"] = "landed " + r3.url[:80]
|
||||
out["note"] = t[t.find("Welcome"):t.find("Welcome") + 200] if "Welcome" in t else ""
|
||||
return out
|
||||
bal, html = balance_of(ws)
|
||||
out["balance"] = bal
|
||||
kr = ws.post("https://wavespeed.ai/center/default/api/v1/accesskey/create",
|
||||
json={"name": "k" + uuid.uuid4().hex[:6]}, timeout=60)
|
||||
try:
|
||||
kd = kr.json(); out["key"] = (kd.get("data") or {}).get("key")
|
||||
except Exception:
|
||||
out["key_err"] = kr.text[:120]
|
||||
out["cookies"] = {c.name: c.value for c in ws.cookies if c.name.startswith("wavespeed")}
|
||||
out["secs"] = round(time.time() - t0, 1)
|
||||
return out
|
||||
|
||||
|
||||
def main(n):
|
||||
pool = json.load(open(r"C:\Users\User\tmp\runware\gh_ok.json", encoding="utf-8"))
|
||||
used = set(open(USED).read().split()) if os.path.exists(USED) else set()
|
||||
todo = [a for a in pool if a["login"] not in used]
|
||||
done = 0
|
||||
for i, acc in enumerate(todo):
|
||||
if done >= n:
|
||||
break
|
||||
try:
|
||||
o = reg(acc, i)
|
||||
except Exception as e:
|
||||
o = {"gh_login": acc["login"], "error": repr(e)[:200]}
|
||||
with open(BANK, "a", encoding="utf-8") as f:
|
||||
f.write(json.dumps(o, ensure_ascii=False) + "\n")
|
||||
with open(USED, "a") as f:
|
||||
f.write(acc["login"] + "\n")
|
||||
done += 1
|
||||
print(json.dumps({k: o.get(k) for k in ("gh_login", "gh", "balance", "key", "err", "note", "secs")}, ensure_ascii=False), flush=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(int(sys.argv[1]) if len(sys.argv) > 1 else 1)
|
||||
Reference in New Issue
Block a user