Bot check
Captcha without image puzzles
As soon as the page has loaded, your browser solves a small computational task in the background (proof of work with SHA-256). Depending on the device, this takes about a second. By the time you have filled out the form, the check is usually done. No cookies, no tracking, no pictures of traffic lights.
Prototype. Proof of work makes mass requests more expensive, but it doesn’t detect bots: a script with a decent CPU solves the task just as well. That is why sign-up on gpu.gripe still uses an additional bot check.
Try it out
Embedding it
Load the script once per page, always as a module (type="module"), and place the element in the
form. It adds its solution to the form data under the given name and holds the form back until the solution
is ready:
<script type="module" src="https://gpu.gripe/captcha.js"></script>
<form method="post" action="/kontakt">
…
<gpu-gripe-captcha name="captcha"></gpu-gripe-captcha>
<button>Send</button>
</form>
Your backend verifies the solution exactly once. Each solution is valid only once and for at most 10 minutes:
curl -X POST https://gpu.gripe/api/captcha/verify \
-H "Content-Type: application/json" \
-d '{"payload": "<value of the captcha form field>"}'
# {"success": true} or {"success": false, "reason": "replayed"}
The element fetches its tasks from the address the script was loaded from; you can change this with
api="https://…". It emits captcha-solved, captcha-expired, and
captcha-error as events, for example to enable the submit button only after the check. If your
site sets a Content Security Policy, it needs script-src and
connect-src https://gpu.gripe as well as worker-src blob:, because the solver runs as
a blob worker.