584bee52b7
Update README.md |
||
---|---|---|
assets | ||
cmd/captchouli | ||
common | ||
danbooru | ||
db | ||
lbpcascade_animeface@4433ab1ae1 | ||
templates | ||
test_utils | ||
testdata | ||
.clang-format | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
LICENSE | ||
README.md | ||
captchouli.go | ||
captchouli_test.go | ||
cascades.go | ||
distort.cc | ||
distort.hh | ||
fetch.go | ||
fetch_test.go | ||
files.go | ||
go.mod | ||
go.sum | ||
service.go | ||
service_test.go | ||
thumbnail.cc | ||
thumbnail.go | ||
thumbnail.h | ||
thumbnail_test.go |
README.md
captchouli
booru-backed procedurally-generated anime image captcha library and server
Captchouli scrapes boorus for admin-defined tags and generates and verifies captchas for user anti-bot authentication.
Installation
- Install OpenCV >= 4.0 development library (
libopencv-dev
on Debian-based systems) - Install Go >= 1.10
- Run
go install github.com/bakape/captchouli/cmd/captchouli@latest
- The captchouli server binary will be located under
$HOME/go/bin/captchouli
, if the default$GOPATH
is used.
Usage
Captchouli can be used as either a library or standalone server.
Server
Run captchouli --help
for a list CLI flags.
After the server has been started and the inital tag pool populated captchouli can be accessed using a HTTP API:
Method | Address | Receives | Returns |
---|---|---|---|
GET | / | Optional query parameters "captchouli-color" and "captchouli-background" for overriding the default captcha text colour and background | New captcha form HTML |
POST | / | Form data from the user | Either the ID of the solved captcha on success or a redirect to a fresh captcha, if incorrectly solved |
POST | /status | "captchouli-id" parameter - the ID of the captcha you wish to check the status of | "true", if captcha exists and has been solved or "false" otherwise. Note that this unregisters the captcha to prevent reply-again attacks. |
Advanced use cases
For more advanced use cases please refer to the Go API documented here .