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.
null
Xview3 solution - XView3 challenge, 2nd place solution

Xview3, 2nd place solution https://iuu.xview.us/ test split aggregate score publ

Selim Seferbekov 24 Nov 23, 2022
🍅🍅🍅YOLOv5-Lite: lighter, faster and easier to deploy. Evolved from yolov5 and the size of model is only 1.7M (int8) and 3.3M (fp16). It can reach 10+ FPS on the Raspberry Pi 4B when the input size is 320×320~

YOLOv5-Lite:lighter, faster and easier to deploy Perform a series of ablation experiments on yolov5 to make it lighter (smaller Flops, lower memory, a

pogg 1.5k Jan 5, 2023
TPH-YOLOv5: Improved YOLOv5 Based on Transformer Prediction Head for Object Detection on Drone-Captured Scenarios

TPH-YOLOv5 This repo is the implementation of "TPH-YOLOv5: Improved YOLOv5 Based on Transformer Prediction Head for Object Detection on Drone-Captured

cv516Buaa 439 Dec 22, 2022
Multi-task yolov5 with detection and segmentation based on yolov5

YOLOv5DS Multi-task yolov5 with detection and segmentation based on yolov5(branch v6.0) decoupled head anchor free segmentation head README中文 Ablation

null 150 Dec 30, 2022
Yolov5-lite - Minimal PyTorch implementation of YOLOv5

Yolov5-Lite: Minimal YOLOv5 + Deep Sort Overview This repo is a shortened versio

Kadir Nar 57 Nov 28, 2022
YOLOv5 in PyTorch > ONNX > CoreML > TFLite

This repository represents Ultralytics open-source research into future object detection methods, and incorporates lessons learned and best practices evolved over thousands of hours of training and evolution on anonymized client datasets. All code and models are under active development, and are subject to modification or deletion without notice.

Ultralytics 34.1k Dec 31, 2022
🍷 Gracefully claim weekly free games and monthly content from Epic Store.

EPIC 免费人 ?? 优雅地领取 Epic 免费游戏 Introduction ?? Epic AwesomeGamer 帮助玩家优雅地领取 Epic 免费游戏。 使用 「Epic免费人」可以实现如下需求: get:搬空游戏商店,获取所有常驻免费游戏与免费附加内容; claim:领取周免游戏及其免

null 571 Dec 28, 2022
ONNX Runtime Web demo is an interactive demo portal showing real use cases running ONNX Runtime Web in VueJS.

ONNX Runtime Web demo is an interactive demo portal showing real use cases running ONNX Runtime Web in VueJS. It currently supports four examples for you to quickly experience the power of ONNX Runtime Web.

Microsoft 58 Dec 18, 2022
An executor that loads ONNX models and embeds documents using the ONNX runtime.

ONNXEncoder An executor that loads ONNX models and embeds documents using the ONNX runtime. Usage via Docker image (recommended) from jina import Flow

Jina AI 2 Mar 15, 2022
ONNX-GLPDepth - Python scripts for performing monocular depth estimation using the GLPDepth model in ONNX

ONNX-GLPDepth - Python scripts for performing monocular depth estimation using the GLPDepth model in ONNX

Ibai Gorordo 18 Nov 6, 2022
ONNX-PackNet-SfM: Python scripts for performing monocular depth estimation using the PackNet-SfM model in ONNX

Python scripts for performing monocular depth estimation using the PackNet-SfM model in ONNX

Ibai Gorordo 14 Dec 9, 2022
A very simple tool for situations where optimization with onnx-simplifier would exceed the Protocol Buffers upper file size limit of 2GB, or simply to separate onnx files to any size you want.

sne4onnx A very simple tool for situations where optimization with onnx-simplifier would exceed the Protocol Buffers upper file size limit of 2GB, or

Katsuya Hyodo 10 Aug 30, 2022
Simple ONNX operation generator. Simple Operation Generator for ONNX.

sog4onnx Simple ONNX operation generator. Simple Operation Generator for ONNX. https://github.com/PINTO0309/simple-onnx-processing-tools Key concept V

Katsuya Hyodo 6 May 15, 2022
A very simple tool to rewrite parameters such as attributes and constants for OPs in ONNX models. Simple Attribute and Constant Modifier for ONNX.

sam4onnx A very simple tool to rewrite parameters such as attributes and constants for OPs in ONNX models. Simple Attribute and Constant Modifier for

Katsuya Hyodo 6 May 15, 2022
Simple tool to combine(merge) onnx models. Simple Network Combine Tool for ONNX.

snc4onnx Simple tool to combine(merge) onnx models. Simple Network Combine Tool for ONNX. https://github.com/PINTO0309/simple-onnx-processing-tools 1.

Katsuya Hyodo 8 Oct 13, 2022
Very simple NCHW and NHWC conversion tool for ONNX. Change to the specified input order for each and every input OP. Also, change the channel order of RGB and BGR. Simple Channel Converter for ONNX.

scc4onnx Very simple NCHW and NHWC conversion tool for ONNX. Change to the specified input order for each and every input OP. Also, change the channel

Katsuya Hyodo 16 Dec 22, 2022
End-to-end face detection, cropping, norm estimation, and landmark detection in a single onnx model

onnx-facial-lmk-detector End-to-end face detection, cropping, norm estimation, and landmark detection in a single onnx model, model.onnx. Demo You can

atksh 42 Dec 30, 2022
Code for 1st place solution in Sleep AI Challenge SNU Hospital

Sleep AI Challenge SNU Hospital 2021 Code for 1st place solution for Sleep AI Challenge (Note that the code is not fully organized) Refer to the notio

Saewon Yang 13 Jan 3, 2022