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.
The official implementation of NeurIPS 2021 paper: Finding Optimal Tangent Points for Reducing Distortions of Hard-label Attacks

The official implementation of NeurIPS 2021 paper: Finding Optimal Tangent Points for Reducing Distortions of Hard-label Attacks

machen 11 Nov 27, 2022
Deep learning for spiking neural networks

A deep learning library for spiking neural networks. Norse aims to exploit the advantages of bio-inspired neural components, which are sparse and even

Electronic Vision(s) Group — BrainScaleS Neuromorphic Hardware 59 Nov 28, 2022
Unofficial implementation of Alias-Free Generative Adversarial Networks. (https://arxiv.org/abs/2106.12423) in PyTorch

alias-free-gan-pytorch Unofficial implementation of Alias-Free Generative Adversarial Networks. (https://arxiv.org/abs/2106.12423) This implementation

Kim Seonghyeon 502 Jan 03, 2023
🐤 Nix-TTS: An Incredibly Lightweight End-to-End Text-to-Speech Model via Non End-to-End Distillation

🐤 Nix-TTS An Incredibly Lightweight End-to-End Text-to-Speech Model via Non End-to-End Distillation Rendi Chevi, Radityo Eko Prasojo, Alham Fikri Aji

Rendi Chevi 156 Jan 09, 2023
Softlearning is a reinforcement learning framework for training maximum entropy policies in continuous domains. Includes the official implementation of the Soft Actor-Critic algorithm.

Softlearning Softlearning is a deep reinforcement learning toolbox for training maximum entropy policies in continuous domains. The implementation is

Robotic AI & Learning Lab Berkeley 997 Dec 30, 2022
Unofficial TensorFlow implementation of the Keyword Spotting Transformer model

Keyword Spotting Transformer This is the unofficial TensorFlow implementation of the Keyword Spotting Transformer model. This model is used to train o

Intelligent Machines Limited 8 May 11, 2022
A torch implementation of "Pixel-Level Domain Transfer"

Pixel Level Domain Transfer A torch implementation of "Pixel-Level Domain Transfer". based on dcgan.torch. Dataset The dataset used is "LookBook", fro

Fei Xia 260 Sep 02, 2022
Pytorch implementation of Supporting Clustering with Contrastive Learning, NAACL 2021

Supporting Clustering with Contrastive Learning SCCL (NAACL 2021) Dejiao Zhang, Feng Nan, Xiaokai Wei, Shangwen Li, Henghui Zhu, Kathleen McKeown, Ram

231 Jan 05, 2023
Large scale embeddings on a single machine.

Marius Marius is a system under active development for training embeddings for large-scale graphs on a single machine. Training on large scale graphs

Marius 107 Jan 03, 2023
Official code for MPG2: Multi-attribute Pizza Generator: Cross-domain Attribute Control with Conditional StyleGAN

This is the official code for Multi-attribute Pizza Generator (MPG2): Cross-domain Attribute Control with Conditional StyleGAN. Paper Demo Setup Envir

Fangda Han 5 Sep 01, 2022
CT Based COVID 19 Diagnose by Image Processing and Deep Learning

This project proposed the deep learning and image processing method to undertake the diagnosis on 2D CT image and 3D CT volume.

1 Feb 08, 2022
Implement A3C for Mujoco gym envs

pytorch-a3c-mujoco Disclaimer: my implementation right now is unstable (you ca refer to the learning curve below), I'm not sure if it's my problems. A

Andrew 70 Dec 12, 2022
For medical image segmentation

LeViT_UNet For medical image segmentation Our model is based on LeViT (https://github.com/facebookresearch/LeViT). You'd better gitclone its codes. Th

13 Dec 24, 2022
CoANet: Connectivity Attention Network for Road Extraction From Satellite Imagery

CoANet: Connectivity Attention Network for Road Extraction From Satellite Imagery This paper (CoANet) has been published in IEEE TIP 2021. This code i

Jie Mei 53 Dec 03, 2022
Repository for the "Gotta Go Fast When Generating Data with Score-Based Models" paper

Gotta Go Fast When Generating Data with Score-Based Models This repo contains the official implementation for the paper Gotta Go Fast When Generating

Alexia Jolicoeur-Martineau 89 Nov 09, 2022
An pytorch implementation of Masked Autoencoders Are Scalable Vision Learners

An pytorch implementation of Masked Autoencoders Are Scalable Vision Learners This is a coarse version for MAE, only make the pretrain model, the fine

FlyEgle 214 Dec 29, 2022
A library for using chemistry in your applications

Chemistry in python Resources Used The following items are not made by me! Click the words to go to the original source Periodic Tab Json - Used in -

Tech Penguin 28 Dec 17, 2021
YOLOX is a high-performance anchor-free YOLO, exceeding yolov3~v5 with ONNX, TensorRT, ncnn, and OpenVINO supported.

Introduction YOLOX is an anchor-free version of YOLO, with a simpler design but better performance! It aims to bridge the gap between research and ind

7.7k Jan 03, 2023
Official PyTorch implementation of StyleGAN3

Modified StyleGAN3 Repo Changes Made tied to python 3.7 syntax .jpgs instead of .pngs for training sample seeds to recreate the 1024 training grid wit

Derrick Schultz (he/him) 83 Dec 15, 2022
Codes for the AAAI'22 paper "TransZero: Attribute-guided Transformer for Zero-Shot Learning"

TransZero [arXiv] This repository contains the testing code for the paper "TransZero: Attribute-guided Transformer for Zero-Shot Learning" accepted to

Shiming Chen 52 Jan 01, 2023