Hcaptcha-challenger - Gracefully face hCaptcha challenge with Yolov5(ONNX) embedded solution

Overview

hCaptcha Challenger

🚀 Gracefully face hCaptcha challenge with Yolov5(ONNX) embedded solution.




hcaptcha-challenger-demo

Introduction

Does not rely on any Tampermonkey script.

Does not use any third-party anti-captcha services.

Just implement some interfaces to make AI vs AI possible.

Requirements

  • Python 3.7+
  • google-chrome

Usage

  1. Clone the project code in the way you like.

  2. Execute the following command in the project root directory.

    # hcaptcha-challenger
    pip install -r ./requirements.txt
  3. Download Project Dependencies.

    The implementation includes downloading the YOLOv5 target detection model and detecting google-chrome in the current environment.

    If google-chrome is missing please follow the prompts to download the latest version of the client, if google-chrome is present you need to make sure it is up to date.

    Now you need to execute the cd command to access the /src directory of project and execute the following command to download the project dependencies.

    # hcaptcha-challenger/src
    python main.py install
  4. Start the test program.

    Check if chromedriver is compatible with google-chrome.

    # hcaptcha-challenger/src
    python main.py test
  5. Start the demo program.

    If the previous test passed perfectly, now is the perfect time to run the demo!

    # hcaptcha-challenger/src
    python main.py demo
  6. Have a good time.

    Enjoy it and port it to your project.

Advanced

  1. You can download yolov5 onnx models of different sizes by specifying the model parameter in the install command.

    • Download yolov5s6 by default when no parameters are specified.

    • The models that can be chosen are yolov5n6yolov5m6yolov5s6.

    # hcaptcha-challenger/src
    python main.py install --model=yolov5n6
  2. You can run different yolo models by specifying the model parameter to compare the performance difference between them.

    • Similarly, when the model parameter is not specified, the yolov5s6 model is used by default.

    • Note that you should use install to download the missing models before running the demo.

    # hcaptcha-challenger/src
    python main.py demo --model=yolov5n6
  3. Comparison of programs.

    The following table shows the average solving time of the hCAPTCHA challenge for 30 rounds (one round for every 9 challenge images) of mixed categories processed by onnx models of different sizes.

    model(onnx) avg_time(s) size(MB)
    yolov5n6 0.71 12.4
    yolov5s6 1.422 48.2
    yolov5m6 3.05 136
    • Use of the YOLOv5n6(onnx) embedded scheme to obtain solution speeds close to the limit.

    • Use of the YOLOv5s6(onnx) embedded solution, which allows for an optimal balance between stability, power consumption, and solution efficiency.

Tour

Install Google Chrome on Ubuntu 18.04+

  1. Downloading Google Chrome

    wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
  2. Installing Google Chrome

    sudo apt install ./google-chrome-stable_current_amd64.deb

Install Google Chrome on CentOS 7/8

  1. Start by opening your terminal and downloading the latest Google Chrome .rpm package with the following wget command :

    wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
  2. Once the file is downloaded, install Google Chrome on your CentOS 7 system by typing:

    sudo yum localinstall google-chrome-stable_current_x86_64.rpm

Install Google Chrome on Windows / MacOs

Just go to Google Chrome official website to download and install.

Comments
  • [Question] Warning None

    [Question] Warning None

    022-10-23 23:13:54 | DEBUG - Downloading objects.yaml from https://raw.githubusercontent.com/QIN2DIM/hcaptcha-challenger/main/src/objects.yaml 2022-10-23 23:14:02 | WARNING - None 2022-10-23 23:14:06 | WARNING - None 2022-10-23 23:14:10 | WARNING - None 2022-10-23 23:14:14 | WARNING - None 2022-10-23 23:14:17 | WARNING - None 2022-10-23 23:14:21 | WARNING - None 2022-10-23 23:14:25 | WARNING - None 2022-10-23 23:14:29 | WARNING - None

    this issue persist

    The object in this case is cup of coffee, it takes screenshot, then take again and so on

    fixed 
    opened by M-Zubair10 20
  • [Question] Allow to change Language

    [Question] Allow to change Language

    It doesnt work when changing chrome language to english and changing get_labels to return label in english But the image classifier just takes chinese

    fixed 
    opened by skrrppop 20
  • feat(add): Handle `airplane in the sky flying left` challenge with SK-IMAGE solution

    feat(add): Handle `airplane in the sky flying left` challenge with SK-IMAGE solution

    Introduction

    Usage

    You can run the demo project associated with the solution by running the following command:

    # hcaptcha-challenge/src
    python3 main.py demo_v3
    

    Linked pull requests

    @beiyuouo https://github.com/QIN2DIM/hcaptcha-challenger/commit/30ae3915b95e65cedfd9d0d8a9896bfdd9cd114f

    Demo

    skimage-solution-2

    fixed 🔥 challenge 
    opened by QIN2DIM 16
  • [Question] Project is not working for me

    [Question] Project is not working for me

    Hi,

    First i wanted to thank you for your work !

    I just downloaded your project, i installed the required dependencies and i launched the program using the same line as your readme gif. The problem is, it doesn't succeed resolving the hcaptcha. How come ? Is there something i'm missing ?

    opened by Skiizoo 12
  • [Question]

    [Question]

    Hello, I have no error but the script crashes, I have not modified the source code but just added to my private project. The captcha solver is called at the end to solve a captcha.

    Here is the error: C:\Users\user\Desktop\discord>python account.py

    DevTools listening on ws://127.0.0.1:1089/devtools/browser/70f17e73-3f59-4ffb-a093-195fd79dfa61 [19060:15084:0831/182935.625:ERROR:device_event_log_impl.cc(214)] [18:29:35.626] Bluetooth: bluetooth_adapter_winrt.cc:1074 Getting default adapter failed. 2022-08-31 18:29:45 | DEBUG - >> Challenge [ArmorCaptcha] Handle hCaptcha checkbox 2022-08-31 18:29:47 | DEBUG - >> Challenge [ArmorCaptcha] Get label - label=「Please click on each image containing a lion with closed eyes.」 2022-08-31 18:29:47 | DEBUG - >> Challenge [ArmorCaptcha] Download challenge images - timeit=0.2s 2022-08-31 18:29:48 | WARNING - >> ALERT [ArmorCaptcha] Types of challenges not yet scheduled - label=「Please click on each image containing a lion with closed eyes.」 prompt=「Please click on each image containing a lion with closed eyes.」 screenshot=C:\Usersuser\Desktop\discord\database\temp_cache\captcha_schot\1661963387. Please click on each image containing a lion with closed eyes..png site_link=https://discord.com/register issues=https://github.com/QIN2DIM/hcaptcha-challenger/issues?q=Veuillez%20cliquer%20sur%20chaque%20image%20contenant%20un%20lion%20aux%20yeux%20ferm%C3%A9s.

    C:\Users\user\Desktop\discord>

    I enclose an extra picture.

    image

    fixed 
    opened by floconacs 11
  • [ERROR] ONNX-Import Assertion Failed

    [ERROR] ONNX-Import Assertion Failed

    Note: This is an error i got which is from my implementation of the ai.

      File "C:\Bot\dislock\main.py", line 411, in captcha_solver
        self.challenger = ArmorCaptcha(dir_workspace=DIR_CHALLENGE, dir_model=DIR_MODEL, lang='en', debug=True,
      File "C:\Bot\dislock\hcaptcha_challenger\core.py", line 126, in __init__
        self.pluggable_onnx_models = self.pom_handler.overload(
      File "C:\Bot\dislock\hcaptcha_challenger\solutions\resnet.py", line 203, in overload
        return {
      File "C:\Bot\dislock\hcaptcha_challenger\solutions\resnet.py", line 204, in <dictcomp>
        finger: FingersOfTheGolderOrder(finger, dir_model, path_rainbow)
      File "C:\Bot\dislock\hcaptcha_challenger\solutions\resnet.py", line 93, in __init__
        super().__init__(onnx_prefix, f"{onnx_prefix}(ResNet)_model", dir_model, path_rainbow)
      File "C:\Bot\dislock\hcaptcha_challenger\solutions\resnet.py", line 41, in __init__
        self.net = cv2.dnn.readNetFromONNX(self.onnx_model["path"])
    cv2.error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp:709: error: (-215:Assertion failed) model_proto.has_graph() in function 'cv::dnn::dnn4_v20211220::ONNXImporter::populateNet'
    

    Source: https://github.com/Vinyzu/DiscordGenerator/blob/main/main.py#L411

    fixed 
    opened by Vinyzu 11
  • Seperate solution

    Seperate solution

    Hi, I respect your work and know how much it is useful, but I can't integrate it with my python code I want you to give a standard onnx format model so that everyone like me can make prediction and use it anyway wanted maybe for even classification task Does all predictions made by yolov6? And why don't you use yolov7 as it is fast Can you give links about guide on how did you actually trained the model for custom classification like dog_with_open_eyes I also want to use it to solve recaptcha Basically, I am making a pypi version of library that can handle every captcha with single line like this

    solver = CaptchaSolver().setCaptchaTypeAs#anylikehcaptcha.solve()
    

    I actually got success with very good accuracy using efficientnet before but it can't predict new classes that hcaptcha made recently Also, I have solved too many classes of recaptcha, text captcha, upside down captcha, duplicate image finder captcha, slide captcha, and many more, generally 9 types supported by it I want you to contribute in it by giving me and teaching me how to do custom classification task, dataset length required for it and give me yolov6 in h5 or onnx format Thanks

    opened by M-Zubair10 10
  • [Question] how to get as many pictures challenge?

    [Question] how to get as many pictures challenge?

    If i know the site key can i get many pictures to train? I have tried many times but it is very difficult to get many pictures, at most 80 ~ 100 pictures per 1000 times. Is there any way to get the exact picture i need?

    opened by luanon404 9
  • feat(todo): re-train model

    feat(todo): re-train model

    In extreme tests, the effect of the following model does not meet the expectations, and we plan to release them in the future.

    • [ ] living_room
    • [x] bedroom
    • [ ] smiling_dog
    • [x] conference_room
    opened by QIN2DIM 9
  • feat(add): pypi release

    feat(add): pypi release

    We will release the heterogeneous scaffolding in v1.0 and upload the project package to pypi platform, then players can use pip to install and use hcaptcha-challenger.

    But before that, we will absorb as many suggestions from players as possible, and we will also re-standardize the model of the scaffolding interface so that it can be called in various suitable occasions.

    feature 
    opened by QIN2DIM 9
  • [Challenge] rabbit

    [Challenge] rabbit

    Prompt[en]

    Please click each image containing a rabbit

    New types of challenge

    New prompt (for ex. Please select all the 45th President of the US)

    Sitekey

    https://accounts.hcaptcha.com/demo?sitekey=edc4ce89-8903-4906-80b1-7440ad9a69c8

    Sitelink

    https://accounts.hcaptcha.com/demo?sitekey=edc4ce89-8903-4906-80b1-7440ad9a69c8

    Screenshot of the challenge

    fixed 🔥 challenge 
    opened by luanon404 8
  • [Challenge]  red roses in a garden

    [Challenge] red roses in a garden

    Prompt[en]

    red roses in a garden

    New types of challenge

    New prompt (for ex. Please select all the 45th President of the US)

    Sitekey

    f5561ba9-8f1e-40ca-9b5b-a0b3f719ef34

    Sitelink

    https://accounts.hcaptcha.com/demo?sitekey=f5561ba9-8f1e-40ca-9b5b-a0b3f719ef34

    Screenshot of the challenge

    img_v2_fd01733a-9bf3-4c7c-bbaa-58511f9748eg

    🔥 challenge 
    opened by QIN2DIM 0
  • [BUG] ImportError

    [BUG] ImportError

    PS C:\Users\User\Desktop\Temp\hcaptcha-challenger-main 213821938123\hcaptcha-challenger-main> python main.py test
    Traceback (most recent call last):
      File "C:\Users\User\Desktop\Temp\hcaptcha-challenger-main 213821938123\hcaptcha-challenger-main\main.py", line 10, in <module>
        from examples import demo_selenium, demo_challenge, demo_install, demo_classify
    ImportError: cannot import name 'demo_selenium' from 'examples' (C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\examples\__init__.py)
    
    opened by EricTheGamer911 0
  • [*Challenge] Are all red dots on the longest black line?

    [*Challenge] Are all red dots on the longest black line?

    Prompt[en]

    Are all red dots on the longest black line?

    New types of challenge

    New approach (for ex. image watermark)

    Sitekey

    adafb813-8b5c-473f-9de3-485b4ad5aa09

    Sitelink

    https://accounts.hcaptcha.com/demo?sitekey=adafb813-8b5c-473f-9de3-485b4ad5aa09

    Screenshot of the challenge

    img_v2_a505d43e-8bf3-46e5-a05e-06faaaa01d7g

    🔥 challenge 
    opened by QIN2DIM 1
  • feat(add): datas proximity catalog

    feat(add): datas proximity catalog

        @QIN2DIM Can you make another repo for the Pypi Release/ Make an Update
    

    Basicly, these are my two issues:

    1. It has requirements such as undetected-chromdriver that it doesnt use
    2. The Directory where the Models are saved should be fixxed (for example in the local pip dir) as if u use hcaptcha_chalenger in two projects you download the models a second time.

    Originally posted by @Vinyzu in https://github.com/QIN2DIM/hcaptcha-challenger/issues/226#issuecomment-1295892623

    feature 
    opened by QIN2DIM 0
  • [Note] You can close this instantly if you want, maight just be viable for some Testers

    [Note] You can close this instantly if you want, maight just be viable for some Testers

    This is a list of hCaptcha Sitekeys i found all arround the internet:

    3b35d792-d035-4ea9-ad4e-61179582a5ee
    3ceb8624-1970-4e6b-91d5-70317b70b651
    28982ab4-aeef-4200-b9cc-28af1e23e377
    ad252538-16a2-4618-a23c-51485c2c9622
    a5f74b19-9e45-40e0-b45d-47ff91b7a6c2
    28432475-d840-43fc-8b44-ccbf78ce90c2
    ace50dd0-0d68-44ff-931a-63b670c7eed7
    f5561ba9-8f1e-40ca-9b5b-a0b3f719ef34
    91e4137f-95af-4bc9-97af-cdcedce21c8c
    adafb813-8b5c-473f-9de3-485b4ad5aa09
    c86d730b-300a-444c-a8c5-5312e7a93628
    edc4ce89-8903-4906-80b1-7440ad9a69c8
    9a5da798-adac-4c50-9c7e-79d9f92bd4c0
    4c672d35-0701-42b2-88c3-78380b0db560
    13257c82-e129-4f09-a733-2a7cb3102832
    f1592dee-67b6-4670-9062-649933011aa2
    a9b5fb07-92ff-493f-86fe-352a2803b3d0
    8adc2f3e-e343-4ef9-bf6c-275a8a2818ab
    50d5f7a9-8aed-4244-aea5-20a291951e93
    c1ec07d4-a6a8-4e42-b8c7-f0de89453007
    b364b1fd-e3d8-4d24-8c41-77a19604b00d
    7734ec9b-f8cb-44b2-9fac-3a502cb4f1bf
    

    Hope this helps someone! :D

    documentation 
    opened by Vinyzu 3
Releases(model)
Owner
You will enjoy a grander sight/ By climbing to a greater height.
Codebase for Inducing Causal Structure for Interpretable Neural Networks

Interchange Intervention Training (IIT) Codebase for Inducing Causal Structure for Interpretable Neural Networks Release Notes 12/01/2021: Code and Pa

Zen 6 Oct 10, 2022
PIXIE: Collaborative Regression of Expressive Bodies

PIXIE: Collaborative Regression of Expressive Bodies [Project Page] This is the official Pytorch implementation of PIXIE. PIXIE reconstructs an expres

Yao Feng 331 Jan 04, 2023
Replication Package for AequeVox:Automated Fariness Testing for Speech Recognition Systems

AequeVox Replication Package for AequeVox:Automated Fariness Testing for Speech Recognition Systems README under development. Python Packages Required

Sai Sathiesh 2 Aug 28, 2022
An educational AI robot based on NVIDIA Jetson Nano.

JetBot Looking for a quick way to get started with JetBot? Many third party kits are now available! JetBot is an open-source robot based on NVIDIA Jet

NVIDIA AI IOT 2.6k Dec 29, 2022
Official page of Struct-MDC (RA-L'22 with IROS'22 option); Depth completion from Visual-SLAM using point & line features

Struct-MDC (click the above buttons for redirection!) Official page of "Struct-MDC: Mesh-Refined Unsupervised Depth Completion Leveraging Structural R

Urban Robotics Lab. @ KAIST 37 Dec 22, 2022
Official code repository for A Simple Long-Tailed Rocognition Baseline via Vision-Language Model.

This is the official code repository for A Simple Long-Tailed Rocognition Baseline via Vision-Language Model.

peng gao 42 Nov 26, 2022
Python scripts for performing object detection with the 1000 labels of the ImageNet dataset in ONNX.

Python scripts for performing object detection with the 1000 labels of the ImageNet dataset in ONNX. The repository combines a class agnostic object localizer to first detect the objects in the image

Ibai Gorordo 24 Nov 14, 2022
Problem-943.-ACMP - Problem 943. ACMP

Problem-943.-ACMP В "main.py" расположен вариант моего решения задачи 943 с серв

Konstantin Dyomshin 2 Aug 19, 2022
This is the source code of the solver used to compete in the International Timetabling Competition 2019.

ITC2019 Solver This is the source code of the solver used to compete in the International Timetabling Competition 2019. Building .NET Core (2.1 or hig

Edon Gashi 8 Jan 22, 2022
Implementation of trRosetta and trDesign for Pytorch, made into a convenient package

trRosetta - Pytorch (wip) Implementation of trRosetta and trDesign for Pytorch, made into a convenient package

Phil Wang 67 Dec 17, 2022
Faster RCNN with PyTorch

Faster RCNN with PyTorch Note: I re-implemented faster rcnn in this project when I started learning PyTorch. Then I use PyTorch in all of my projects.

Long Chen 1.6k Dec 23, 2022
Improving XGBoost survival analysis with embeddings and debiased estimators

xgbse: XGBoost Survival Embeddings "There are two cultures in the use of statistical modeling to reach conclusions from data

Loft 242 Dec 30, 2022
[CVPR2021 Oral] End-to-End Video Instance Segmentation with Transformers

VisTR: End-to-End Video Instance Segmentation with Transformers This is the official implementation of the VisTR paper: Installation We provide instru

Yuqing Wang 687 Jan 07, 2023
Official implementation of NeuralFusion: Online Depth Map Fusion in Latent Space

NeuralFusion This is the official implementation of NeuralFusion: Online Depth Map Fusion in Latent Space. We provide code to train the proposed pipel

53 Jan 01, 2023
Boosted neural network for tabular data

XBNet - Xtremely Boosted Network Boosted neural network for tabular data XBNet is an open source project which is built with PyTorch which tries to co

Tushar Sarkar 175 Jan 04, 2023
Official implementation of "Synthetic Temporal Anomaly Guided End-to-End Video Anomaly Detection" (ICCV Workshops 2021: RSL-CV).

Official PyTorch implementation of "Synthetic Temporal Anomaly Guided End-to-End Video Anomaly Detection" This is the implementation of the paper "Syn

Marcella Astrid 11 Oct 07, 2022
Evaluation suite for large-scale language models.

This repo contains code for running the evaluations and reproducing the results from the Jurassic-1 Technical Paper (see blog post), with current support for running the tasks through both the AI21 S

71 Dec 17, 2022
High-Resolution Image Synthesis with Latent Diffusion Models

Latent Diffusion Models Requirements A suitable conda environment named ldm can be created and activated with: conda env create -f environment.yaml co

CompVis Heidelberg 5.6k Jan 04, 2023
OpenMMLab Detection Toolbox and Benchmark

MMDetection is an open source object detection toolbox based on PyTorch. It is a part of the OpenMMLab project.

OpenMMLab 22.5k Jan 05, 2023
Contrastive Learning of Structured World Models

Contrastive Learning of Structured World Models This repository contains the official PyTorch implementation of: Contrastive Learning of Structured Wo

Thomas Kipf 371 Jan 06, 2023