tokenade 3.5.0__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.
- tokenade-3.5.0/PKG-INFO +567 -0
- tokenade-3.5.0/README.md +520 -0
- tokenade-3.5.0/pyproject.toml +87 -0
- tokenade-3.5.0/setup.cfg +4 -0
- tokenade-3.5.0/tokenade/__init__.py +84 -0
- tokenade-3.5.0/tokenade/cli/__init__.py +306 -0
- tokenade-3.5.0/tokenade/cli/__main__.py +5 -0
- tokenade-3.5.0/tokenade/cli/advanced.py +458 -0
- tokenade-3.5.0/tokenade/cli/completions.py +73 -0
- tokenade-3.5.0/tokenade/cli/config.py +47 -0
- tokenade-3.5.0/tokenade/cli/management.py +264 -0
- tokenade-3.5.0/tokenade/cli/output.py +31 -0
- tokenade-3.5.0/tokenade/cli/proxy.py +118 -0
- tokenade-3.5.0/tokenade/cli/security.py +156 -0
- tokenade-3.5.0/tokenade/cli/session.py +471 -0
- tokenade-3.5.0/tokenade/core/__init__.py +0 -0
- tokenade-3.5.0/tokenade/core/antidetection/__init__.py +4 -0
- tokenade-3.5.0/tokenade/core/antidetection/behavioral.py +140 -0
- tokenade-3.5.0/tokenade/core/antidetection/cdp_cleaner.py +60 -0
- tokenade-3.5.0/tokenade/core/api/__init__.py +3 -0
- tokenade-3.5.0/tokenade/core/api/server.py +251 -0
- tokenade-3.5.0/tokenade/core/batch/__init__.py +23 -0
- tokenade-3.5.0/tokenade/core/batch/operations.py +399 -0
- tokenade-3.5.0/tokenade/core/browser/__init__.py +0 -0
- tokenade-3.5.0/tokenade/core/browser/manager.py +311 -0
- tokenade-3.5.0/tokenade/core/crypto/__init__.py +19 -0
- tokenade-3.5.0/tokenade/core/crypto/cookie_crypto.py +506 -0
- tokenade-3.5.0/tokenade/core/crypto/encryptor.py +299 -0
- tokenade-3.5.0/tokenade/core/extractor/__init__.py +0 -0
- tokenade-3.5.0/tokenade/core/fingerprint/__init__.py +0 -0
- tokenade-3.5.0/tokenade/core/fingerprint/collectors/__init__.py +30 -0
- tokenade-3.5.0/tokenade/core/fingerprint/collectors/audio.py +124 -0
- tokenade-3.5.0/tokenade/core/fingerprint/collectors/base.py +69 -0
- tokenade-3.5.0/tokenade/core/fingerprint/collectors/battery.py +59 -0
- tokenade-3.5.0/tokenade/core/fingerprint/collectors/canvas.py +81 -0
- tokenade-3.5.0/tokenade/core/fingerprint/collectors/fonts.py +52 -0
- tokenade-3.5.0/tokenade/core/fingerprint/collectors/navigator.py +99 -0
- tokenade-3.5.0/tokenade/core/fingerprint/collectors/plugins.py +92 -0
- tokenade-3.5.0/tokenade/core/fingerprint/collectors/screen.py +81 -0
- tokenade-3.5.0/tokenade/core/fingerprint/collectors/webgl.py +104 -0
- tokenade-3.5.0/tokenade/core/fingerprint/collectors/webrtc.py +91 -0
- tokenade-3.5.0/tokenade/core/fingerprint/injector.py +94 -0
- tokenade-3.5.0/tokenade/core/fingerprint/manager.py +278 -0
- tokenade-3.5.0/tokenade/core/fingerprint/stealth.py +357 -0
- tokenade-3.5.0/tokenade/core/importer/__init__.py +23 -0
- tokenade-3.5.0/tokenade/core/importer/adb_extractor.py +261 -0
- tokenade-3.5.0/tokenade/core/importer/advanced_validator.py +666 -0
- tokenade-3.5.0/tokenade/core/importer/browser_discovery.py +314 -0
- tokenade-3.5.0/tokenade/core/importer/chromium_forks.py +175 -0
- tokenade-3.5.0/tokenade/core/importer/cookie_extractor.py +517 -0
- tokenade-3.5.0/tokenade/core/importer/db_utils.py +66 -0
- tokenade-3.5.0/tokenade/core/importer/format_exporter.py +213 -0
- tokenade-3.5.0/tokenade/core/importer/format_importer.py +278 -0
- tokenade-3.5.0/tokenade/core/importer/local_storage_extractor.py +272 -0
- tokenade-3.5.0/tokenade/core/importer/mobile_extractor.py +264 -0
- tokenade-3.5.0/tokenade/core/importer/safari_extractor.py +318 -0
- tokenade-3.5.0/tokenade/core/importer/session_comparator.py +124 -0
- tokenade-3.5.0/tokenade/core/importer/session_loader.py +470 -0
- tokenade-3.5.0/tokenade/core/importer/session_manager.py +295 -0
- tokenade-3.5.0/tokenade/core/importer/session_packager.py +354 -0
- tokenade-3.5.0/tokenade/core/importer/session_refresher.py +354 -0
- tokenade-3.5.0/tokenade/core/importer/session_rotation.py +150 -0
- tokenade-3.5.0/tokenade/core/importer/session_sharer.py +692 -0
- tokenade-3.5.0/tokenade/core/importer/session_vault.py +282 -0
- tokenade-3.5.0/tokenade/core/importer/tor_extractor.py +138 -0
- tokenade-3.5.0/tokenade/core/importer/validator.py +498 -0
- tokenade-3.5.0/tokenade/core/injector/__init__.py +15 -0
- tokenade-3.5.0/tokenade/core/injector/profile_manager.py +375 -0
- tokenade-3.5.0/tokenade/core/integration/__init__.py +8 -0
- tokenade-3.5.0/tokenade/core/integration/docker_manager.py +349 -0
- tokenade-3.5.0/tokenade/core/integration/kubernetes.py +395 -0
- tokenade-3.5.0/tokenade/core/integration/plugin_registry.py +250 -0
- tokenade-3.5.0/tokenade/core/integration/webhooks.py +219 -0
- tokenade-3.5.0/tokenade/core/proxy/__init__.py +11 -0
- tokenade-3.5.0/tokenade/core/proxy/cdp_proxy.py +1301 -0
- tokenade-3.5.0/tokenade/core/proxy/extension_bridge.py +132 -0
- tokenade-3.5.0/tokenade/core/proxy/forward_proxy.py +151 -0
- tokenade-3.5.0/tokenade/core/proxy/multi_site_proxy.py +257 -0
- tokenade-3.5.0/tokenade/core/proxy/server.py +1295 -0
- tokenade-3.5.0/tokenade/core/refresh/__init__.py +19 -0
- tokenade-3.5.0/tokenade/core/refresh/health_checker.py +356 -0
- tokenade-3.5.0/tokenade/core/refresh/health_scorer.py +292 -0
- tokenade-3.5.0/tokenade/core/runtime/__init__.py +30 -0
- tokenade-3.5.0/tokenade/core/runtime/engine.py +786 -0
- tokenade-3.5.0/tokenade/core/runtime/tls_matcher.py +251 -0
- tokenade-3.5.0/tokenade/core/security/__init__.py +27 -0
- tokenade-3.5.0/tokenade/core/security/audit.py +577 -0
- tokenade-3.5.0/tokenade/core/security/credentials.py +418 -0
- tokenade-3.5.0/tokenade/core/utils/__init__.py +0 -0
- tokenade-3.5.0/tokenade/core/utils/performance.py +444 -0
- tokenade-3.5.0/tokenade/handlers/__init__.py +0 -0
- tokenade-3.5.0/tokenade/handlers/base.py +294 -0
- tokenade-3.5.0/tokenade/handlers/generic_oauth.py +594 -0
- tokenade-3.5.0/tokenade/handlers/github.py +349 -0
- tokenade-3.5.0/tokenade/handlers/google.py +302 -0
- tokenade-3.5.0/tokenade/sdk/__init__.py +257 -0
- tokenade-3.5.0/tokenade/tests/__init__.py +0 -0
- tokenade-3.5.0/tokenade/tests/portability.py +309 -0
- tokenade-3.5.0/tokenade/tests/test_advanced_validator.py +237 -0
- tokenade-3.5.0/tokenade/tests/test_antidetection.py +147 -0
- tokenade-3.5.0/tokenade/tests/test_api_sdk.py +264 -0
- tokenade-3.5.0/tokenade/tests/test_benchmarks.py +157 -0
- tokenade-3.5.0/tokenade/tests/test_browser.py +351 -0
- tokenade-3.5.0/tokenade/tests/test_browser_discovery.py +59 -0
- tokenade-3.5.0/tokenade/tests/test_browser_improvements.py +276 -0
- tokenade-3.5.0/tokenade/tests/test_browser_support.py +732 -0
- tokenade-3.5.0/tokenade/tests/test_cli.py +204 -0
- tokenade-3.5.0/tokenade/tests/test_cli_helpers.py +102 -0
- tokenade-3.5.0/tokenade/tests/test_cli_refactor.py +458 -0
- tokenade-3.5.0/tokenade/tests/test_collectors.py +286 -0
- tokenade-3.5.0/tokenade/tests/test_comprehensive.py +314 -0
- tokenade-3.5.0/tokenade/tests/test_cookie_extractor.py +156 -0
- tokenade-3.5.0/tokenade/tests/test_crypto.py +189 -0
- tokenade-3.5.0/tokenade/tests/test_db_utils.py +93 -0
- tokenade-3.5.0/tokenade/tests/test_encryptor.py +126 -0
- tokenade-3.5.0/tokenade/tests/test_encryptor_edge.py +66 -0
- tokenade-3.5.0/tokenade/tests/test_enterprise.py +819 -0
- tokenade-3.5.0/tokenade/tests/test_fingerprint.py +67 -0
- tokenade-3.5.0/tokenade/tests/test_format_export.py +415 -0
- tokenade-3.5.0/tokenade/tests/test_forward_proxy.py +52 -0
- tokenade-3.5.0/tokenade/tests/test_handlers.py +523 -0
- tokenade-3.5.0/tokenade/tests/test_health_scorer.py +538 -0
- tokenade-3.5.0/tokenade/tests/test_importer_integration.py +273 -0
- tokenade-3.5.0/tokenade/tests/test_integration.py +660 -0
- tokenade-3.5.0/tokenade/tests/test_local_storage.py +57 -0
- tokenade-3.5.0/tokenade/tests/test_local_storage_extractor.py +175 -0
- tokenade-3.5.0/tokenade/tests/test_mac_crypto.py +74 -0
- tokenade-3.5.0/tokenade/tests/test_multi_site_proxy.py +51 -0
- tokenade-3.5.0/tokenade/tests/test_performance.py +302 -0
- tokenade-3.5.0/tokenade/tests/test_property_based.py +215 -0
- tokenade-3.5.0/tokenade/tests/test_proxy.py +645 -0
- tokenade-3.5.0/tokenade/tests/test_proxy_config.py +86 -0
- tokenade-3.5.0/tokenade/tests/test_proxy_gui.py +81 -0
- tokenade-3.5.0/tokenade/tests/test_runtime.py +473 -0
- tokenade-3.5.0/tokenade/tests/test_security.py +349 -0
- tokenade-3.5.0/tokenade/tests/test_session_comparator.py +110 -0
- tokenade-3.5.0/tokenade/tests/test_session_loader.py +53 -0
- tokenade-3.5.0/tokenade/tests/test_session_manager.py +135 -0
- tokenade-3.5.0/tokenade/tests/test_session_packager.py +104 -0
- tokenade-3.5.0/tokenade/tests/test_session_refresher.py +558 -0
- tokenade-3.5.0/tokenade/tests/test_session_rotation.py +408 -0
- tokenade-3.5.0/tokenade/tests/test_session_sharer.py +588 -0
- tokenade-3.5.0/tokenade/tests/test_session_vault.py +418 -0
- tokenade-3.5.0/tokenade/tests/test_site_filter.py +66 -0
- tokenade-3.5.0/tokenade/tests/test_ssrf.py +55 -0
- tokenade-3.5.0/tokenade/tests/test_stealth.py +148 -0
- tokenade-3.5.0/tokenade/tests/test_tls.py +40 -0
- tokenade-3.5.0/tokenade/tests/test_tls_matcher.py +131 -0
- tokenade-3.5.0/tokenade/utils/__init__.py +0 -0
- tokenade-3.5.0/tokenade.egg-info/PKG-INFO +567 -0
- tokenade-3.5.0/tokenade.egg-info/SOURCES.txt +153 -0
- tokenade-3.5.0/tokenade.egg-info/dependency_links.txt +1 -0
- tokenade-3.5.0/tokenade.egg-info/entry_points.txt +2 -0
- tokenade-3.5.0/tokenade.egg-info/requires.txt +28 -0
- tokenade-3.5.0/tokenade.egg-info/top_level.txt +1 -0
tokenade-3.5.0/PKG-INFO
ADDED
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tokenade
|
|
3
|
+
Version: 3.5.0
|
|
4
|
+
Summary: Production-grade token shifting and session portability tool
|
|
5
|
+
Author: Tokenade Team
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/mihir0209/tokenade
|
|
8
|
+
Project-URL: Documentation, https://github.com/mihir0209/tokenade#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/mihir0209/tokenade
|
|
10
|
+
Project-URL: Issues, https://github.com/mihir0209/tokenade/issues
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
|
|
22
|
+
Classifier: Topic :: Security
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
Requires-Dist: playwright>=1.40.0
|
|
26
|
+
Requires-Dist: requests>=2.28.0
|
|
27
|
+
Requires-Dist: pycryptodome>=3.19.0
|
|
28
|
+
Requires-Dist: keyring>=24.0.0
|
|
29
|
+
Requires-Dist: aiohttp>=3.9.0
|
|
30
|
+
Provides-Extra: windows
|
|
31
|
+
Requires-Dist: pywin32>=306; extra == "windows"
|
|
32
|
+
Provides-Extra: linux
|
|
33
|
+
Requires-Dist: secretstorage>=3.3.3; extra == "linux"
|
|
34
|
+
Provides-Extra: runtime
|
|
35
|
+
Requires-Dist: curl-cffi>=0.6.0; extra == "runtime"
|
|
36
|
+
Provides-Extra: ldap
|
|
37
|
+
Requires-Dist: ldap3>=2.9; extra == "ldap"
|
|
38
|
+
Provides-Extra: enterprise
|
|
39
|
+
Requires-Dist: ldap3>=2.9; extra == "enterprise"
|
|
40
|
+
Provides-Extra: dev
|
|
41
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
42
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
43
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
44
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
45
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
46
|
+
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
47
|
+
|
|
48
|
+
# Tokenade v3.0 — Browser Session Portability Tool
|
|
49
|
+
|
|
50
|
+
Extract browser sessions from one device, package them into portable `.tokenade` files, and browse as the donor on another device using a **CDP reverse proxy** with TLS fingerprint matching.
|
|
51
|
+
|
|
52
|
+
## Features
|
|
53
|
+
|
|
54
|
+
### Core
|
|
55
|
+
|
|
56
|
+
| Feature | Description |
|
|
57
|
+
|---------|-------------|
|
|
58
|
+
| **Session Export** | Extract cookies from Chrome, Firefox, Brave, Edge, Safari, Tor Browser |
|
|
59
|
+
| **Session Injection** | Inject sessions via CDP proxy or direct profile modification |
|
|
60
|
+
| **TLS Fingerprint Matching** | Bypass Cloudflare, DataDome with curl-cffi |
|
|
61
|
+
| **localStorage Support** | Extract/inject localStorage (Telegram, WhatsApp) |
|
|
62
|
+
| **Encryption** | AES-256-GCM encryption for session files |
|
|
63
|
+
| **Multi-Browser** | Cross-browser support (extract from Firefox, inject into Chrome) |
|
|
64
|
+
|
|
65
|
+
### Advanced
|
|
66
|
+
|
|
67
|
+
| Feature | Description |
|
|
68
|
+
|---------|-------------|
|
|
69
|
+
| **Session Auto-Refresh** | WebSocket notifications, multi-browser fallback, hot-reload |
|
|
70
|
+
| **Session Sharing** | Email, webhook (Slack/Discord), QR codes, HMAC-SHA256 signatures |
|
|
71
|
+
| **Multi-Session Management** | List, merge, rotate, stats across multiple sessions |
|
|
72
|
+
| **Advanced Validation** | Custom JS rules, screenshot comparison, API validation |
|
|
73
|
+
| **Browser Extension** | Chrome/Firefox extension for one-click export |
|
|
74
|
+
| **HTTP Forward Proxy** | `HTTP_PROXY` mode with TLS matching |
|
|
75
|
+
| **Multi-Site Bundler** | Serve multiple sessions with tabbed GUI |
|
|
76
|
+
|
|
77
|
+
### Enterprise
|
|
78
|
+
|
|
79
|
+
| Feature | Description |
|
|
80
|
+
|---------|-------------|
|
|
81
|
+
| **Audit Logging** | Structured JSONL logs for all session operations |
|
|
82
|
+
| **Role-Based Access Control** | Admin/editor/viewer roles with persistent storage |
|
|
83
|
+
| **LDAP/SSO Integration** | LDAP bind authentication with group membership checks |
|
|
84
|
+
|
|
85
|
+
### Performance
|
|
86
|
+
|
|
87
|
+
| Feature | Description |
|
|
88
|
+
|---------|-------------|
|
|
89
|
+
| **Connection Pooling** | Shared HTTP connections across multi-site proxy |
|
|
90
|
+
| **LRU Session Caching** | In-memory cache with configurable TTL |
|
|
91
|
+
| **Parallel Extraction** | Concurrent cookie extraction from multiple profiles |
|
|
92
|
+
|
|
93
|
+
### Browser Support
|
|
94
|
+
|
|
95
|
+
| Browser | Status | Notes |
|
|
96
|
+
|---------|--------|-------|
|
|
97
|
+
| Chrome | Full | SQLite extraction, profile discovery |
|
|
98
|
+
| Firefox | Full | SQLite extraction, profile discovery |
|
|
99
|
+
| Edge | Full | Chromium-based, same as Chrome |
|
|
100
|
+
| Brave | Full | Chromium-based, same as Chrome |
|
|
101
|
+
| Safari | Partial | Binary cookie parsing, macOS only |
|
|
102
|
+
| Tor Browser | Full | Firefox-based, cross-platform profile discovery |
|
|
103
|
+
| Mobile (Android) | Full | Via ADB — Chrome and Firefox on Android |
|
|
104
|
+
|
|
105
|
+
### Integration
|
|
106
|
+
|
|
107
|
+
| Feature | Description |
|
|
108
|
+
|---------|-------------|
|
|
109
|
+
| **GitHub Actions** | CI/CD with lint, test matrix (3.9–3.12), security scan, build |
|
|
110
|
+
| **Docker** | Multi-stage build, session management, batch containers |
|
|
111
|
+
| **Kubernetes** | Deployment, Service, ConfigMap, sidecar YAML generation |
|
|
112
|
+
|
|
113
|
+
## How It Works
|
|
114
|
+
|
|
115
|
+
### 1. Session Export
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
Your Browser (Firefox/Chrome/Safari/Tor)
|
|
119
|
+
│
|
|
120
|
+
▼
|
|
121
|
+
┌─────────────────┐
|
|
122
|
+
│ tokenade export │
|
|
123
|
+
└─────────────────┘
|
|
124
|
+
│
|
|
125
|
+
▼
|
|
126
|
+
┌─────────────────┐
|
|
127
|
+
│ Read SQLite DB │──── Browser stores cookies in SQLite
|
|
128
|
+
└─────────────────┘
|
|
129
|
+
│
|
|
130
|
+
▼
|
|
131
|
+
┌─────────────────┐
|
|
132
|
+
│ Decrypt Cookies │──── Platform-specific decryption
|
|
133
|
+
└─────────────────┘
|
|
134
|
+
│
|
|
135
|
+
▼
|
|
136
|
+
┌─────────────────┐
|
|
137
|
+
│ Package .tokenade│──── JSON with cookies, fingerprint, TLS profile
|
|
138
|
+
└─────────────────┘
|
|
139
|
+
│
|
|
140
|
+
▼
|
|
141
|
+
session.tokenade
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### 2. Session Injection (CDP Proxy)
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
.tokenade file
|
|
148
|
+
│
|
|
149
|
+
▼
|
|
150
|
+
┌─────────────────┐
|
|
151
|
+
│ tokenade proxy │
|
|
152
|
+
└─────────────────┘
|
|
153
|
+
│
|
|
154
|
+
▼
|
|
155
|
+
┌─────────────────┐
|
|
156
|
+
│ Launch Chromium │──── Playwright browser
|
|
157
|
+
└─────────────────┘
|
|
158
|
+
│
|
|
159
|
+
▼
|
|
160
|
+
┌─────────────────┐
|
|
161
|
+
│ Inject Cookies │──── Add to browser context
|
|
162
|
+
└─────────────────┘
|
|
163
|
+
│
|
|
164
|
+
▼
|
|
165
|
+
┌─────────────────┐
|
|
166
|
+
│ page.route() │──── Intercept ALL browser requests
|
|
167
|
+
└─────────────────┘
|
|
168
|
+
│
|
|
169
|
+
▼
|
|
170
|
+
┌─────────────────┐
|
|
171
|
+
│ curl-cffi │──── Forward with donor TLS fingerprint
|
|
172
|
+
│ (TLS matched) │
|
|
173
|
+
└─────────────────┘
|
|
174
|
+
│
|
|
175
|
+
▼
|
|
176
|
+
http://127.0.0.1:9222
|
|
177
|
+
You are logged in as donor
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### 3. TLS Fingerprint Matching (Why It Works)
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
Without Tokenade:
|
|
184
|
+
Your Browser → Your TLS fingerprint → Blocked by Cloudflare
|
|
185
|
+
|
|
186
|
+
With Tokenade:
|
|
187
|
+
Your Browser → Tokenade Proxy → Donor's TLS fingerprint → Allowed
|
|
188
|
+
|
|
189
|
+
curl-cffi impersonates Chrome's TLS handshake (JA3 hash),
|
|
190
|
+
so servers see the donor's fingerprint, not yours.
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Why Tokenade?
|
|
194
|
+
|
|
195
|
+
| Feature | Tokenade | Browser Extensions | Simple CLI Tools |
|
|
196
|
+
|---------|----------|-------------------|------------------|
|
|
197
|
+
| **CLI Interface** | ✅ Scriptable, automatable | ❌ GUI-only | ✅ |
|
|
198
|
+
| **TLS Fingerprint Matching** | ✅ Bypasses Cloudflare/DataDome | ❌ | ❌ |
|
|
199
|
+
| **Site-Agnostic** | ✅ Works with any website | ❌ Often site-specific | ⚠️ Limited |
|
|
200
|
+
| **Multi-Browser** | ✅ Chrome/Firefox/Edge/Safari/Tor | ⚠️ Single browser | ❌ |
|
|
201
|
+
| **localStorage Support** | ✅ Critical for Telegram, WhatsApp | ❌ | ❌ |
|
|
202
|
+
| **Encrypted Session Files** | ✅ AES-256-GCM | ❌ | ⚠️ Varies |
|
|
203
|
+
| **Enterprise Features** | ✅ Audit, RBAC, LDAP | ❌ | ❌ |
|
|
204
|
+
| **Docker/K8s Ready** | ✅ Built-in integration | N/A | ❌ |
|
|
205
|
+
| **Self-Hosted** | ✅ No third-party | N/A | ✅ |
|
|
206
|
+
|
|
207
|
+
**Unique advantage**: Tokenade is the only CLI tool that matches TLS fingerprints for cross-browser session portability.
|
|
208
|
+
|
|
209
|
+
## Quick Start (3 commands)
|
|
210
|
+
|
|
211
|
+
### Step 1 — Export cookies from your browser
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# See what browsers are installed
|
|
215
|
+
tokenade export --list-profiles
|
|
216
|
+
|
|
217
|
+
# Export ChatGPT session from Firefox
|
|
218
|
+
tokenade export --browser-name firefox --domains "chatgpt.com,openai.com" -o chatgpt.tokenade
|
|
219
|
+
|
|
220
|
+
# Export Gmail session from Chrome
|
|
221
|
+
tokenade export --browser-name chrome --domains "google.com,accounts.google.com" -o gmail.tokenade
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Step 2 — Start the proxy
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
# Start CDP proxy (default — recommended)
|
|
228
|
+
tokenade proxy -s chatgpt.tokenade
|
|
229
|
+
|
|
230
|
+
# Custom port, visible browser
|
|
231
|
+
tokenade proxy -s gmail.tokenade --port 8080 --visible
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Step 3 — Browse
|
|
235
|
+
|
|
236
|
+
Open `http://127.0.0.1:9222`, enter the target URL, and click Browse.
|
|
237
|
+
|
|
238
|
+
## Full CLI Reference
|
|
239
|
+
|
|
240
|
+
### Export
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
tokenade export [options]
|
|
244
|
+
|
|
245
|
+
Options:
|
|
246
|
+
--browser-name {chrome,firefox,edge,brave}
|
|
247
|
+
--browser-path PATH Custom browser profile path
|
|
248
|
+
--profile NAME Profile name (e.g. "Default", "Profile 1")
|
|
249
|
+
--domains DOMAINS Comma-separated domains to filter
|
|
250
|
+
--site-config FILE JSON site config for domain filtering
|
|
251
|
+
-o, --output FILE Output file path
|
|
252
|
+
--list-profiles List discovered browser profiles
|
|
253
|
+
--extract-local-storage Also extract localStorage
|
|
254
|
+
--local-storage-origin ORIGIN
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Proxy
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
tokenade proxy -s SESSION_FILE [options]
|
|
261
|
+
|
|
262
|
+
Options:
|
|
263
|
+
-s, --session FILE .tokenade session file (required)
|
|
264
|
+
-p, --port PORT Port (default: 9222)
|
|
265
|
+
--host HOST Bind address (default: 127.0.0.1)
|
|
266
|
+
--visible Show Chromium window
|
|
267
|
+
--no-open-browser Don't auto-open GUI
|
|
268
|
+
--timeout SECONDS Request timeout (default: 30)
|
|
269
|
+
--all Multi-site mode (use -d for sessions directory)
|
|
270
|
+
--mode {cdp,forward} Proxy mode
|
|
271
|
+
--legacy Use legacy service-worker proxy
|
|
272
|
+
--auto-refresh Enable auto-refresh from source browser
|
|
273
|
+
--source-browser NAME Browser to refresh from
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Multi-Session
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
tokenade sessions list -d ./sessions # List sessions
|
|
280
|
+
tokenade sessions list --site google # Filter by site
|
|
281
|
+
tokenade sessions merge s1.tokenade s2.tokenade -o merged.tokenade
|
|
282
|
+
tokenade sessions rotate s1.tokenade s2.tokenade
|
|
283
|
+
tokenade sessions stats *.tokenade
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Session Sharing
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
tokenade share -s session.tokenade # Create URL
|
|
290
|
+
tokenade share -s session.tokenade --format qr -o qr.png
|
|
291
|
+
tokenade share -s session.tokenade --password x --expiry 48
|
|
292
|
+
tokenade share -s session.tokenade --webhook https://hooks.slack.com/...
|
|
293
|
+
tokenade unshare --list
|
|
294
|
+
tokenade unshare <session-id>
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Encrypt / Decrypt
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
tokenade encrypt -s session.tokenade -o encrypted.tokenade
|
|
301
|
+
tokenade decrypt -s encrypted.tokenade -o session.tokenade
|
|
302
|
+
tokenade rekey -s encrypted.tokenade
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### Health & Validation
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
tokenade health -s session.tokenade
|
|
309
|
+
tokenade validate-rules -s session.tokenade -r rules.json
|
|
310
|
+
tokenade diff file1.tokenade file2.tokenade
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Inject Profile
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
tokenade inject-profile -s session.tokenade --browser firefox --profile "default"
|
|
317
|
+
tokenade inject-profile -s session.tokenade --browser firefox --profile "default" --dry-run
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
## Docker
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
# Build
|
|
324
|
+
docker build -t tokenade .
|
|
325
|
+
|
|
326
|
+
# Run proxy in container
|
|
327
|
+
docker run --rm -p 9222:9222 \
|
|
328
|
+
-v ./sessions:/app/sessions:ro \
|
|
329
|
+
--cap-add=SYS_ADMIN \
|
|
330
|
+
tokenade proxy --host 0.0.0.0 -s /app/sessions/session.tokenade
|
|
331
|
+
|
|
332
|
+
# Docker Compose
|
|
333
|
+
docker compose up tokenade
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Docker Session Management
|
|
337
|
+
|
|
338
|
+
```python
|
|
339
|
+
from tokenade.core.integration import DockerSessionManager
|
|
340
|
+
|
|
341
|
+
manager = DockerSessionManager()
|
|
342
|
+
manager.create_session_container("session.tokenade", "my-proxy", port=9222)
|
|
343
|
+
print(manager.get_status())
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
## Kubernetes
|
|
347
|
+
|
|
348
|
+
### Sidecar Mode
|
|
349
|
+
|
|
350
|
+
```python
|
|
351
|
+
from tokenade.core.integration import KubernetesManager, KubernetesConfig
|
|
352
|
+
|
|
353
|
+
k8s = KubernetesManager(KubernetesConfig(namespace="production"))
|
|
354
|
+
print(k8s.generate_sidecar_yaml("my-app:latest", "tokenade-sessions"))
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Generate Manifests
|
|
358
|
+
|
|
359
|
+
```python
|
|
360
|
+
# Full deployment
|
|
361
|
+
print(k8s.generate_deployment_yaml(session_configmap="tokenade-sessions"))
|
|
362
|
+
|
|
363
|
+
# Service
|
|
364
|
+
print(k8s.generate_service_yaml())
|
|
365
|
+
|
|
366
|
+
# ConfigMap from session files
|
|
367
|
+
print(k8s.generate_configmap_yaml({
|
|
368
|
+
"session.tokenade": open("session.tokenade").read()
|
|
369
|
+
}))
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
## Enterprise
|
|
373
|
+
|
|
374
|
+
### Audit Logging
|
|
375
|
+
|
|
376
|
+
```python
|
|
377
|
+
from tokenade.core.security.audit import AuditLogger
|
|
378
|
+
|
|
379
|
+
logger = AuditLogger()
|
|
380
|
+
logger.log_event("session_export", session_id="abc", site_name="google")
|
|
381
|
+
logger.log_event("session_share", session_id="abc", method="email")
|
|
382
|
+
print(logger.get_summary())
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### Role-Based Access Control
|
|
386
|
+
|
|
387
|
+
```python
|
|
388
|
+
from tokenade.core.security.audit import RoleManager
|
|
389
|
+
|
|
390
|
+
rbac = RoleManager()
|
|
391
|
+
rbac.assign_role("user@example.com", "editor")
|
|
392
|
+
rbac.check_permission("user@example.com", "view_share") # True
|
|
393
|
+
rbac.check_permission("user@example.com", "revoke_share") # False
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### LDAP Authentication
|
|
397
|
+
|
|
398
|
+
```python
|
|
399
|
+
from tokenade.core.security.audit import LDAPAuthenticator, LDAPConfig
|
|
400
|
+
|
|
401
|
+
config = LDAPConfig(
|
|
402
|
+
server="ldap.example.com",
|
|
403
|
+
port=636,
|
|
404
|
+
use_ssl=True,
|
|
405
|
+
bind_dn="cn=admin,dc=example,dc=com",
|
|
406
|
+
bind_password="...",
|
|
407
|
+
user_search_base="ou=users,dc=example,dc=com",
|
|
408
|
+
user_search_filter="(uid={username})",
|
|
409
|
+
)
|
|
410
|
+
auth = LDAPAuthenticator(config)
|
|
411
|
+
auth.authenticate("alice", "password123")
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
## Architecture
|
|
415
|
+
|
|
416
|
+
```
|
|
417
|
+
tokenade/
|
|
418
|
+
├── core/
|
|
419
|
+
│ ├── proxy/
|
|
420
|
+
│ │ ├── cdp_proxy.py # CDP proxy (recommended)
|
|
421
|
+
│ │ ├── server.py # Legacy SW proxy
|
|
422
|
+
│ │ ├── forward_proxy.py # HTTP forward proxy
|
|
423
|
+
│ │ └── multi_site_proxy.py # Multi-site bundler + connection pooling
|
|
424
|
+
│ ├── runtime/
|
|
425
|
+
│ │ ├── tls_matcher.py # curl-cffi TLS fingerprint matching
|
|
426
|
+
│ │ └── engine.py # CookieJar, FingerprintMatcher
|
|
427
|
+
│ ├── importer/
|
|
428
|
+
│ │ ├── browser_discovery.py # Find browser profiles
|
|
429
|
+
│ │ ├── cookie_extractor.py # Extract cookies from SQLite
|
|
430
|
+
│ │ ├── local_storage_extractor.py
|
|
431
|
+
│ │ ├── session_packager.py # Package into .tokenade (with LRU cache)
|
|
432
|
+
│ │ ├── session_loader.py # Load .tokenade into browser
|
|
433
|
+
│ │ ├── session_refresher.py # Auto-refresh with WebSocket notifications
|
|
434
|
+
│ │ ├── session_sharer.py # Email, webhook, HMAC signatures
|
|
435
|
+
│ │ ├── session_manager.py # Multi-session management
|
|
436
|
+
│ │ ├── session_comparator.py # Session diff tool
|
|
437
|
+
│ │ ├── advanced_validator.py # Custom validation rules
|
|
438
|
+
│ │ ├── safari_extractor.py # Safari binary cookie parser
|
|
439
|
+
│ │ ├── tor_extractor.py # Tor Browser extraction
|
|
440
|
+
│ │ ├── adb_extractor.py # Android ADB extraction
|
|
441
|
+
│ │ └── db_utils.py # Shared SQLite utilities
|
|
442
|
+
│ ├── security/
|
|
443
|
+
│ │ ├── credentials.py # Credential management
|
|
444
|
+
│ │ └── audit.py # Audit logging, RBAC, LDAP
|
|
445
|
+
│ ├── integration/
|
|
446
|
+
│ │ ├── docker_manager.py # Docker session management
|
|
447
|
+
│ │ └── kubernetes.py # K8s deployment + sidecar
|
|
448
|
+
│ ├── crypto/
|
|
449
|
+
│ │ ├── encryptor.py # AES-256-GCM encryption
|
|
450
|
+
│ │ └── cookie_crypto.py # Browser cookie decryption
|
|
451
|
+
│ ├── injector/
|
|
452
|
+
│ │ └── profile_manager.py # Direct profile injection
|
|
453
|
+
│ ├── batch/
|
|
454
|
+
│ │ └── operations.py # Batch export/load
|
|
455
|
+
│ └── utils/
|
|
456
|
+
│ └── performance.py # LRU cache, connection pooling, parallel extraction
|
|
457
|
+
├── cli.py # CLI entry point (21 commands)
|
|
458
|
+
├── handlers/ # Site-specific handlers
|
|
459
|
+
├── extension/ # Browser extension
|
|
460
|
+
└── tests/ # 1009 tests
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
## .tokenade File Format
|
|
464
|
+
|
|
465
|
+
```json
|
|
466
|
+
{
|
|
467
|
+
"version": "2.0",
|
|
468
|
+
"created_at": "2026-06-14T12:00:00Z",
|
|
469
|
+
"source_device": {
|
|
470
|
+
"browser": "firefox",
|
|
471
|
+
"profile": "default",
|
|
472
|
+
"platform": "Linux",
|
|
473
|
+
"hostname": "my-pc"
|
|
474
|
+
},
|
|
475
|
+
"site_name": "google",
|
|
476
|
+
"auth_status": "logged_in",
|
|
477
|
+
"cookies": [
|
|
478
|
+
{
|
|
479
|
+
"name": "SID",
|
|
480
|
+
"value": "abc123",
|
|
481
|
+
"domain": ".google.com",
|
|
482
|
+
"path": "/",
|
|
483
|
+
"secure": true,
|
|
484
|
+
"httpOnly": true,
|
|
485
|
+
"sameSite": "Lax",
|
|
486
|
+
"expires": 1781000000
|
|
487
|
+
}
|
|
488
|
+
],
|
|
489
|
+
"fingerprint": {
|
|
490
|
+
"user_agent": "Mozilla/5.0 ...",
|
|
491
|
+
"platform": "Linux",
|
|
492
|
+
"language": "en-US"
|
|
493
|
+
},
|
|
494
|
+
"tls_profile": {
|
|
495
|
+
"browser": "chrome",
|
|
496
|
+
"version": "120",
|
|
497
|
+
"impersonate": "chrome120",
|
|
498
|
+
"http_version": "2"
|
|
499
|
+
},
|
|
500
|
+
"metadata": {
|
|
501
|
+
"cookie_count": 50,
|
|
502
|
+
"critical_cookie_count": 30
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
## Installation
|
|
508
|
+
|
|
509
|
+
```bash
|
|
510
|
+
git clone https://github.com/mihir0209/tokenade.git
|
|
511
|
+
cd tokenade
|
|
512
|
+
pip install -e ".[dev]"
|
|
513
|
+
playwright install chromium --with-deps
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
### Optional Dependencies
|
|
517
|
+
|
|
518
|
+
```bash
|
|
519
|
+
pip install -e ".[runtime]" # curl-cffi for TLS matching
|
|
520
|
+
pip install -e ".[enterprise]" # ldap3 for LDAP/SSO
|
|
521
|
+
pip install -e ".[linux]" # secretstorage for Linux keyring
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
## Development
|
|
525
|
+
|
|
526
|
+
```bash
|
|
527
|
+
make install-dev # Install with dev deps + Playwright
|
|
528
|
+
make test # Run all 1009 tests
|
|
529
|
+
make test-quick # Skip slow/network tests
|
|
530
|
+
make lint # Flake8 linting
|
|
531
|
+
make format # Black formatting
|
|
532
|
+
make typecheck # Mypy type checking
|
|
533
|
+
make clean # Remove build artifacts
|
|
534
|
+
make build # Build distribution packages
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
### Docker Development
|
|
538
|
+
|
|
539
|
+
```bash
|
|
540
|
+
make docker-build # Build Docker image
|
|
541
|
+
make docker-run # Run interactively
|
|
542
|
+
make docker-proxy SESSION=session.tokenade # Run proxy
|
|
543
|
+
make docker-cleanup # Remove all containers
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
## Documentation
|
|
547
|
+
|
|
548
|
+
- [Use Cases & Competitor Comparison](USE-CASES.md) - All use cases, competitor analysis, feature matrix
|
|
549
|
+
- [API Reference](docs/API.md) - Complete API documentation
|
|
550
|
+
- [Architecture](docs/ARCHITECTURE.md) - System design and data flow
|
|
551
|
+
- [Security](docs/SECURITY.md) - Security considerations
|
|
552
|
+
- [Competitor Comparison](docs/competitor-comparison.md) - Market analysis
|
|
553
|
+
- [Contributing](docs/CONTRIBUTING.md) - How to contribute
|
|
554
|
+
|
|
555
|
+
## Security
|
|
556
|
+
|
|
557
|
+
- Session files contain raw cookies — treat like passwords
|
|
558
|
+
- Use `tokenade encrypt` to encrypt at rest
|
|
559
|
+
- The proxy runs on `127.0.0.1` only (not accessible from network)
|
|
560
|
+
- Cookies are injected into an isolated Playwright browser context
|
|
561
|
+
- SSRF protection blocks private/loopback/link-local IPs
|
|
562
|
+
- HMAC-SHA256 signatures on shared sessions
|
|
563
|
+
- Audit logging tracks all session operations
|
|
564
|
+
|
|
565
|
+
## License
|
|
566
|
+
|
|
567
|
+
MIT License
|