doescap 1.0.0__tar.gz → 1.0.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: doescap
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: DoesCap: Fast, lightweight cross-platform hCaptcha relay and solver library built by GhoSty, supporting Windows, macOS, Linux, and Android (Termux).
5
5
  Author: GhoSty
6
6
  License: MIT
@@ -44,6 +44,8 @@ Built for seamless operation across **Windows**, **macOS**, **Linux**, and **And
44
44
  ## Author & Community
45
45
 
46
46
  - **Author**: **GhoSty** — [https://github.com/ghostypie](https://github.com/ghostypie)
47
+ - **Live Documentation**: [https://ghostypie.github.io/DoesCap/](https://ghostypie.github.io/DoesCap/)
48
+ - **PyPI Package**: [https://pypi.org/project/doescap/](https://pypi.org/project/doescap/)
47
49
  - **Discord Support Server**: [https://discord.com/invite/asMJGgDA7u](https://discord.com/invite/asMJGgDA7u)
48
50
  - **Support / Donate (Donatree)**: [https://donatr.ee/brutality/](https://donatr.ee/brutality/)
49
51
 
@@ -51,7 +53,7 @@ Built for seamless operation across **Windows**, **macOS**, **Linux**, and **And
51
53
 
52
54
  ## Key Features
53
55
 
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.
56
+ - **Zero-Latency Direct Solver (Default)**: Renders the official challenge natively in the user's browser with 60Hz/120Hz touch responsiveness, forwarding Enterprise `rqdata` via `hcaptcha.render` and `hcaptcha.setData` with zero extra CPU or RAM consumption.
55
57
  - **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
58
  - **Universal Android & Termux Support**: Automatically handles Termux URL opening tools (`termux-open-url`, `termux-open`) and native Android activity intents (`am start`).
57
59
  - **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.
@@ -171,8 +173,9 @@ with DoesCap(config=config) as relay:
171
173
 
172
174
  #### Custom HTML Contract
173
175
  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
+ 1. `GET /status`: Returns JSON with active `sitekey`, `rqdata`, `mode`, `solved`, `claimed`, `task_name`, `promo_code`, and `success_message`.
177
+ 2. When `rqdata` is present, pass `opts.rqdata = info.rqdata` into `hcaptcha.render(...)` and call `hcaptcha.setData(widgetId, { rqdata: info.rqdata })`.
178
+ 3. `POST /solve`: Send `{ "token": token }` once hCaptcha's callback fires.
176
179
 
177
180
  Static files inside `custom_assets_dir` are served securely under `/assets/*`.
178
181
 
@@ -9,6 +9,8 @@ Built for seamless operation across **Windows**, **macOS**, **Linux**, and **And
9
9
  ## Author & Community
10
10
 
11
11
  - **Author**: **GhoSty** — [https://github.com/ghostypie](https://github.com/ghostypie)
12
+ - **Live Documentation**: [https://ghostypie.github.io/DoesCap/](https://ghostypie.github.io/DoesCap/)
13
+ - **PyPI Package**: [https://pypi.org/project/doescap/](https://pypi.org/project/doescap/)
12
14
  - **Discord Support Server**: [https://discord.com/invite/asMJGgDA7u](https://discord.com/invite/asMJGgDA7u)
13
15
  - **Support / Donate (Donatree)**: [https://donatr.ee/brutality/](https://donatr.ee/brutality/)
14
16
 
@@ -16,7 +18,7 @@ Built for seamless operation across **Windows**, **macOS**, **Linux**, and **And
16
18
 
17
19
  ## Key Features
18
20
 
19
- - **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.
21
+ - **Zero-Latency Direct Solver (Default)**: Renders the official challenge natively in the user's browser with 60Hz/120Hz touch responsiveness, forwarding Enterprise `rqdata` via `hcaptcha.render` and `hcaptcha.setData` with zero extra CPU or RAM consumption.
20
22
  - **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).
21
23
  - **Universal Android & Termux Support**: Automatically handles Termux URL opening tools (`termux-open-url`, `termux-open`) and native Android activity intents (`am start`).
22
24
  - **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.
@@ -136,8 +138,9 @@ with DoesCap(config=config) as relay:
136
138
 
137
139
  #### Custom HTML Contract
138
140
  Your custom HTML can read SSR placeholders (`{{ title }}`, `{{ theme }}`, `{{ sitekey }}`, `{{ rqdata }}`) or communicate with two lightweight endpoints:
139
- 1. `GET /status`: Returns JSON with active `sitekey`, `rqdata`, `mode`, `task_name`, `promo_code`, and state.
140
- 2. `POST /solve`: Send `{ "token": token }` once hCaptcha's callback fires.
141
+ 1. `GET /status`: Returns JSON with active `sitekey`, `rqdata`, `mode`, `solved`, `claimed`, `task_name`, `promo_code`, and `success_message`.
142
+ 2. When `rqdata` is present, pass `opts.rqdata = info.rqdata` into `hcaptcha.render(...)` and call `hcaptcha.setData(widgetId, { rqdata: info.rqdata })`.
143
+ 3. `POST /solve`: Send `{ "token": token }` once hCaptcha's callback fires.
141
144
 
142
145
  Static files inside `custom_assets_dir` are served securely under `/assets/*`.
143
146
 
@@ -12,7 +12,7 @@ from .config import RelayConfig, SolveResult
12
12
  from .client import DoesCap, HCaptchaRelay, solve_captcha, async_solve_captcha
13
13
  from .network import get_local_ip
14
14
 
15
- __version__ = "1.0.0"
15
+ __version__ = "1.0.1"
16
16
  __author__ = "GhoSty"
17
17
  __all__ = [
18
18
  "DoesCap",
@@ -571,25 +571,28 @@ def render_html_page(title: str = "DoesCap Relay", theme: str = "dark") -> str:
571
571
  pullFrame();
572
572
  }}
573
573
 
574
- if (st.solved) {{
574
+ if (st.solved || st.claimed) {{
575
575
  if (!isSolved) {{
576
576
  isSolved = true;
577
- statusText.textContent = 'SUCCESS';
577
+ statusText.textContent = st.claimed ? 'CLAIMED' : 'VERIFIED';
578
578
  statusBadge.className = 'badge solved';
579
579
  mainPanel.style.display = 'none';
580
580
  successScreen.style.display = 'flex';
581
+ }}
581
582
 
582
- if (st.task_name) {{
583
- claimedTaskEl.textContent = st.task_name;
584
- claimedTaskEl.style.display = 'block';
585
- }}
586
- if (st.promo_code) {{
587
- promoValue.textContent = st.promo_code;
588
- promoCard.style.display = 'block';
589
- }}
590
- if (st.success_message) {{
591
- document.getElementById('success-subtext').textContent = st.success_message;
592
- }}
583
+ if (st.claimed) {{
584
+ statusText.textContent = 'CLAIMED';
585
+ }}
586
+ if (st.task_name) {{
587
+ claimedTaskEl.textContent = st.task_name;
588
+ claimedTaskEl.style.display = 'block';
589
+ }}
590
+ if (st.promo_code) {{
591
+ promoValue.textContent = st.promo_code;
592
+ promoCard.style.display = 'block';
593
+ }}
594
+ if (st.success_message) {{
595
+ document.getElementById('success-subtext').textContent = st.success_message;
593
596
  }}
594
597
  }} else if (st.mode === 'direct' || st.rect) {{
595
598
  statusText.textContent = 'ACTIVE';
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: doescap
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: DoesCap: Fast, lightweight cross-platform hCaptcha relay and solver library built by GhoSty, supporting Windows, macOS, Linux, and Android (Termux).
5
5
  Author: GhoSty
6
6
  License: MIT
@@ -44,6 +44,8 @@ Built for seamless operation across **Windows**, **macOS**, **Linux**, and **And
44
44
  ## Author & Community
45
45
 
46
46
  - **Author**: **GhoSty** — [https://github.com/ghostypie](https://github.com/ghostypie)
47
+ - **Live Documentation**: [https://ghostypie.github.io/DoesCap/](https://ghostypie.github.io/DoesCap/)
48
+ - **PyPI Package**: [https://pypi.org/project/doescap/](https://pypi.org/project/doescap/)
47
49
  - **Discord Support Server**: [https://discord.com/invite/asMJGgDA7u](https://discord.com/invite/asMJGgDA7u)
48
50
  - **Support / Donate (Donatree)**: [https://donatr.ee/brutality/](https://donatr.ee/brutality/)
49
51
 
@@ -51,7 +53,7 @@ Built for seamless operation across **Windows**, **macOS**, **Linux**, and **And
51
53
 
52
54
  ## Key Features
53
55
 
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.
56
+ - **Zero-Latency Direct Solver (Default)**: Renders the official challenge natively in the user's browser with 60Hz/120Hz touch responsiveness, forwarding Enterprise `rqdata` via `hcaptcha.render` and `hcaptcha.setData` with zero extra CPU or RAM consumption.
55
57
  - **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
58
  - **Universal Android & Termux Support**: Automatically handles Termux URL opening tools (`termux-open-url`, `termux-open`) and native Android activity intents (`am start`).
57
59
  - **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.
@@ -171,8 +173,9 @@ with DoesCap(config=config) as relay:
171
173
 
172
174
  #### Custom HTML Contract
173
175
  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
+ 1. `GET /status`: Returns JSON with active `sitekey`, `rqdata`, `mode`, `solved`, `claimed`, `task_name`, `promo_code`, and `success_message`.
177
+ 2. When `rqdata` is present, pass `opts.rqdata = info.rqdata` into `hcaptcha.render(...)` and call `hcaptcha.setData(widgetId, { rqdata: info.rqdata })`.
178
+ 3. `POST /solve`: Send `{ "token": token }` once hCaptcha's callback fires.
176
179
 
177
180
  Static files inside `custom_assets_dir` are served securely under `/assets/*`.
178
181
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "doescap"
7
- version = "1.0.0"
7
+ version = "1.0.1"
8
8
  description = "DoesCap: Fast, lightweight cross-platform hCaptcha relay and solver library built by GhoSty, supporting Windows, macOS, Linux, and Android (Termux)."
9
9
  readme = "README.md"
10
10
  authors = [
@@ -202,10 +202,24 @@ def test_live_http_endpoints_and_solve_flow(tmp_path) -> None:
202
202
  assert res.success is True
203
203
  assert res.metadata["mode"] == "direct"
204
204
 
205
- # Lifecycle methods update public status cleanly
205
+ # Lifecycle methods update public status cleanly even after solve() returns
206
206
  relay.mark_completed("All done!")
207
207
  assert relay.get_public_status()["success_message"] == "All done!"
208
208
 
209
+ relay.mark_claimed(task_name="Enterprise Quest", promo_code="GHOSTY-2026")
210
+ with urllib.request.urlopen(base + "/status") as resp:
211
+ post_claim = json.loads(resp.read().decode("utf-8"))
212
+ assert post_claim["solved"] is True
213
+ assert post_claim["claimed"] is True
214
+ assert post_claim["task_name"] == "Enterprise Quest"
215
+ assert post_claim["promo_code"] == "GHOSTY-2026"
216
+
217
+ # Verify built-in template handles post-solve claimed state updates
218
+ from doescap.templates import render_html_page
219
+ default_page = render_html_page(title="DoesCap", theme="dark")
220
+ assert "if (st.solved || st.claimed)" in default_page
221
+ assert "hcaptcha.setData" in default_page
222
+
209
223
 
210
224
  def test_custom_html_path_and_timeout(tmp_path) -> None:
211
225
  html_file = tmp_path / "portal.html"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes