Cap is an open-source proof-of-work CAPTCHA that sites host themselves, built as a lighter take on Cloudflare Turnstile. The visitor sees a small "Verify" widget while a Web Worker grinds through a SHA-256 puzzle, and the server then checks a one-time token. Since there is no image task, the simplest route is to let the widget finish and keep the token it produces.
How to identifyLink to How to identify
- A
<cap-widget>custom element, often withdata-cap-api-endpoint="..." - Attributes like
data-cap-api-endpoint,data-cap-worker-countanddata-cap-hidden-field-name - A hidden
cap-tokeninput (sites can rename it) - A "Verify" button that briefly shows progress
- The script from
https://cdn.jsdelivr.net/npm/@cap.js/widget, or a self-hosted copy - Requests to the site's
/challengeand/redeemendpoints
How it worksLink to How it works
- The widget asks the site's Cap endpoint for a challenge.
- One or more Web Workers solve the SHA-256 proof-of-work.
- The solution is exchanged for a token, written into the hidden
cap-tokenfield. - A
solveevent fires with the token inevent.detail.token. - The backend checks it with
@cap.js/serveror the standalone Docker service. - Every token is tied to its challenge, short-lived and usable once.
Free & open-source bypass methodsLink to Free & open-source bypass methods
| Tool | What it does | Success Rate | Link |
|---|---|---|---|
| Official widget | Loads the widget and waits for solve or cap-token |
~100% | tiagorangel1/cap |
| @cap.js/solver | Solves the proof-of-work server-side in Node.js | ~100% | Cap solver docs |
| Playwright / DrissionPage | Runs the widget in a real browser and reads the hidden field | ~100% | microsoft/playwright-python · g1879/DrissionPage |
| Node worker script | Re-creates the SHA-256 loop for headless pipelines | ~100% | tiagorangel1/cap |
Practical approachLink to Practical approach
- Load the page with JavaScript and Web Workers turned on.
- Wait for
<cap-widget>to appear, and click "Verify" if the site expects it. - Catch the
solveevent, or poll the hiddencap-tokeninput. - Submit at once, since the token can be used only one time.
- If the field has been renamed, the widget's attributes tell you its name.
Practical tipsLink to Practical tips
- Solving is pure CPU work. Allow enough time and don't let the browser throttle background tabs.
- The widget needs Web Workers and
crypto.subtle, which some locked-down headless profiles switch off. - Tokens are verified on the server and can't be faked, but generating a real one locally costs very little.
- Self-hosted setups may point to their own endpoint: check
data-cap-api-endpoint. - Cap proves that work was done, not that a human is present. It is not bot management, which is why sites usually pair it with rate limiting.