doescap 1.0.0__py3-none-any.whl

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.
@@ -0,0 +1,235 @@
1
+ Metadata-Version: 2.4
2
+ Name: doescap
3
+ Version: 1.0.0
4
+ Summary: DoesCap: Fast, lightweight cross-platform hCaptcha relay and solver library built by GhoSty, supporting Windows, macOS, Linux, and Android (Termux).
5
+ Author: GhoSty
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/ghostypie/DoesCap
8
+ Project-URL: Documentation, https://ghostypie.github.io/DoesCap/
9
+ Project-URL: Repository, https://github.com/ghostypie/DoesCap
10
+ Project-URL: Issues, https://github.com/ghostypie/DoesCap/issues
11
+ Project-URL: Author GitHub, https://github.com/ghostypie
12
+ Project-URL: Discord Support, https://discord.com/invite/asMJGgDA7u
13
+ Project-URL: Support / Donate, https://donatr.ee/brutality/
14
+ Keywords: doescap,hcaptcha,captcha,relay,termux,android,cdp,automation
15
+ Classifier: Development Status :: 5 - Production/Stable
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: 3.14
27
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
28
+ Classifier: Topic :: Internet :: WWW/HTTP
29
+ Requires-Python: >=3.8
30
+ Description-Content-Type: text/markdown
31
+ License-File: LICENSE
32
+ Provides-Extra: screencast
33
+ Requires-Dist: websocket-client>=1.6.0; extra == "screencast"
34
+ Dynamic: license-file
35
+
36
+ # DoesCap
37
+
38
+ A standalone, high-performance hCaptcha relay and verification library for Python.
39
+
40
+ Built for seamless operation across **Windows**, **macOS**, **Linux**, and **Android (Termux)**.
41
+
42
+ ---
43
+
44
+ ## Author & Community
45
+
46
+ - **Author**: **GhoSty** — [https://github.com/ghostypie](https://github.com/ghostypie)
47
+ - **Discord Support Server**: [https://discord.com/invite/asMJGgDA7u](https://discord.com/invite/asMJGgDA7u)
48
+ - **Support / Donate (Donatree)**: [https://donatr.ee/brutality/](https://donatr.ee/brutality/)
49
+
50
+ ---
51
+
52
+ ## Key Features
53
+
54
+ - **Zero-Latency Direct Solver (Default)**: Renders the official challenge natively in the user's browser with 60Hz/120Hz touch responsiveness. Zero extra CPU or RAM consumption.
55
+ - **Custom Webpage Designs**: Port your own custom HTML, CSS, logos, fonts, and layouts via `custom_html`, `custom_html_path`, and `custom_assets_dir` (including `{{ title }}`, `{{ theme }}`, `{{ sitekey }}`, and `{{ rqdata }}` SSR placeholders).
56
+ - **Universal Android & Termux Support**: Automatically handles Termux URL opening tools (`termux-open-url`, `termux-open`) and native Android activity intents (`am start`).
57
+ - **Modular 2D Documentation**: Multi-page 2D neo-brutalist documentation site with cross-page search, Next/Previous module navigation, and dark mode toggle in the `docs/` folder.
58
+ - **Headless Screencast Mode**: Optional fallback mode that runs a headless Chromium instance (`browser_path`) and mirrors frames over HTTP when `websocket-client` is installed, automatically falling back to Direct Mode if unavailable.
59
+ - **LAN Relay Accessibility**: Automatically determines local network IP address (`get_local_ip`), allowing mobile devices on the same Wi-Fi network to complete challenges running on desktop or remote hosts.
60
+ - **Full Type Hints & Async Support**: Both synchronous (`solve`, `solve_captcha`) and asynchronous (`async_solve`, `async_solve_captcha`) APIs returning string-subclass `SolveResult` objects.
61
+ - **Standalone CLI**: Command-line tool `doescap` for immediate terminal verification.
62
+
63
+ ---
64
+
65
+ ## Documentation
66
+
67
+ Full modular documentation is included in the `docs/` folder:
68
+ - **Offline / Local preview**: Open [docs/index.html](docs/index.html) in any browser, or run:
69
+ ```bash
70
+ python docs/serve.py
71
+ ```
72
+ - Features a ReadTheDocs-style sidebar, cross-page search (`Ctrl+K`), Next/Previous module navigation buttons, REST API specs, parameter tables, and a 2D neo-brutalist light/dark mode toggle.
73
+
74
+ ---
75
+
76
+ ## Installation
77
+
78
+ ```bash
79
+ pip install doescap
80
+ ```
81
+
82
+ To enable headless CDP screencast streaming (optional):
83
+
84
+ ```bash
85
+ pip install "doescap[screencast]"
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Quickstart
91
+
92
+ ### 1. Functional Sync API
93
+
94
+ ```python
95
+ from doescap import solve_captcha
96
+
97
+ token = solve_captcha(
98
+ sitekey="4c672d35-0701-42b2-88c3-78380b0db560",
99
+ rqdata=None,
100
+ port=8787,
101
+ auto_open_browser=True,
102
+ )
103
+
104
+ if token:
105
+ print(f"Verified Token: {token}")
106
+ else:
107
+ print("Verification failed or timed out.")
108
+ ```
109
+
110
+ ### 2. Functional Async API
111
+
112
+ ```python
113
+ import asyncio
114
+ from doescap import async_solve_captcha
115
+
116
+ async def main():
117
+ token = await async_solve_captcha(
118
+ sitekey="4c672d35-0701-42b2-88c3-78380b0db560",
119
+ port=8787,
120
+ )
121
+ print("Token:", token)
122
+
123
+ asyncio.run(main())
124
+ ```
125
+
126
+ ### 3. Object-Oriented Client
127
+
128
+ ```python
129
+ from doescap import DoesCap, RelayConfig
130
+
131
+ config = RelayConfig(
132
+ host="0.0.0.0",
133
+ port=8787,
134
+ auto_open_browser=True,
135
+ timeout=300,
136
+ title="DoesCap Verification Portal",
137
+ theme="dark",
138
+ )
139
+
140
+ with DoesCap(config=config) as relay:
141
+ result = relay.solve(
142
+ sitekey="4c672d35-0701-42b2-88c3-78380b0db560",
143
+ rqdata=None,
144
+ task_name="Verification Challenge",
145
+ )
146
+
147
+ if result:
148
+ print(f"Solved in {result.elapsed_seconds:.2f}s")
149
+ print(f"Token: {result.token}")
150
+ # Compatible directly as a str in headers: {"X-Captcha-Key": result}
151
+ relay.mark_claimed(task_name="Verification Challenge", promo_code="PASS-200")
152
+ ```
153
+
154
+ ### 4. Custom Webpage Design & Branding
155
+
156
+ You can supply your own custom HTML template and static assets:
157
+
158
+ ```python
159
+ from doescap import DoesCap, RelayConfig
160
+
161
+ config = RelayConfig(
162
+ host="0.0.0.0",
163
+ port=8787,
164
+ custom_html_path="path/to/my_template.html",
165
+ custom_assets_dir="path/to/my_assets",
166
+ )
167
+
168
+ with DoesCap(config=config) as relay:
169
+ token = relay.solve(sitekey="YOUR_SITEKEY")
170
+ ```
171
+
172
+ #### Custom HTML Contract
173
+ Your custom HTML can read SSR placeholders (`{{ title }}`, `{{ theme }}`, `{{ sitekey }}`, `{{ rqdata }}`) or communicate with two lightweight endpoints:
174
+ 1. `GET /status`: Returns JSON with active `sitekey`, `rqdata`, `mode`, `task_name`, `promo_code`, and state.
175
+ 2. `POST /solve`: Send `{ "token": token }` once hCaptcha's callback fires.
176
+
177
+ Static files inside `custom_assets_dir` are served securely under `/assets/*`.
178
+
179
+ ---
180
+
181
+ ## Configuration Reference
182
+
183
+ | Parameter | Type | Default | Description |
184
+ | :--- | :--- | :--- | :--- |
185
+ | `host` | `str` | `"0.0.0.0"` | Host IP to bind the relay webserver to. |
186
+ | `port` | `int` | `8787` | Preferred TCP port. Ephemeral port chosen if busy. |
187
+ | `auto_open_browser` | `bool` | `True` | Automatically opens default browser on the device. |
188
+ | `browser_path` | `str \| None` | `None` | Path or binary keyword for headless CDP screencast mode. |
189
+ | `timeout` | `int` | `300` | Max wait time in seconds before returning `None`. |
190
+ | `title` | `str` | `"DoesCap Relay"` | Title string displayed in the web UI header. |
191
+ | `theme` | `str` | `"dark"` | UI theme (`"dark"` or `"light"`). |
192
+ | `allow_firewall_rule` | `bool` | `True` | Attempts Windows Firewall port opening on Windows. |
193
+ | `custom_html` | `str \| None` | `None` | Raw HTML string to serve as the custom UI. |
194
+ | `custom_html_path` | `str \| None` | `None` | Filepath to a custom `.html` template to serve. |
195
+ | `custom_assets_dir` | `str \| None` | `None` | Directory of assets (CSS, images, fonts) served at `/assets/*`. |
196
+
197
+ ---
198
+
199
+ ## Termux Android Usage
200
+
201
+ `DoesCap` works directly in Termux on Android without requiring root or display servers (no X11 / VNC needed).
202
+
203
+ 1. Install Python in Termux:
204
+ ```bash
205
+ pkg update && pkg install python
206
+ ```
207
+ 2. Install package:
208
+ ```bash
209
+ pip install doescap
210
+ ```
211
+ 3. Run or import in your script. When executed, it launches your mobile Chrome or default Android browser via system intents, lets you complete the challenge smoothly with hardware-accelerated touch, and captures the solution token.
212
+
213
+ ---
214
+
215
+ ## CLI & Testing
216
+
217
+ ```bash
218
+ doescap --sitekey "YOUR_SITEKEY" --rqdata "OPTIONAL_RQDATA" --port 8787
219
+ ```
220
+
221
+ With custom HTML and assets:
222
+ ```bash
223
+ doescap --sitekey "YOUR_SITEKEY" --custom-html "./my_ui.html" --assets-dir "./assets"
224
+ ```
225
+
226
+ Run the offline unit test suite:
227
+ ```bash
228
+ pytest
229
+ ```
230
+
231
+ ---
232
+
233
+ ## License
234
+
235
+ MIT License — Copyright (c) 2026 [GhoSty](https://github.com/ghostypie).
@@ -0,0 +1,16 @@
1
+ doescap/__init__.py,sha256=S39aKVxTtG5Dkv-yUIq0SyQkwyqPphK3-03AuMvihRQ,674
2
+ doescap/browser.py,sha256=B7Lqxz8nkpYQ9tVe2SlF0j6Q7nhrWOuyrATKQc_OJLQ,7516
3
+ doescap/cdp.py,sha256=DA9CKO1kCPYY4P8FuCkN3ghgjRx5TBE0pnD7SFI236U,5557
4
+ doescap/cli.py,sha256=QdNJgl943igdGEwBNjgblmtl5rTgFJ9USFuxIvR8Pa8,3634
5
+ doescap/client.py,sha256=TH-J60BpffSaD-C1uN0GjhJH_zw4_h7ncX9Iw3ZeXWk,23378
6
+ doescap/config.py,sha256=vMo_4CQPgzr8knRkgd6JLHr5v20j3lhDC2x-ozuLAow,4099
7
+ doescap/network.py,sha256=p8wZsO3vm3HmtkPtre_uYH1QOlAsTZpJlUK7SSGHRfQ,2407
8
+ doescap/py.typed,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
9
+ doescap/server.py,sha256=cpJo-oX-2MyUz3zWlR20vlB0mn7GOik_Fke3woSVpxQ,8368
10
+ doescap/templates.py,sha256=XgDWRFfwxX8VmzaImDwt8cFw0vs-uG9nTQnLB_iAUj4,19597
11
+ doescap-1.0.0.dist-info/licenses/LICENSE,sha256=3zwauHDuLiQQXeTxE8Yw7bbnbOiLPoSa8JRUH36hKOo,1094
12
+ doescap-1.0.0.dist-info/METADATA,sha256=5zkZY0CzONOe5TkFUQUUn4U9M_vTfpZQN3O9Z6YqfSY,8705
13
+ doescap-1.0.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
14
+ doescap-1.0.0.dist-info/entry_points.txt,sha256=3TQzjxiSKQa9fhz5xZA9-fidjAi0EDA4fPNmGUlIZf0,45
15
+ doescap-1.0.0.dist-info/top_level.txt,sha256=KxglrWex0DHdYe7goa2EEEJ40mDuIT4yBkUSvL3gvmE,8
16
+ doescap-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ doescap = doescap.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 GhoSty (https://github.com/ghostypie)
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 @@
1
+ doescap