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.
Accelerate Neural Net Training by Progressively Freezing Layers

FreezeOut A simple technique to accelerate neural net training by progressively freezing layers. This repository contains code for the extended abstra

Andy Brock 203 Jun 19, 2022
CFC-Net: A Critical Feature Capturing Network for Arbitrary-Oriented Object Detection in Remote Sensing Images

CFC-Net This project hosts the official implementation for the paper: CFC-Net: A Critical Feature Capturing Network for Arbitrary-Oriented Object Dete

ming71 55 Dec 12, 2022
The PyTorch implementation of Directed Graph Contrastive Learning (DiGCL), NeurIPS-2021

Directed Graph Contrastive Learning Paper | Poster | Supplementary The PyTorch implementation of Directed Graph Contrastive Learning (DiGCL). In this

Tong Zekun 28 Jan 08, 2023
🔮 A refreshing functional take on deep learning, compatible with your favorite libraries

Thinc: A refreshing functional take on deep learning, compatible with your favorite libraries From the makers of spaCy, Prodigy and FastAPI Thinc is a

Explosion 2.6k Dec 30, 2022
Scheme for training and applying a label propagation framework

Factorisation-based Image Labelling Overview This is a scheme for training and applying the factorisation-based image labelling (FIL) framework. Some

Wellcome Centre for Human Neuroimaging 2 Dec 17, 2021
Mitsuba 2: A Retargetable Forward and Inverse Renderer

Mitsuba Renderer 2 Documentation Mitsuba 2 is a research-oriented rendering system written in portable C++17. It consists of a small set of core libra

Mitsuba Physically Based Renderer 2k Jan 07, 2023
An alarm clock coded in Python 3 with Tkinter

Tkinter-Alarm-Clock An alarm clock coded in Python 3 with Tkinter. Run python3 Tkinter Alarm Clock.py in a terminal if you have Python 3. NOTE: This p

CodeMaster7000 1 Dec 25, 2021
Implementation of "Bidirectional Projection Network for Cross Dimension Scene Understanding" CVPR 2021 (Oral)

Bidirectional Projection Network for Cross Dimension Scene Understanding CVPR 2021 (Oral) [ Project Webpage ] [ arXiv ] [ Video ] Existing segmentatio

Hu Wenbo 135 Dec 26, 2022
Simple torch.nn.module implementation of Alias-Free-GAN style filter and resample

Alias-Free-Torch Simple torch module implementation of Alias-Free GAN. This repository including Alias-Free GAN style lowpass sinc filter @filter.py A

이준혁(Junhyeok Lee) 64 Dec 22, 2022
Official Pytorch implementation of Meta Internal Learning

Official Pytorch implementation of Meta Internal Learning

10 Aug 24, 2022
Code for the paper "Controllable Video Captioning with an Exemplar Sentence"

SMCG Code for the paper "Controllable Video Captioning with an Exemplar Sentence" Introduction We investigate a novel and challenging task, namely con

10 Dec 04, 2022
Learning Domain Invariant Representations in Goal-conditioned Block MDPs

Learning Domain Invariant Representations in Goal-conditioned Block MDPs Beining Han, Chongyi Zheng, Harris Chan, Keiran Paster, Michael R. Zhang, Jim

Chongyi Zheng 3 Apr 12, 2022
Long Expressive Memory (LEM)

Long Expressive Memory for Sequence Modeling This repository contains the implementation to reproduce the numerical experiments of the paper Long Expr

Konstantin Rusch 47 Dec 17, 2022
This is official implementaion of paper "Token Shift Transformer for Video Classification".

This is official implementaion of paper "Token Shift Transformer for Video Classification". We achieve SOTA performance 80.40% on Kinetics-400 val. Paper link

VideoNet 60 Dec 30, 2022
Starter code for the ICCV 2021 paper, 'Detecting Invisible People'

Detecting Invisible People [ICCV 2021 Paper] [Website] Tarasha Khurana, Achal Dave, Deva Ramanan Introduction This repository contains code for Detect

Tarasha Khurana 28 Sep 16, 2022
Using contrastive learning and OpenAI's CLIP to find good embeddings for images with lossy transformations

The official code for the paper "Inverse Problems Leveraging Pre-trained Contrastive Representations" (to appear in NeurIPS 2021).

Sriram Ravula 26 Dec 10, 2022
Public implementation of the Convolutional Motif Kernel Network (CMKN) architecture

CMKN Implementation of the convolutional motif kernel network (CMKN) introduced in Ditz et al., "Convolutional Motif Kernel Network", 2021. Testing Yo

1 Nov 17, 2021
Algorithmic trading with deep learning experiments

Deep-Trading Algorithmic trading with deep learning experiments. Now released part one - simple time series forecasting. I plan to implement more soph

Alex Honchar 1.4k Jan 02, 2023
LIMEcraft: Handcrafted superpixel selectionand inspection for Visual eXplanations

LIMEcraft LIMEcraft: Handcrafted superpixel selectionand inspection for Visual eXplanations The LIMEcraft algorithm is an explanatory method based on

MI^2 DataLab 4 Aug 01, 2022
This repository contains a Ruby API for utilizing TensorFlow.

tensorflow.rb Description This repository contains a Ruby API for utilizing TensorFlow. Linux CPU Linux GPU PIP Mac OS CPU Not Configured Not Configur

somatic labs 825 Dec 26, 2022