You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
bakape 584bee52b7
Merge pull request #41 from avdb13/master
3 months ago
assets docs: Replace sample image 4 years ago
cmd/captchouli go: bump package version 2 years ago
common only fetch new pages fromm danbooru, if there are too few pending images 2 years ago
danbooru only fetch new pages fromm danbooru, if there are too few pending images 2 years ago
db lowercase all DB tags and fix infinite loop 2 years ago
lbpcascade_animeface@4433ab1ae1 Basic face-based thumbnailing 4 years ago
templates Client: Fix submit button disappearing 2 years ago
test_utils CLI flags 4 years ago
testdata Basic face-based thumbnailing 4 years ago
.clang-format Basic face-based thumbnailing 4 years ago
.gitignore Use quicktemplate for HTML generation 4 years ago
.gitmodules Basic face-based thumbnailing 4 years ago
.travis.yml travis: force go 1.15 2 years ago
LICENSE Initial commit 4 years ago
README.md Update README.md 4 months ago
captchouli.go go: bump package version 2 years ago
captchouli_test.go go: bump package version 2 years ago
cascades.go Basic face-based thumbnailing 4 years ago
distort.cc Reduce maximum gaussian blur 4 years ago
distort.hh Add gaussian blur filter 4 years ago
fetch.go lowercase all DB tags and fix infinite loop 2 years ago
fetch_test.go go: bump package version 2 years ago
files.go go: bump package version 2 years ago
go.mod fetch: retry on API throttling 11 months ago
go.sum fetch: retry on API throttling 11 months ago
service.go only fetch new pages fromm danbooru, if there are too few pending images 2 years ago
service_test.go go: bump package version 2 years ago
thumbnail.cc Fix build for opencv 4. 4 years ago
thumbnail.go deps: update to opencv4 2 years ago
thumbnail.h Improve library API 4 years ago
thumbnail_test.go go: bump package version 2 years ago

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.