Go to file
bakape 584bee52b7
Merge pull request #41 from avdb13/master
Update README.md
2022-06-25 21:19:56 +03:00
assets docs: Replace sample image 2019-01-13 17:44:08 +02:00
cmd/captchouli go: bump package version 2020-05-17 12:41:17 +03:00
common only fetch new pages fromm danbooru, if there are too few pending images 2020-11-22 15:41:20 +02:00
danbooru only fetch new pages fromm danbooru, if there are too few pending images 2020-11-22 15:41:20 +02:00
db lowercase all DB tags and fix infinite loop 2020-05-17 14:17:04 +03:00
lbpcascade_animeface@4433ab1ae1 Basic face-based thumbnailing 2018-10-07 18:43:37 +03:00
templates Client: Fix submit button disappearing 2020-07-31 14:10:06 +01:00
test_utils CLI flags 2018-12-09 21:54:16 +02:00
testdata Basic face-based thumbnailing 2018-10-07 18:43:37 +03:00
.clang-format Basic face-based thumbnailing 2018-10-07 18:43:37 +03:00
.gitignore Use quicktemplate for HTML generation 2018-10-22 16:16:01 +03:00
.gitmodules Basic face-based thumbnailing 2018-10-07 18:43:37 +03:00
.travis.yml travis: force go 1.15 2020-11-22 16:06:16 +02:00
LICENSE Initial commit 2018-09-26 19:35:49 +03:00
README.md Update README.md 2022-06-19 22:53:03 +03:00
captchouli.go go: bump package version 2020-05-17 12:41:17 +03:00
captchouli_test.go go: bump package version 2020-05-17 12:41:17 +03:00
cascades.go Basic face-based thumbnailing 2018-10-07 18:43:37 +03:00
distort.cc Reduce maximum gaussian blur 2018-11-18 09:41:37 +02:00
distort.hh Add gaussian blur filter 2018-11-16 07:05:40 +02:00
fetch.go lowercase all DB tags and fix infinite loop 2020-05-17 14:17:04 +03:00
fetch_test.go go: bump package version 2020-05-17 12:41:17 +03:00
files.go go: bump package version 2020-05-17 12:41:17 +03:00
go.mod fetch: retry on API throttling 2021-11-13 20:17:04 +02:00
go.sum fetch: retry on API throttling 2021-11-13 20:17:04 +02:00
service.go only fetch new pages fromm danbooru, if there are too few pending images 2020-11-22 15:41:20 +02:00
service_test.go go: bump package version 2020-05-17 12:41:17 +03:00
thumbnail.cc Fix build for opencv 4. 2019-04-22 00:10:51 +10:00
thumbnail.go deps: update to opencv4 2020-11-21 23:20:25 +02:00
thumbnail.h Improve library API 2018-10-31 23:54:09 +02:00
thumbnail_test.go go: bump package version 2020-05-17 12:41:17 +03:00

README.md

GoDoc Build Status

captchouli

booru-backed procedurally-generated anime image captcha library and server

sample

Captchouli scrapes boorus for admin-defined tags and generates and verifies captchas for user anti-bot authentication.

Installation

  1. Install OpenCV >= 4.0 development library (libopencv-dev on Debian-based systems)
  2. Install Go >= 1.10
  3. Run go install github.com/bakape/captchouli/cmd/captchouli@latest
  4. 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 GoDoc.