https://github.com/arfelious/simple-captcha-solver
A simple image captcha solver for a website
https://github.com/arfelious/simple-captcha-solver
captcha image-processing png
Last synced: about 1 year ago
JSON representation
A simple image captcha solver for a website
- Host: GitHub
- URL: https://github.com/arfelious/simple-captcha-solver
- Owner: arfelious
- License: mit
- Created: 2023-03-08T12:35:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-08T12:35:55.000Z (over 3 years ago)
- Last Synced: 2023-08-07T22:59:30.899Z (almost 3 years ago)
- Topics: captcha, image-processing, png
- Language: JavaScript
- Homepage:
- Size: 217 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Captcha Solver
Although captchas are for keeping bots away, some poorly made captchas intrigue people even more to automate the process of solving them. This project does not use any machine learning or deep learning.
Even the PNG parser is not really compliant with PNG spec as the images provided by the website are limited to palette-indexed 2 bit colors.
It uses simple image processing techniques to solve captchas from a specific website, this was a simple project to get started with image processing.
## Usage
After solving 10-15 captchas manually and putting them in the `known` folder with `answer`.png format, the program can solve the provided captchas in the `data` folder with 100% accuracy. (files in the `known` folder are already enough to solve the captchas in the `data` directory)
You can update the known characters by passing train as the first argument. (`known.json` provided in the repo already has the known characters)
```bash
node index.js train
```
Command below is an example of solving a captcha.
```bash
node index.js solve ./data/123.png
```
You can pass multiple paths to solve multiple captchas.
```bash
node index.js solve ./data/123.png ./data/456.png
```
If you want to time the program, you can pass `-t` or `--time` as an argument.
```bash
node index.js solve ./data/123.png -t
```
Not passing any parameters will start a REPL-like interface that can be used for debugging.
There are no dependencies other than native node modules.
## LICENSE
[MIT](https://choosealicense.com/licenses/mit/)