QwenCloud Generator
π Automated QwenCloud account registration & API key harvester with multi-threading, TUI dashboard, proxy rotation, and Gmail OAuth
Features β’ Prerequisites β’ Setup β’ Usage β’ How It Works
Features
- β‘ Multi-threaded β Run N browsers concurrently (
-t N) - π₯οΈ TUI Dashboard β Real-time worker status, progress bar, ETA, CPU/Mem
- π» Invisible mode β Headed browser on Xvfb virtual display (CF-safe)
- π Proxy rotation β Each account gets a unique proxy, no reuse
- π§ Gmail OAuth β Multi-account Gmail token management for email verification
- π Censor mode β Mask emails and API keys in output (
-c) - π Auto-resume β Login existing accounts to harvest missed API keys
- π Scenario detection β Auto-detects all page states (signup, login, OTP, dashboard, etc.)
Prerequisites
| Requirement | Install |
|---|---|
| Python 3.11+ | python.org |
| Google Chrome | google.com/chrome |
| Xvfb | sudo apt install xvfb |
| Playwright | pip install -r requirements.txt && playwright install chromium |
Setup
1. Clone & install
git clone https://github.com/Vanszs/qwencloud-generator.git
cd qwencloud-generator
pip install -r requirements.txt
playwright install chromium
2. Add proxies
Edit proxy.txt β one proxy per line:
username:password@host:port
3. Generate email list
python3 generate_email_list.py yourgmailuser -o email_list.txt
4. Set up Gmail OAuth
The script needs Gmail API access to read verification emails. Here's how to set it up:
4a. Create Google Cloud credentials
- Go to Google Cloud Console
- Create a new project (any name)
- Go to APIs & Services β Library β search "Gmail API" β Enable
- Go to APIs & Services β Credentials β Create Credentials β OAuth client ID
- Application type: Desktop app β Create
- Download the JSON file (
client_secret_*.json) - Rename it to
client_secret.jsonand place it in this folder
4b. Authorize your Gmail account(s)
For each base Gmail account you want to use, you need to get an OAuth refresh token:
python3 gmail_auth.py
If you see accounts: [] β that's normal! You haven't authorized any account yet.
To authorize, generate an OAuth URL for your Gmail:
python3 -c "
from gmail_auth import _default_client
import urllib.parse
client = _default_client()
url = f'https://accounts.google.com/o/oauth2/auth?client_id={client["client_id"]}&redirect_uri=http%3A//localhost%3A8085/callback&scope=https%3A//www.googleapis.com/auth/gmail.readonly&response_type=code&access_type=offline&prompt=consent&login_hint=yourname%40gmail.com'
print(url)
"
Replace [email protected] with your actual Gmail address.
- Open the printed URL in your browser
- Login with that Gmail account
- Click Allow on the consent screen
- You'll be redirected to
http://localhost:8085/callback?code=4/0Abc... - Copy the full URL from the address bar
- Exchange the code:
python3 -c "
from gmail_auth import exchange_code
exchange_code('[email protected]', '4/0Abc...')
print('Token saved!')
"
Replace [email protected] with the same Gmail, and 4/0Abc... with the code from the URL.
Verify it worked:
python3 gmail_auth.py
Repeat for each Gmail account you want to use.
Usage
Register new accounts
# Single thread, browser visible
python3 run.py 10
# 5 threads, invisible (Xvfb)
python3 run.py 100 --headless -t 5
# 10 threads with censored output
python3 run.py 400 --headless -t 10 -c
Resume existing accounts
python3 run.py 50 --headless -t 5 --resume
Flags
| Flag | Description | Default |
|---|---|---|
N |
Target number of successful API keys | 5 |
--headless |
Run via Xvfb (invisible browser) | off |
--resume |
Resume already-registered accounts via login | off |
-t N |
Number of concurrent threads | 1 |
-c |
Censor emails/API keys in output | off |
--log |
Show full subprocess logs | off |
--self |
Run without proxy (use own IP) | off |
--nyx PROXY |
Use rotating proxy | β |
How It Works
βββββββββββββββ ββββββββββββββββ βββββββββββββββββββ
β Email List βββββΆβ run.py βββββΆβ qwencloud_full.pyβ
β (Gmail) β β (Orchestrator)β β (Browser Auto) β
βββββββββββββββ β -t N threads β β - Signup/Login β
β TUI Dashboard β β - OTP verify β
βββββββββββββββ β Proxy claim β β - API key extractβ
β proxy.txt βββββΆβ Email claim β βββββββββββββββββββ
βββββββββββββββ ββββββββββββββββ β
β βΌ
ββββββββββββββββ βββββββββββββββ
β api_keys.txtββββββββ accounts.jsonβ
ββββββββββββββββ βββββββββββββββ
- Each thread claims a unique email + proxy (thread-safe)
- Spawns
qwencloud_full.pyas subprocess (Playwright is not thread-safe) - Monitors subprocess output for progress updates β TUI
- Parses
__RESULT__JSON from stdout - Saves API keys to
api_keys.txtand account data toaccounts.json
Files
| File | Purpose |
|---|---|
run.py |
Main orchestrator β threading, TUI, proxy/email claiming |
qwencloud_full.py |
Browser automation β signup, login, API key extraction |
gmail_auth.py |
Gmail OAuth multi-account token management |
generate_email_list.py |
Generate Gmail dot-variants |
logger.py |
Colored logging utilities |
tui.py |
Terminal UI dashboard (ANSI escape codes, no dependencies) |
run_hidden.sh |
Xvfb wrapper script |
Notes
- Each browser instance gets 1 unique proxy β no reuse
- Gmail dot-variants work as separate QwenCloud accounts
- Stuck processes are killed after 30s of no output
- Total timeout per account: 300s
- Cloudflare requires headed browser (use
--headlesswhich runs Xvfb, not true headless)
Comments