Skip to content

An Image Captcha that makes you able to test your bots without losing Consumer Captcha Solver tokens when testing it

Elxss/Image-Captcha-Solver

Repository files navigation


Logo

Captcha Solver GUI


Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Installation
  3. Roadmap
  4. Contact
Small demo :) Demo

About The Project

You're making a bot farm ? or a Scrapper ?

You don't want to have to manage costs while debugging you're system ?

This script is THE solution for your problem !

A Small API running in Python Receives the Tickets and replies to them as if it was a consumer API, Such as 2Captcha

Consider Staring this project if you like it :)

This project uses Python and a few modules

Small Preview !

I added 3 backgrounds you can select them via the cfg file Demo Demo Demo

(back to top)

Installation

Simple unzip, install modules and voila

  1. If you're interested in this project i assume that you already have bases in computer sience, Python is required to run the project , you can download it directly from https://www.python.org/
  2. Install the required dependancies with the command pip install requirements.txt if you're really struggling just start the setup .bat mate
  3. The script is ready to be run, you can possibly change the settings in the file settings.cfg there arent a lot of options so far only ip, port, and the background path
[API]
host = localhost
port = 4848

[general]
background = Themes/theme3.gif
  1. You need to add the embedings in your scrapping script now, examples are available in the folder Examples you can use something like this in Python:
import ImgCaptchaClient

Img_Captcha_Local = True

LocalSolver = ImgCaptchaClient.Solver("http://localhost:4848")

if Img_Captcha_Local:
    Response = LocalSolver.solve_image("IMAGE PATH")
else:
    ## your normal script
    print("Consumer API image Captcha Solver")

IF YOU'RE NOT USING PYTHON THIS IS JUST A POST REQUEST TO : http://localhost:1825/api/submit with who you'll get a request id (req_id) that you'll need to ping http://localhost:1825/api/check/{req_id} you'll get your queue_position

here is the script of ImgCaptchaClient.py for you to understand properly :

import requests
import time
import sys

class SolverClient:
    def __init__(self, server_url='http://localhost:4848'):
        self.api_url = server_url
    
    def solve_image(self, image_path):
        try:

            with open(image_path, 'rb') as f:
                response = requests.post(
                    f"{self.api_url}/api/submit",
                    files={'image': f}
                )
            
            if not response.ok:
                print(f"HTTP Error {response.status_code}")
                return None
                
            data = response.json()
            req_id = data['request_id']
            print(f"ID: {req_id}")
            print(f"Position in queue: {data['queue_position']}")
            
            while True:
                response = requests.get(f"{self.api_url}/api/check/{req_id}")
                data = response.json()
                
                if data['status'] != 'PENDING':
                    return data['status']
                
                print(f"\rWaiting... Position: {data['queue_position']}", end="")
                time.sleep(1)
                
        except Exception as e:
            print(f"Error: {e}")
            return None
        finally:
            print()

if __name__ == "__main__":
    if len(sys.argv) != 2:
        print("Usage: client.py <path_image>")
        sys.exit(1)
    
    client = SolverClient()
    result = client.solve_image(sys.argv[1])
    print(f"Result: {result}")
  1. You're done :)

(back to top)

Roadmap

  • Make it work
  • Youtube Video

(back to top)

Contact

Elxss - discord: eliasss8886_ - elxssgitcontact@gmail.com - website: elxss.github.io

(back to top)

This is a Readme.md Template

About

An Image Captcha that makes you able to test your bots without losing Consumer Captcha Solver tokens when testing it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages