qoder-autopilot 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qoder_autopilot-0.2.1/.gitignore +67 -0
- qoder_autopilot-0.2.1/LICENSE +21 -0
- qoder_autopilot-0.2.1/PKG-INFO +299 -0
- qoder_autopilot-0.2.1/README.md +249 -0
- qoder_autopilot-0.2.1/docs/architecture.md +145 -0
- qoder_autopilot-0.2.1/examples/basic_usage.py +40 -0
- qoder_autopilot-0.2.1/examples/parallel_mode.py +77 -0
- qoder_autopilot-0.2.1/pyproject.toml +135 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/__init__.py +59 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/__main__.py +5 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/browser/__init__.py +5 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/browser/camoufox.py +62 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/browser/window_tiler.py +117 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/captcha/__init__.py +14 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/captcha/ai_vision.py +327 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/captcha/manual.py +95 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/captcha/opencv_detect.py +184 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/captcha/slider.py +86 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/captcha/solver.py +165 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/cli.py +431 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/config.py +300 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/credentials.py +44 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/deploy.py +338 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/errors.py +132 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/first_run.py +107 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/identity.py +66 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/logger.py +119 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/ninerouter.py +105 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/oauth.py +149 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/otp.py +67 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/register.py +383 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/temp_mail.py +307 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/user_config.py +171 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/worker_template/package.json +21 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/worker_template/schema.sql +24 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/worker_template/scripts/setup.sh +186 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/worker_template/src/config.js +6 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/worker_template/src/handlers/api.js +226 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/worker_template/src/handlers/email.js +50 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/worker_template/src/index.js +43 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/worker_template/src/utils.js +35 -0
- qoder_autopilot-0.2.1/src/qoder_autopilot/worker_template/wrangler.toml.example +19 -0
- qoder_autopilot-0.2.1/tests/conftest.py +79 -0
- qoder_autopilot-0.2.1/tests/test_config.py +64 -0
- qoder_autopilot-0.2.1/tests/test_errors.py +89 -0
- qoder_autopilot-0.2.1/tests/test_identity.py +72 -0
- qoder_autopilot-0.2.1/tests/test_oauth.py +91 -0
- qoder_autopilot-0.2.1/tests/test_otp.py +61 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# ═══════════════════════════════════════════════════
|
|
2
|
+
# Python
|
|
3
|
+
# ═══════════════════════════════════════════════════
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.py[cod]
|
|
6
|
+
*$py.class
|
|
7
|
+
*.so
|
|
8
|
+
*.egg-info/
|
|
9
|
+
*.egg
|
|
10
|
+
dist/
|
|
11
|
+
build/
|
|
12
|
+
.eggs/
|
|
13
|
+
*.whl
|
|
14
|
+
|
|
15
|
+
# Virtual environments
|
|
16
|
+
.venv/
|
|
17
|
+
venv/
|
|
18
|
+
env/
|
|
19
|
+
|
|
20
|
+
# ═══════════════════════════════════════════════════
|
|
21
|
+
# Environment & Secrets
|
|
22
|
+
# ═══════════════════════════════════════════════════
|
|
23
|
+
.env
|
|
24
|
+
.env.local
|
|
25
|
+
.env.*.local
|
|
26
|
+
|
|
27
|
+
# ═══════════════════════════════════════════════════
|
|
28
|
+
# Credentials & Data (sensitive!)
|
|
29
|
+
# ═══════════════════════════════════════════════════
|
|
30
|
+
qoder_accounts.json
|
|
31
|
+
*.sqlite
|
|
32
|
+
*.db
|
|
33
|
+
|
|
34
|
+
# ═══════════════════════════════════════════════════
|
|
35
|
+
# Logs & Screenshots (generated artifacts)
|
|
36
|
+
# ═══════════════════════════════════════════════════
|
|
37
|
+
run_*.log
|
|
38
|
+
screenshots/
|
|
39
|
+
*.png
|
|
40
|
+
!docs/*.png
|
|
41
|
+
!examples/*.png
|
|
42
|
+
|
|
43
|
+
# ═══════════════════════════════════════════════════
|
|
44
|
+
# IDE & Editor
|
|
45
|
+
# ═══════════════════════════════════════════════════
|
|
46
|
+
.vscode/
|
|
47
|
+
.idea/
|
|
48
|
+
*.swp
|
|
49
|
+
*.swo
|
|
50
|
+
*~
|
|
51
|
+
.DS_Store
|
|
52
|
+
|
|
53
|
+
# ═══════════════════════════════════════════════════
|
|
54
|
+
# Testing & Coverage
|
|
55
|
+
# ═══════════════════════════════════════════════════
|
|
56
|
+
.coverage
|
|
57
|
+
htmlcov/
|
|
58
|
+
.pytest_cache/
|
|
59
|
+
.mypy_cache/
|
|
60
|
+
.ruff_cache/
|
|
61
|
+
|
|
62
|
+
# ═══════════════════════════════════════════════════
|
|
63
|
+
# Backup files
|
|
64
|
+
# ═══════════════════════════════════════════════════
|
|
65
|
+
*.bak
|
|
66
|
+
*.orig
|
|
67
|
+
_archive/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Daivageralda
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: qoder-autopilot
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: Automated Qoder account registration with anti-detect browser, captcha solving (AI + OpenCV), and 9Router OAuth integration.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Daivageralda/qoder-autopilot
|
|
6
|
+
Project-URL: Repository, https://github.com/Daivageralda/qoder-autopilot
|
|
7
|
+
Project-URL: Issues, https://github.com/Daivageralda/qoder-autopilot/issues
|
|
8
|
+
Author: Daivageralda
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: 9router,automation,camoufox,captcha,oauth,qoder
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: MacOS
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
|
|
23
|
+
Classifier: Topic :: Software Development :: Testing
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Requires-Dist: camoufox[geoip]>=0.4
|
|
26
|
+
Requires-Dist: faker>=20.0
|
|
27
|
+
Requires-Dist: playwright>=1.40
|
|
28
|
+
Requires-Dist: pydantic-settings>=2.0
|
|
29
|
+
Requires-Dist: pydantic>=2.0
|
|
30
|
+
Requires-Dist: python-dotenv>=1.0
|
|
31
|
+
Requires-Dist: requests>=2.28
|
|
32
|
+
Provides-Extra: all
|
|
33
|
+
Requires-Dist: numpy>=1.24; extra == 'all'
|
|
34
|
+
Requires-Dist: openai>=1.0; extra == 'all'
|
|
35
|
+
Requires-Dist: opencv-python-headless>=4.8; extra == 'all'
|
|
36
|
+
Provides-Extra: captcha
|
|
37
|
+
Requires-Dist: numpy>=1.24; extra == 'captcha'
|
|
38
|
+
Requires-Dist: openai>=1.0; extra == 'captcha'
|
|
39
|
+
Requires-Dist: opencv-python-headless>=4.8; extra == 'captcha'
|
|
40
|
+
Provides-Extra: dev
|
|
41
|
+
Requires-Dist: mypy>=1.0; extra == 'dev'
|
|
42
|
+
Requires-Dist: numpy>=1.24; extra == 'dev'
|
|
43
|
+
Requires-Dist: openai>=1.0; extra == 'dev'
|
|
44
|
+
Requires-Dist: opencv-python-headless>=4.8; extra == 'dev'
|
|
45
|
+
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
|
|
46
|
+
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
|
|
47
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
48
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
49
|
+
Description-Content-Type: text/markdown
|
|
50
|
+
|
|
51
|
+
# 🤖 Qoder Autopilot
|
|
52
|
+
|
|
53
|
+
Automated [Qoder](https://qoder.com) account registration with anti-detect browser, multi-strategy captcha solving, and [9Router](https://github.com/nicepkg/9router) OAuth device token integration.
|
|
54
|
+
|
|
55
|
+
> Register Qoder accounts → solve captchas → verify OTP → auto-connect to 9Router. All in one command.
|
|
56
|
+
|
|
57
|
+
[](https://www.python.org/downloads/)
|
|
58
|
+
[](https://opensource.org/licenses/MIT)
|
|
59
|
+
[](https://camoufox.com/)
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## ✨ Features
|
|
64
|
+
|
|
65
|
+
- **🦊 Anti-detect Browser** — Uses [Camoufox](https://camoufox.com/) (stealth Firefox fork) with C++-level fingerprinting to bypass bot detection
|
|
66
|
+
- **🧩 Multi-strategy Captcha Solving**
|
|
67
|
+
- AI Vision (Gemini/GPT via OpenAI-compatible API)
|
|
68
|
+
- Manual mode (pause and solve it yourself)
|
|
69
|
+
- **📧 Multi-Provider Temp Mail** — Cloudflare Workers (default) or Moca Supabase
|
|
70
|
+
- **🔐 OAuth Device Flow** — PKCE-based device token flow (reverse-engineered from 9Router)
|
|
71
|
+
- **🔌 9Router Auto-Connect** — Inserts device tokens directly into 9Router's SQLite database
|
|
72
|
+
- **🚀 First-Run Wizard** — Interactive setup on first launch
|
|
73
|
+
- **🏠 Built-in Worker Deploy** — Deploy your own temp mail worker from CLI
|
|
74
|
+
- **⚡ Parallel Mode** — Register multiple accounts concurrently
|
|
75
|
+
- **⚙️ Persistent Config** — `qoder-autopilot config` for easy customization
|
|
76
|
+
|
|
77
|
+
## 📦 Installation
|
|
78
|
+
|
|
79
|
+
### From source (recommended)
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
git clone https://github.com/Daivageralda/qoder-autopilot.git
|
|
83
|
+
cd qoder-autopilot
|
|
84
|
+
|
|
85
|
+
# Basic install (manual captcha only)
|
|
86
|
+
pip install -e .
|
|
87
|
+
|
|
88
|
+
# With AI captcha solver
|
|
89
|
+
pip install -e ".[captcha]"
|
|
90
|
+
|
|
91
|
+
# Full install + dev tools
|
|
92
|
+
pip install -e ".[dev]"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Via pip
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
pip install qoder-autopilot
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Post-install
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# Download Camoufox browser binary
|
|
105
|
+
python -m camoufox fetch
|
|
106
|
+
|
|
107
|
+
# Download Playwright browsers (if needed)
|
|
108
|
+
playwright install firefox
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## 🚀 Quick Start
|
|
112
|
+
|
|
113
|
+
First time? Just run:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
qoder-autopilot
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
You'll see the setup wizard:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
╔══════════════════════════════════════════════════╗
|
|
123
|
+
║ 👋 Welcome to qoder-autopilot! ║
|
|
124
|
+
║ Let's get you set up in 30 seconds. ║
|
|
125
|
+
╚══════════════════════════════════════════════════╝
|
|
126
|
+
|
|
127
|
+
[1] 🚀 Quick Start — use the default public worker
|
|
128
|
+
[2] 🏠 Self-Host — deploy your own Cloudflare Worker
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Pick **1** for instant setup, or **2** to deploy your own temp mail service.
|
|
132
|
+
|
|
133
|
+
### Registration commands
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Single account, manual captcha (most reliable)
|
|
137
|
+
qoder-autopilot --manual-captcha
|
|
138
|
+
|
|
139
|
+
# 5 accounts sequentially
|
|
140
|
+
qoder-autopilot -n 5 --manual-captcha
|
|
141
|
+
|
|
142
|
+
# 5 accounts in parallel
|
|
143
|
+
qoder-autopilot -n 5 --manual-captcha --parallel
|
|
144
|
+
|
|
145
|
+
# Skip OAuth/9Router, just register
|
|
146
|
+
qoder-autopilot --manual-captcha --no-oauth
|
|
147
|
+
|
|
148
|
+
# Show browser windows
|
|
149
|
+
qoder-autopilot --manual-captcha --no-headless
|
|
150
|
+
|
|
151
|
+
# Custom delay between accounts (seconds)
|
|
152
|
+
qoder-autopilot -n 3 --manual-captcha --delay 60
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## 📋 All Commands
|
|
156
|
+
|
|
157
|
+
| Command | Description |
|
|
158
|
+
|---|---|
|
|
159
|
+
| `qoder-autopilot` | First-run wizard (no config) or start registration |
|
|
160
|
+
| `qoder-autopilot [options]` | Register accounts (see flags below) |
|
|
161
|
+
| `qoder-autopilot deploy` | Deploy your own temp mail worker |
|
|
162
|
+
| `qoder-autopilot config` | Show config help + available keys |
|
|
163
|
+
| `qoder-autopilot config show` | Show all current settings with source |
|
|
164
|
+
| `qoder-autopilot config get <key>` | Get a specific config value |
|
|
165
|
+
| `qoder-autopilot config set <key> <value>` | Set a config value |
|
|
166
|
+
| `qoder-autopilot config reset` | Reset all settings to defaults |
|
|
167
|
+
|
|
168
|
+
### Registration flags
|
|
169
|
+
|
|
170
|
+
| Flag | Description | Default |
|
|
171
|
+
|---|---|---|
|
|
172
|
+
| `-n`, `--count N` | Number of accounts to create | `1` |
|
|
173
|
+
| `--manual-captcha` | Pause for manual captcha solving (forces non-headless) | `false` |
|
|
174
|
+
| `--no-headless` | Show browser windows | `false` |
|
|
175
|
+
| `--no-oauth` | Skip 9Router OAuth, just register | `false` |
|
|
176
|
+
| `--parallel` | Run all accounts concurrently | `false` |
|
|
177
|
+
| `--delay N` | Delay between sequential accounts (seconds) | `30` |
|
|
178
|
+
|
|
179
|
+
## ⚙️ Configuration
|
|
180
|
+
|
|
181
|
+
Three-tier priority: **Environment variables** → **User config** (`~/.qoder-autopilot/config.json`) → **Defaults**
|
|
182
|
+
|
|
183
|
+
### Via CLI (recommended)
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# See all settings
|
|
187
|
+
qoder-autopilot config show
|
|
188
|
+
|
|
189
|
+
# Set values
|
|
190
|
+
qoder-autopilot config set worker-url https://my-worker.workers.dev
|
|
191
|
+
qoder-autopilot config set ai-api-key sk-abc123...
|
|
192
|
+
qoder-autopilot config set otp-timeout 30
|
|
193
|
+
qoder-autopilot config set mail-provider moca
|
|
194
|
+
|
|
195
|
+
# Get a value
|
|
196
|
+
qoder-autopilot config get worker-url
|
|
197
|
+
|
|
198
|
+
# Reset everything
|
|
199
|
+
qoder-autopilot config reset
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Configurable keys
|
|
203
|
+
|
|
204
|
+
| Key | Description | Default |
|
|
205
|
+
|---|---|---|
|
|
206
|
+
| `mail-provider` | Temp mail provider: `cloudflare` or `moca` | `cloudflare` |
|
|
207
|
+
| `worker-url` | Cloudflare Worker URL | Built-in default |
|
|
208
|
+
| `moca-api-key` | Moca Supabase API key (`tmk_xxx`) | *(empty)* |
|
|
209
|
+
| `moca-base-url` | Moca Supabase base URL | *(built-in)* |
|
|
210
|
+
| `ai-api-key` | API key for AI captcha solver | *(empty)* |
|
|
211
|
+
| `ai-base-url` | OpenAI-compatible API base URL | `https://ai.sumopod.com/v1` |
|
|
212
|
+
| `ai-model` | AI model name | `gemini/gemini-2.5-flash` |
|
|
213
|
+
| `otp-timeout` | Max seconds to wait for OTP | `20` |
|
|
214
|
+
| `captcha-timeout` | Max seconds for manual captcha | `120` |
|
|
215
|
+
| `parallel-delay` | Delay between parallel accounts (sec) | `30` |
|
|
216
|
+
| `ninerouter-db` | Path to 9Router SQLite DB | `~/.9router/db/data.sqlite` |
|
|
217
|
+
|
|
218
|
+
### Via environment variables
|
|
219
|
+
|
|
220
|
+
All keys can be set with `QODER_` prefix:
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
export QODER_WORKER_URL=https://my-worker.workers.dev
|
|
224
|
+
export QODER_AI_API_KEY=sk-abc123...
|
|
225
|
+
export QODER_OTP_TIMEOUT=30
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Via `.env` file
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
cp .env.example .env
|
|
232
|
+
# Edit .env with your settings
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## 🏠 Self-Host Temp Mail Worker
|
|
236
|
+
|
|
237
|
+
Want your own independent temp mail service? Deploy in 5 minutes:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
# From qoder-autopilot (bundled worker template)
|
|
241
|
+
qoder-autopilot deploy
|
|
242
|
+
|
|
243
|
+
# Or clone the standalone repo
|
|
244
|
+
git clone https://github.com/Daivageralda/cf-mail-worker.git
|
|
245
|
+
cd cf-mail-worker
|
|
246
|
+
npm install
|
|
247
|
+
npm run setup
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
See [cf-mail-worker](https://github.com/Daivageralda/cf-mail-worker) for full documentation.
|
|
251
|
+
|
|
252
|
+
## 🏗️ Architecture
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
qoder-autopilot/
|
|
256
|
+
├── src/qoder_autopilot/
|
|
257
|
+
│ ├── cli.py # CLI entry point
|
|
258
|
+
│ ├── config.py # Pydantic Settings (env + user config + defaults)
|
|
259
|
+
│ ├── user_config.py # Persistent config manager (~/.qoder-autopilot/)
|
|
260
|
+
│ ├── first_run.py # First-run setup wizard
|
|
261
|
+
│ ├── deploy.py # Worker deploy (extract + setup)
|
|
262
|
+
│ ├── register.py # Main registration flow
|
|
263
|
+
│ ├── temp_mail.py # Multi-provider temp email client
|
|
264
|
+
│ ├── oauth.py # PKCE device auth flow
|
|
265
|
+
│ ├── otp.py # Email OTP extraction
|
|
266
|
+
│ ├── identity.py # Random identity generation (faker id_ID)
|
|
267
|
+
│ ├── credentials.py # Account credential storage
|
|
268
|
+
│ ├── ninerouter.py # 9Router SQLite integration
|
|
269
|
+
│ ├── errors.py # Custom exceptions
|
|
270
|
+
│ ├── logger.py # ANSI colored structured logging
|
|
271
|
+
│ ├── browser/
|
|
272
|
+
│ │ ├── camoufox.py # Anti-detect browser launcher
|
|
273
|
+
│ │ └── window_tiler.py # macOS window grid positioning
|
|
274
|
+
│ ├── captcha/
|
|
275
|
+
│ │ ├── solver.py # Orchestrator (AI → manual)
|
|
276
|
+
│ │ ├── ai_vision.py # AI vision gap detection
|
|
277
|
+
│ │ └── manual.py # Manual solve pause/poll
|
|
278
|
+
│ └── worker_template/ # Bundled Cloudflare Worker (for deploy)
|
|
279
|
+
│ ├── src/ # Worker JS source
|
|
280
|
+
│ ├── schema.sql # D1 database schema
|
|
281
|
+
│ ├── package.json
|
|
282
|
+
│ └── scripts/setup.sh
|
|
283
|
+
├── tests/
|
|
284
|
+
├── pyproject.toml
|
|
285
|
+
└── README.md
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## 🔗 Related
|
|
289
|
+
|
|
290
|
+
- [**cf-mail-worker**](https://github.com/Daivageralda/cf-mail-worker) — Self-hosted temp mail API (Cloudflare Workers + D1)
|
|
291
|
+
- [**bulk-temp-mail**](https://github.com/Daivageralda/temp-mail-generator) — Full temp mail service with React frontend
|
|
292
|
+
|
|
293
|
+
## 📄 License
|
|
294
|
+
|
|
295
|
+
MIT — see [LICENSE](LICENSE)
|
|
296
|
+
|
|
297
|
+
## ⚠️ Disclaimer
|
|
298
|
+
|
|
299
|
+
This tool is for educational and research purposes only. Use responsibly and in accordance with applicable terms of service.
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
# 🤖 Qoder Autopilot
|
|
2
|
+
|
|
3
|
+
Automated [Qoder](https://qoder.com) account registration with anti-detect browser, multi-strategy captcha solving, and [9Router](https://github.com/nicepkg/9router) OAuth device token integration.
|
|
4
|
+
|
|
5
|
+
> Register Qoder accounts → solve captchas → verify OTP → auto-connect to 9Router. All in one command.
|
|
6
|
+
|
|
7
|
+
[](https://www.python.org/downloads/)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
[](https://camoufox.com/)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## ✨ Features
|
|
14
|
+
|
|
15
|
+
- **🦊 Anti-detect Browser** — Uses [Camoufox](https://camoufox.com/) (stealth Firefox fork) with C++-level fingerprinting to bypass bot detection
|
|
16
|
+
- **🧩 Multi-strategy Captcha Solving**
|
|
17
|
+
- AI Vision (Gemini/GPT via OpenAI-compatible API)
|
|
18
|
+
- Manual mode (pause and solve it yourself)
|
|
19
|
+
- **📧 Multi-Provider Temp Mail** — Cloudflare Workers (default) or Moca Supabase
|
|
20
|
+
- **🔐 OAuth Device Flow** — PKCE-based device token flow (reverse-engineered from 9Router)
|
|
21
|
+
- **🔌 9Router Auto-Connect** — Inserts device tokens directly into 9Router's SQLite database
|
|
22
|
+
- **🚀 First-Run Wizard** — Interactive setup on first launch
|
|
23
|
+
- **🏠 Built-in Worker Deploy** — Deploy your own temp mail worker from CLI
|
|
24
|
+
- **⚡ Parallel Mode** — Register multiple accounts concurrently
|
|
25
|
+
- **⚙️ Persistent Config** — `qoder-autopilot config` for easy customization
|
|
26
|
+
|
|
27
|
+
## 📦 Installation
|
|
28
|
+
|
|
29
|
+
### From source (recommended)
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
git clone https://github.com/Daivageralda/qoder-autopilot.git
|
|
33
|
+
cd qoder-autopilot
|
|
34
|
+
|
|
35
|
+
# Basic install (manual captcha only)
|
|
36
|
+
pip install -e .
|
|
37
|
+
|
|
38
|
+
# With AI captcha solver
|
|
39
|
+
pip install -e ".[captcha]"
|
|
40
|
+
|
|
41
|
+
# Full install + dev tools
|
|
42
|
+
pip install -e ".[dev]"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Via pip
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install qoder-autopilot
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Post-install
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Download Camoufox browser binary
|
|
55
|
+
python -m camoufox fetch
|
|
56
|
+
|
|
57
|
+
# Download Playwright browsers (if needed)
|
|
58
|
+
playwright install firefox
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## 🚀 Quick Start
|
|
62
|
+
|
|
63
|
+
First time? Just run:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
qoder-autopilot
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
You'll see the setup wizard:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
╔══════════════════════════════════════════════════╗
|
|
73
|
+
║ 👋 Welcome to qoder-autopilot! ║
|
|
74
|
+
║ Let's get you set up in 30 seconds. ║
|
|
75
|
+
╚══════════════════════════════════════════════════╝
|
|
76
|
+
|
|
77
|
+
[1] 🚀 Quick Start — use the default public worker
|
|
78
|
+
[2] 🏠 Self-Host — deploy your own Cloudflare Worker
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Pick **1** for instant setup, or **2** to deploy your own temp mail service.
|
|
82
|
+
|
|
83
|
+
### Registration commands
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Single account, manual captcha (most reliable)
|
|
87
|
+
qoder-autopilot --manual-captcha
|
|
88
|
+
|
|
89
|
+
# 5 accounts sequentially
|
|
90
|
+
qoder-autopilot -n 5 --manual-captcha
|
|
91
|
+
|
|
92
|
+
# 5 accounts in parallel
|
|
93
|
+
qoder-autopilot -n 5 --manual-captcha --parallel
|
|
94
|
+
|
|
95
|
+
# Skip OAuth/9Router, just register
|
|
96
|
+
qoder-autopilot --manual-captcha --no-oauth
|
|
97
|
+
|
|
98
|
+
# Show browser windows
|
|
99
|
+
qoder-autopilot --manual-captcha --no-headless
|
|
100
|
+
|
|
101
|
+
# Custom delay between accounts (seconds)
|
|
102
|
+
qoder-autopilot -n 3 --manual-captcha --delay 60
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## 📋 All Commands
|
|
106
|
+
|
|
107
|
+
| Command | Description |
|
|
108
|
+
|---|---|
|
|
109
|
+
| `qoder-autopilot` | First-run wizard (no config) or start registration |
|
|
110
|
+
| `qoder-autopilot [options]` | Register accounts (see flags below) |
|
|
111
|
+
| `qoder-autopilot deploy` | Deploy your own temp mail worker |
|
|
112
|
+
| `qoder-autopilot config` | Show config help + available keys |
|
|
113
|
+
| `qoder-autopilot config show` | Show all current settings with source |
|
|
114
|
+
| `qoder-autopilot config get <key>` | Get a specific config value |
|
|
115
|
+
| `qoder-autopilot config set <key> <value>` | Set a config value |
|
|
116
|
+
| `qoder-autopilot config reset` | Reset all settings to defaults |
|
|
117
|
+
|
|
118
|
+
### Registration flags
|
|
119
|
+
|
|
120
|
+
| Flag | Description | Default |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| `-n`, `--count N` | Number of accounts to create | `1` |
|
|
123
|
+
| `--manual-captcha` | Pause for manual captcha solving (forces non-headless) | `false` |
|
|
124
|
+
| `--no-headless` | Show browser windows | `false` |
|
|
125
|
+
| `--no-oauth` | Skip 9Router OAuth, just register | `false` |
|
|
126
|
+
| `--parallel` | Run all accounts concurrently | `false` |
|
|
127
|
+
| `--delay N` | Delay between sequential accounts (seconds) | `30` |
|
|
128
|
+
|
|
129
|
+
## ⚙️ Configuration
|
|
130
|
+
|
|
131
|
+
Three-tier priority: **Environment variables** → **User config** (`~/.qoder-autopilot/config.json`) → **Defaults**
|
|
132
|
+
|
|
133
|
+
### Via CLI (recommended)
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# See all settings
|
|
137
|
+
qoder-autopilot config show
|
|
138
|
+
|
|
139
|
+
# Set values
|
|
140
|
+
qoder-autopilot config set worker-url https://my-worker.workers.dev
|
|
141
|
+
qoder-autopilot config set ai-api-key sk-abc123...
|
|
142
|
+
qoder-autopilot config set otp-timeout 30
|
|
143
|
+
qoder-autopilot config set mail-provider moca
|
|
144
|
+
|
|
145
|
+
# Get a value
|
|
146
|
+
qoder-autopilot config get worker-url
|
|
147
|
+
|
|
148
|
+
# Reset everything
|
|
149
|
+
qoder-autopilot config reset
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Configurable keys
|
|
153
|
+
|
|
154
|
+
| Key | Description | Default |
|
|
155
|
+
|---|---|---|
|
|
156
|
+
| `mail-provider` | Temp mail provider: `cloudflare` or `moca` | `cloudflare` |
|
|
157
|
+
| `worker-url` | Cloudflare Worker URL | Built-in default |
|
|
158
|
+
| `moca-api-key` | Moca Supabase API key (`tmk_xxx`) | *(empty)* |
|
|
159
|
+
| `moca-base-url` | Moca Supabase base URL | *(built-in)* |
|
|
160
|
+
| `ai-api-key` | API key for AI captcha solver | *(empty)* |
|
|
161
|
+
| `ai-base-url` | OpenAI-compatible API base URL | `https://ai.sumopod.com/v1` |
|
|
162
|
+
| `ai-model` | AI model name | `gemini/gemini-2.5-flash` |
|
|
163
|
+
| `otp-timeout` | Max seconds to wait for OTP | `20` |
|
|
164
|
+
| `captcha-timeout` | Max seconds for manual captcha | `120` |
|
|
165
|
+
| `parallel-delay` | Delay between parallel accounts (sec) | `30` |
|
|
166
|
+
| `ninerouter-db` | Path to 9Router SQLite DB | `~/.9router/db/data.sqlite` |
|
|
167
|
+
|
|
168
|
+
### Via environment variables
|
|
169
|
+
|
|
170
|
+
All keys can be set with `QODER_` prefix:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
export QODER_WORKER_URL=https://my-worker.workers.dev
|
|
174
|
+
export QODER_AI_API_KEY=sk-abc123...
|
|
175
|
+
export QODER_OTP_TIMEOUT=30
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Via `.env` file
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
cp .env.example .env
|
|
182
|
+
# Edit .env with your settings
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## 🏠 Self-Host Temp Mail Worker
|
|
186
|
+
|
|
187
|
+
Want your own independent temp mail service? Deploy in 5 minutes:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# From qoder-autopilot (bundled worker template)
|
|
191
|
+
qoder-autopilot deploy
|
|
192
|
+
|
|
193
|
+
# Or clone the standalone repo
|
|
194
|
+
git clone https://github.com/Daivageralda/cf-mail-worker.git
|
|
195
|
+
cd cf-mail-worker
|
|
196
|
+
npm install
|
|
197
|
+
npm run setup
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
See [cf-mail-worker](https://github.com/Daivageralda/cf-mail-worker) for full documentation.
|
|
201
|
+
|
|
202
|
+
## 🏗️ Architecture
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
qoder-autopilot/
|
|
206
|
+
├── src/qoder_autopilot/
|
|
207
|
+
│ ├── cli.py # CLI entry point
|
|
208
|
+
│ ├── config.py # Pydantic Settings (env + user config + defaults)
|
|
209
|
+
│ ├── user_config.py # Persistent config manager (~/.qoder-autopilot/)
|
|
210
|
+
│ ├── first_run.py # First-run setup wizard
|
|
211
|
+
│ ├── deploy.py # Worker deploy (extract + setup)
|
|
212
|
+
│ ├── register.py # Main registration flow
|
|
213
|
+
│ ├── temp_mail.py # Multi-provider temp email client
|
|
214
|
+
│ ├── oauth.py # PKCE device auth flow
|
|
215
|
+
│ ├── otp.py # Email OTP extraction
|
|
216
|
+
│ ├── identity.py # Random identity generation (faker id_ID)
|
|
217
|
+
│ ├── credentials.py # Account credential storage
|
|
218
|
+
│ ├── ninerouter.py # 9Router SQLite integration
|
|
219
|
+
│ ├── errors.py # Custom exceptions
|
|
220
|
+
│ ├── logger.py # ANSI colored structured logging
|
|
221
|
+
│ ├── browser/
|
|
222
|
+
│ │ ├── camoufox.py # Anti-detect browser launcher
|
|
223
|
+
│ │ └── window_tiler.py # macOS window grid positioning
|
|
224
|
+
│ ├── captcha/
|
|
225
|
+
│ │ ├── solver.py # Orchestrator (AI → manual)
|
|
226
|
+
│ │ ├── ai_vision.py # AI vision gap detection
|
|
227
|
+
│ │ └── manual.py # Manual solve pause/poll
|
|
228
|
+
│ └── worker_template/ # Bundled Cloudflare Worker (for deploy)
|
|
229
|
+
│ ├── src/ # Worker JS source
|
|
230
|
+
│ ├── schema.sql # D1 database schema
|
|
231
|
+
│ ├── package.json
|
|
232
|
+
│ └── scripts/setup.sh
|
|
233
|
+
├── tests/
|
|
234
|
+
├── pyproject.toml
|
|
235
|
+
└── README.md
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## 🔗 Related
|
|
239
|
+
|
|
240
|
+
- [**cf-mail-worker**](https://github.com/Daivageralda/cf-mail-worker) — Self-hosted temp mail API (Cloudflare Workers + D1)
|
|
241
|
+
- [**bulk-temp-mail**](https://github.com/Daivageralda/temp-mail-generator) — Full temp mail service with React frontend
|
|
242
|
+
|
|
243
|
+
## 📄 License
|
|
244
|
+
|
|
245
|
+
MIT — see [LICENSE](LICENSE)
|
|
246
|
+
|
|
247
|
+
## ⚠️ Disclaimer
|
|
248
|
+
|
|
249
|
+
This tool is for educational and research purposes only. Use responsibly and in accordance with applicable terms of service.
|