Skip to content

kezhengjie/captcha_solver_web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

captcha_solver_web

README | 中文文档

A simple HTTP server for solving captchas.
You can download the Windows version from the release page.
For Linux/Mac OS, you'll need to have python installed to run or package the server yourself.

API Reference

Endpoint

  • URL: /captcha
  • Method: POST
  • Content-Type: application/json

Request Body

Parameter Description
img Base64-encoded captcha image string

Example

For a captcha image, encode it in base64 and call the API:
captcha

curl http://127.0.0.1:8000/captcha -XPOST -H "Content-Type: application/json" \
--data '{"img": "iVBORw0KGgoAAAANSUhEUgAAAUAAAABICAIAAAAI1rskAAAIQ0lEQVR4nOzde1BTZ94H8OckJ9wvuQiBAGpAJSiaKniheK+83l63KrWd6W7XVu1029LRtZ29jLu61nVvnXa666wzdcd21kvHVXfrrtbWtlbdKkqlaqEC5X6JQAiEkECAXHfgpDEcwqVtYvLMfD9/Pc95fsn8mMzXnJzznJGtLTUTAKCTINANAMB3hwADUAwBBqAYAgxAMQQYgGIIMADFEGAAiiHAABRDgAEohgADUAwBBqAYAgxAMQQYgGIIMADFEGAAiiHAABRDgAEohgADUAwBBqAYAgxAMQQYgGIIMADFEGAAiiHAABRDgAEohgADUAwBBqAYAgxAMQQYgGIIMADF2EA3AIFntVkLS69+VVtiMOljImMXZObOzZgf6KZgXBjP/x+4TPtpq7FyeJFIGDZv4qZQNtLpdBQ1njRbDPx3IYKMhGUJ0VMJIRVt/23uKuOtK6VzlLK5fvob4Pv4vOz6zw/u1OpbPQ/Onpb1WsGfFROSAtcXjMuQAP/h4gqbvd9r3YZZe2YkrGgxfn34xjavBRnyZfnqVwkhr19a22s18lalkSkv5L7r087BByobKx7/9XqL1cuHnihTnNh3Jk4cF4i+YLyG/AbOm/ai1yKlLEslXzrwocakz07+/+EFMWFxj0z7CTdeqdrBMEPeNoyNWjHCO0Ng7X37V17TSwhp6Wj+49F9D7wj+HaGJC0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For Windows users,you could simply run the binary from release page.

.\captcha_resolver.exe --host 127.0.0.1 --port 8000

Initialize

Windows

python -m venv venv
call venv\Scripts\activate
pip install -r requirements.txt

Linux/Mac OS

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Run the Server

Windows

python -m uvicorn app:app --host 127.0.0.1 --port 8000

Linux/Mac OS

python -m uvicorn app:app --host 127.0.0.1 --port 8000

Credits