Skip to content
Projects

vsmutok/PuzzleCaptchaSolver

View on GitHub

vsmutok/PuzzleCaptchaSolver has 109 GitHub stars and 10 forks. GitHot measured 0 stars in 24 hours and +1 in 7 days. Last checked 2026-11-18 18:38 UTC. Last push 2026-11-05.

How these counts are measured

What you can do

  • Whitespace Removal: Automatically crops the image to remove any unnecessary whitespace.
  • Edge Detection: Highlights the edges of images to improve the accuracy of template matching.
  • Slide Positioning: Accurately finds and marks the position of the puzzle piece within the background image.

Measured star growth

in 24h
0
in 7 days
+1
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

PuzzleCaptchaSolver is a Python project that solves puzzle CAPTCHAs like Geetest, Binance, DataDome, ARCcaptcha and TikTok. It uses OpenCV to process images and identify the position of the puzzle piece in the background image.

Productivity

README.md

Original

Puzzle Captcha Solver 🧩🧩

PuzzleCaptchaSolver is a Python project designed to solve various puzzle CAPTCHAs such as Geetest3, Geetest4, Binance, DataDome, TikTok, ARCcaptcha, and others. This project leverages OpenCV to process images and identify the position of the puzzle piece (slide) within the background image.


FuckCaptcha — the field guide to 39 CAPTCHA types

[!TIP] Looking for more than slider puzzles? Check out FuckCaptcha — an open field guide to 39 CAPTCHA types: detection signals, free and open-source approaches, and paid fallbacks in one place.

Related guides: GeeTest · Slider · Binance · DataDome · TikTok

Browse the interactive guide →


Features

  • Whitespace Removal: Automatically crops the image to remove any unnecessary whitespace.
  • Edge Detection: Highlights the edges of images to improve the accuracy of template matching.
  • Slide Positioning: Accurately finds and marks the position of the puzzle piece within the background image.

Installation

  1. Clone the repository:
    git clone https://github.com/vsmutok/Puzzle-Captcha-Solver.git
    cd Puzzle-Captcha-Solver
    
  2. Create and activate virtual environment:
    python3 -m venv .venv
    source .venv/bin/activate
    
  3. Install the required dependencies:
    pip install -r requirements.txt
    

Usage

The primary class in this project is PuzzleCaptchaSolver. Here's how you can use it:

  1. Initialization: Create an instance of PuzzleCaptchaSolver by providing the paths to the gap image, background image, and the output image path.

  2. Discern: Call the discern method to process the images and find the position of the slide.

Example

from PuzzleCaptchaSolver import PuzzleCaptchaSolver

if __name__ == "__main__":
    solver = PuzzleCaptchaSolver(
        gap_image_path="demo/geetest4/1_slice.png",
        bg_image_path="demo/geetest4/1_bg.png",
        output_image_path="demo/geetest4/1_result.png"
    )
    position = solver.discern()
    print(f"The position of the slide is: {position}")

Input Images:

  • Background Image

Background Image

  • Slide Image

Slide Image

Output Image:

Result Image

In the resulting image, the detected position of the sliding piece is highlighted with a red rectangle.

Methods

  • remove_whitespace(image): Removes whitespace from an image.
  • apply_edge_detection(img): Applies edge detection on the given image.
  • find_position_of_slide(slide_pic, background_pic): Finds the position of the slide on the background picture.
  • discern(): Performs the full discernment process to find the position of the slide in the given images.

Contributing

Contributions are welcome! If you have any suggestions, feel free to open an issue or create a pull request.

Need Help?

If you have trouble solving any type of CAPTCHA, feel free to open an issue or email me at [email protected], and I will try to help.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Acknowledgements

  • OpenCV for their powerful image processing library.
  • FuckCaptcha — the open field guide to CAPTCHA types, detection signals and solving strategies.

By using this project, you can efficiently solve various puzzle CAPTCHAs, making it easier to automate interactions with websites that use these types of verifications.


Disclaimer

This repository is created for informational purposes only. I do not advise or condone violating the policies of any website.


⭐️ If you found this project helpful, please give it a star on GitHub!


Star History