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.
Evaluating Cross-lingual Sentence Representations

XNLI: The Cross-Lingual NLI Corpus XNLI is an evaluation corpus for language transfer and cross-lingual sentence classification in 15 languages. New:

Meta Research 395 Dec 19, 2022
HugsVision is a easy to use huggingface wrapper for state-of-the-art computer vision

HugsVision is an open-source and easy to use all-in-one huggingface wrapper for computer vision. The goal is to create a fast, flexible and user-frien

Labrak Yanis 166 Nov 27, 2022
Nest - A flexible tool for building and sharing deep learning modules

Nest - A flexible tool for building and sharing deep learning modules Nest is a flexible deep learning module manager, which aims at encouraging code

ZhouYanzhao 41 Oct 10, 2022
PyDeepFakeDet is an integrated and scalable tool for Deepfake detection.

PyDeepFakeDet An integrated and scalable library for Deepfake detection research. Introduction PyDeepFakeDet is an integrated and scalable Deepfake de

Junke, Wang 49 Dec 11, 2022
Collections for the lasted paper about multi-view clustering methods (papers, codes)

Multi-View Clustering Papers Collections for the lasted paper about multi-view clustering methods (papers, codes). There also exists some repositories

Andrew Guan 10 Sep 20, 2022
Extremely simple and fast extreme multi-class and multi-label classifiers.

napkinXC napkinXC is an extremely simple and fast library for extreme multi-class and multi-label classification, that focus of implementing various m

Marek Wydmuch 43 Nov 14, 2022
code for our BMVC 2021 paper "HCV: Hierarchy-Consistency Verification for Incremental Implicitly-Refined Classification"

HCV_IIRC code for our BMVC 2021 paper HCV: Hierarchy-Consistency Verification for Incremental Implicitly-Refined Classification by Kai Wang, Xialei Li

kai wang 13 Oct 03, 2022
Implementation of a protein autoregressive language model, but with autoregressive infilling objective (editing subsequences capability)

Protein GLM (wip) Implementation of a protein autoregressive language model, but with autoregressive infilling objective (editing subsequences capabil

Phil Wang 17 May 06, 2022
Neural Cellular Automata + CLIP

🧠 Text-2-Cellular Automata Using Neural Cellular Automata + OpenAI CLIP (Work in progress) Examples Text Prompt: Cthulu is watching cthulu_is_watchin

Mainak Deb 21 Dec 19, 2022
PyTorch implementation of the paper: Long-tail Learning via Logit Adjustment

logit-adj-pytorch PyTorch implementation of the paper: Long-tail Learning via Logit Adjustment This code implements the paper: Long-tail Learning via

Chamuditha Jayanga 53 Dec 23, 2022
Imaginaire - NVIDIA's Deep Imagination Team's PyTorch Library

Imaginaire Docs | License | Installation | Model Zoo Imaginaire is a pytorch library that contains optimized implementation of several image and video

NVIDIA Research Projects 3.6k Dec 29, 2022
Complete* list of autonomous driving related datasets

AD Datasets Complete* and curated list of autonomous driving related datasets Contributing Contributions are very welcome! To add or update a dataset:

Daniel Bogdoll 13 Dec 19, 2022
Here I will explain the flow to deploy your custom deep learning models on Ultra96V2.

Xilinx_Vitis_AI This repo will help you to Deploy your Deep Learning Model on Ultra96v2 Board. Prerequisites Vitis Core Development Kit 2019.2 This co

Amin Mamandipoor 1 Feb 08, 2022
Planner_backend - Academic planner application designed for students and counselors.

Planner (backend) Academic planner application designed for students and advisors.

2 Dec 31, 2021
Official Implement of CVPR 2021 paper “Cross-Modal Collaborative Representation Learning and a Large-Scale RGBT Benchmark for Crowd Counting”

RGBT Crowd Counting Lingbo Liu, Jiaqi Chen, Hefeng Wu, Guanbin Li, Chenglong Li, Liang Lin. "Cross-Modal Collaborative Representation Learning and a L

37 Dec 08, 2022
The Official PyTorch Implementation of DiscoBox.

DiscoBox: Weakly Supervised Instance Segmentation and Semantic Correspondence from Box Supervision Paper | Project page | Demo (Youtube) | Demo (Bilib

NVIDIA Research Projects 89 Jan 09, 2023
Pocsploit is a lightweight, flexible and novel open source poc verification framework

Pocsploit is a lightweight, flexible and novel open source poc verification framework

cckuailong 208 Dec 24, 2022
Interactive web apps created using geemap and streamlit

geemap-apps Introduction This repo demostrates how to build a multi-page Earth Engine App using streamlit and geemap. You can deploy the app on variou

Qiusheng Wu 27 Dec 23, 2022
The all new way to turn your boring vector meshes into the new fad in town; Voxels!

Voxelator The all new way to turn your boring vector meshes into the new fad in town; Voxels! Notes: I have not tested this on a rotated mesh. With fu

6 Feb 03, 2022
[CVPR'21] Learning to Recommend Frame for Interactive Video Object Segmentation in the Wild

IVOS-W Paper Learning to Recommend Frame for Interactive Video Object Segmentation in the Wild Zhaoyun Yin, Jia Zheng, Weixin Luo, Shenhan Qian, Hanli

SVIP Lab 38 Dec 12, 2022