# tricaptcha Simple and accessible CAPTCHA system that works without Javascript. [cap.trimill.xyz](https://cap.trimill.xyz/). ## Environment variables - `RUST_LOG` - set log level (default: `error`) - `TCAP_ADDR` - set address (default: `localhost:8000`) ## API ### Main page GET `/` - `?count=`: number of digits to use in CAPTCHA (clamped between 1 and 16) - `?userdata=`: arbitrary data that will be saved and returned during verification ### Submission page POST `/submit` - `?id=`: the CAPTCHA ID - `?digits=`: the digits contained in the captcha ### Images GET `/image/ID` - `ID`: the CAPTCHA ID Each image may only be requested once ### Audio GET `/audio/ID` - `ID`: the CAPTCHA ID Each audio may only be requested once ### Verification GET `/verify` - `?token=`: the CAPTCHA token provided by the user - HTTP 400 - invalid token - HTTP 200 - valid token, JSON output: - `count`: number of digits in CAPTCHA - `issued`: time when CAPTCHA was issued to user - `completed`: time when CAPTCHA was completed by user - `userdata`: see above ## Dependencies `ffmpeg` and imagemagick's `convert` tool must be installed to generate the images and audio. ## Licenses All original work licensed under the [GNU GPLv3](./LICENSE.txt). Digit images are from the [MNIST handwritten digits dataset](https://github.com/rasbt/mnist-pngs), licensed under the [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/) license. Digit audio are from the [FSDD spoken digit dataset](https://github.com/Jakobovski/free-spoken-digit-dataset) v1.0.10, licensed under the [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) license.