Giter VIP home page Giter VIP logo

hcaptcha-challenger's Introduction

hCaptcha Challenger

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


Discord

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.

What's features

Challenge Type Pluggable Resource
image_label_binary ResNet ONNX classification #challenge
image_label_area_select: point YOLOv8 ONNX detection #588
image_label_area_select: bounding box YOLOv8 ONNX segmentation #592
image_label_multiple_choice ViT ONNX zero-shot motion #917
Advanced Task Pluggable Resource
Rank.Strategy #nested-model-zoo
self-supervised challenge #CLIP-ViT

Workflow

Tasks Resource
ci: sentinel hCAPTCHA Sentinel
ci: collector hCAPTCHA Collector
datasets: VCS, annoate #roboflow, #model-factory
model: ResNet - train / val Open In Colab
model: YOLOv8 - train / val Open In Colab
model: upload, upgrade #objects, #modelhub
datasets: public, archive #roboflow-universe, #captcha-datasets

Contributors

I would like to express my sincere gratitude to all the contributors.

What's next

  • Dislock, the most advanced Discord Browser Generator. Powered by hCaptcha Solving AI.
  • undetected-playwright, stash the fingerprint of playwright-based web agents.
  • epic-awesome-gamer, gracefully claim weekly free games from Epic Store.

Reference

hcaptcha-challenger's People

Contributors

beiyuouo avatar deepsourcebot avatar mohdrasbi avatar ndtrongvn avatar qin2dim avatar randrej avatar supahero1 avatar tarekwiz avatar vgabs avatar vinyzu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hcaptcha-challenger's Issues

[Question] No module named `webdriver_manager.utils`

hello there,
I just tried to use this, but got the following error messages
Is there any idea to solve this?
Thanks.

Traceback (most recent call last): File "main.py", line 8, in <module> from services.scaffold import Scaffold File "D:\PycharmProjects\pythonProject\hcaptcha-challenger-main\src\services\scaffold.py", line 8, in <module> from apis.scaffold import install, challenge File "D:\PycharmProjects\pythonProject\hcaptcha-challenger-main\src\apis\scaffold\install.py", line 11, in <module> from webdriver_manager.utils import get_browser_version_from_os ModuleNotFoundError: No module named 'webdriver_manager.utils'

[Question] Aiohttp ConnectionResetError

But i have this error all time
Thanks for all

I try use this command :

>python main.py demo --lang=en


2022-05-02 13:17:54 | INFO - Starting demo project...
2022-05-02 13:17:54 | DEBUG - 🎮 Activate challenger context
2022-05-02 13:17:57 | DEBUG - >> Challenge [ArmorCaptcha] Handle hCaptcha checkbox
2022-05-02 13:17:58 | DEBUG - >> Challenge [ArmorCaptcha] Get label - label=「airplane」
Task exception was never retrieved
future: <Task finished name='Task-5' coro=<AshFramework.launcher() done, defined at C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\utils\accelerator\core.py:49> exception=ClientConnectorError(ConnectionKey(host='imgs.hcaptcha.com', port=443, is_ssl=True, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))>
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 986, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1090, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1120, in _create_connection_transport
    await waiter
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\selector_events.py", line 853, in _read_ready__data_received
    data = self._sock.recv(self.max_size)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\utils\accelerator\core.py", line 53, in launcher
    await self.control_driver(context, session=session)
  File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\hcaptcha_challenger\core.py", line 272, in control_driver
    async with session.get(url) as response:
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 535, in _request
    conn = await self._connector.connect(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 542, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 907, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1206, in _create_direct_connection
    raise last_exc
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1175, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 992, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host imgs.hcaptcha.com:443 ssl:default [An existing connection was forcibly closed by the remote host]
Task exception was never retrieved
future: <Task finished name='Task-3' coro=<AshFramework.launcher() done, defined at C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\utils\accelerator\core.py:49> exception=ClientConnectorError(ConnectionKey(host='imgs.hcaptcha.com', port=443, is_ssl=True, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))>
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 986, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1090, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1120, in _create_connection_transport
    await waiter
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\selector_events.py", line 853, in _read_ready__data_received
    data = self._sock.recv(self.max_size)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\utils\accelerator\core.py", line 53, in launcher
    await self.control_driver(context, session=session)
  File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\hcaptcha_challenger\core.py", line 272, in control_driver
    async with session.get(url) as response:
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\client.py", line 535, in _request
    conn = await self._connector.connect(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 542, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 907, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1206, in _create_direct_connection
    raise last_exc
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 1175, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp\connector.py", line 992, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host imgs.hcaptcha.com:443 ssl:default [An existing connection was forcibly closed by the remote host]
2022-05-02 13:17:59 | DEBUG - >> Challenge [ArmorCaptcha] Download the challenge image
[EXIT] Press any key to exit...
2022-05-02 13:18:00 | ERROR - An error has been caught in function 'demo', process 'MainProcess' (1384), thread 'MainThread' (8236):
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\main.py", line 11, in <module>
    Fire(Scaffold)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\fire\core.py", line 141, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\fire\core.py", line 466, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\fire\core.py", line 681, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
> File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\scaffold.py", line 54, in demo
    challenge.runner(
  File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\apis\scaffold\challenge.py", line 50, in runner
    resp = challenger.anti_hcaptcha(ctx, dir_model=DIR_MODEL, onnx_prefix=onnx_prefix)
  File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\hcaptcha_challenger\core.py", line 503, in anti_hcaptcha
    self.challenge(ctx, model=model)
  File "C:\Users\Administrator\Desktop\hcaptcha2\hcaptcha-challenger\src\services\hcaptcha_challenger\core.py", line 320, in challenge
    with open(img_filepath, "rb") as file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Administrator\\Desktop\\hcaptcha2\\hcaptcha-challenger\\src\\database\\temp_cache\\_challenge\\1651493879_aeroplane\\Challenge Image 2.png'

[Question] About the model training code

This project is really useful, I want to retrain this yolov5 model to apply to my scenario, and I would be really appreciated it if you could publish your yolov5 training code.

[Invalid] Integrating to own code

Brief description

Related logger

Integrating to own code

I've looked through the whole READ.MD and other stuff, I still cannot find a way to integrate it to my own code.

我readme.妈的 已经看完了。但是还是没有告诉我怎么样才能弄到自己的代码里。大佬,需要指导

[Invalid] KeyError

Hi, I got a issue at line "model.solution(img_stream=data, label=self.label_alias[self.label])". It raised a exception with args is "KeyError:'train'". What is it mean ?

🥵 lol challenge

Perhaps the hcaptcha development team has been working on a blueprint for the next generation of human-machine challenges for some time, but either way, the current boring cat-and-mouse game will only make it more difficult for human visitors and won't do anything for the "smart" robot visitors.

This is actually very boring and even unchallenging.🥵

[Question] Add handling for seaplane

Hello, love your work. I've just ran into the following issue though:

When a seaplane is displayed the label returns None so it doesn't solve. If adding seaplane to the recognition is too time consuming or tricky, perhaps you could handle this by refreshing the capture window instead to get a new image?

I tried to grab images but it looks like only completed captchas are stored in temp_cache

Resp
Seaplane

feat(yanked): 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.

You can leave a message in the Discussions.

[Question] Support captcha_rqdata param?

Hey that AI solver support rqdata (hcaptcha enterprise) param? For example Discord giving it in that form:

{
   "captcha_key":[
      "You need to update your app to join this server."
   ],
   "captcha_sitekey":"a9b5fb07-92ff-493f-86fe-352a2803b3df",
   "captcha_service":"hcaptcha",
   "captcha_rqdata":"0Ji4wdKunnOywUKq5nv3KMJ6tqGH9wcWBl0Q0VM8VuvRIqcKk+SwA9vHPPUCePb/PUWD2YIDU/uucUImTNwL48p1YTzzdwTQXN9jg4pJ0e43EqFGSPC1KTdXS3oIu0sY6OBcxZft05er3eqeSSfUNfMZYeo8KIcOUcM7HX6r",
   "captcha_rqtoken":"IlpxMis0ZlNHdEJ3ZEZ4bUU4dFo4L3UwUFBQc1JhM1hoTUlDTTcxcGtaZkUxUU5XRzNEblZuL2ZwQ01mNjVRSExORVZxRVE9PXozeW1XYzhaQVBQV3g4dkci.Yk3_qw.t18rr3DCRCYfvQKxRlu73vrTQM8"
}

Best Regards

[Question] Error yolov5s6.onnx in function 'cv::dnn::dnn4_v20211220::ONNXImporter::ONNXImporter'

I'm facing the following problem when executing the code on another computer that I have, the error in which it was recorded in the logs is below

2022-06-06 22:47:58.433 | ERROR    | services.scaffold:demo:54 - An error has been caught in function 'demo', process 'MainProcess' (6140), thread 'MainThread' (10772):
Traceback (most recent call last):
  File "C:\Users\JUNIOR\Desktop\Divulgação\Nova pasta\Account Creator v3\src\main.py", line 24, in <module>
    Scaffold.demo()
> File "C:\Users\JUNIOR\Desktop\Divulgação\Nova pasta\Account Creator v3\src\services\scaffold.py", line 54, in demo
    challenge.runner(
  File "C:\Users\JUNIOR\Desktop\Divulgação\Nova pasta\Account Creator v3\src\apis\scaffold\challenge.py", line 77, in runner
    resp = challenger.anti_hcaptcha(ctx, dir_model=DIR_MODEL, onnx_prefix=onnx_prefix)
  File "C:\Users\JUNIOR\Desktop\Divulgação\Nova pasta\Account Creator v3\src\services\hcaptcha_challenger\core.py", line 505, in anti_hcaptcha
    self.challenge(ctx, model=model)
  File "C:\Users\JUNIOR\Desktop\Divulgação\Nova pasta\Account Creator v3\src\services\hcaptcha_challenger\core.py", line 327, in challenge
    result = model.solution(img_stream=data, label=self.label_alias[self.label])
  File "C:\Users\JUNIOR\Desktop\Divulgação\Nova pasta\Account Creator v3\src\services\hcaptcha_challenger\solutions\yolo.py", line 179, in solution
    labels = self.detect_common_objects(img_stream, confidence, nms_thresh)
  File "C:\Users\JUNIOR\Desktop\Divulgação\Nova pasta\Account Creator v3\src\services\hcaptcha_challenger\solutions\yolo.py", line 145, in detect_common_objects
    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:194: error: (-5:Bad argument) Can't read ONNX file: C:\Users\JUNIOR\Desktop\Divulgação\Nova pasta\Account Creator v3\src\model\yolov5s6.onnx in function 'cv::dnn::dnn4_v20211220::ONNXImporter::ONNXImporter'

[Question] `seaplane` challenge | EN |

2022-03-22 03:55:45 | DEBUG - >> Challenge [ArmorCaptcha] Avoiding the unmanageable challenge - label=seaplane

hCaptcha updated new images "seaplane" how can I manually add this?

[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

[Question] RuntimeError: This event loop is already running

anti-checkbox works fine, scaffold.demo and test doesnt work either, only clicks on checkbox, detects target object and done
following error occured:
image
checked all dependencies, tried everything, but code-comments in chinese is too hard for me :( better learn it by now

feat(add): `i18n` challenge | en

Last modified time

2022-03-08 06:30

Prompt message

<!--truck-->
Please click each image containing a truck
<!--boat-->
Please click each image containing a boat
<!--bicycle-->
Please click each image containing a bicycle
<!--train-->
Please click each image containing a train
<!--seaplane-->
Please click each image containing a seaplane
<!--aeroplane-->
Please click each image containing an airplane
<!--bus-->
Please click each image containing a motorbus
<!--motorbike-->
Please click each image containing a motorcycle
<!--vertical river-->
Please click each image containing a vertical river
<!--airplane in the sky flying left-->
Please click each image containing an airplane in the sky flying left

Label alias

label_alias = {
    "airplane": "aeroplane",
    "аirplane": "aeroplane",
    "motorbus": "bus",
    "mοtorbus": "bus",
    "truck": "truck",
    "truсk": "truck",
    "motorcycle": "motorbike",
    "boat": "boat",
    "bicycle": "bicycle",
    "train": "train",
    "vertical river": "vertical river",
    "airplane in the sky flying left": "airplane in the sky flying left",
}

Split function

labels_mirror = {
    "en": re.split(r"containing a", label_obj.text)[-1][1:].strip(),
}
label = labels_mirror[langName]

Not solving captchas

The code was working correctly for more than 4 days but now in the night period the same, it is no longer solving the captchas. It is loading everything in the right way but it is not selecting any image to try to solve it right after it resets the page and tries again and stays in this loop

2022-06-03 21:13:51.793 | DEBUG    | services.utils.toolbox.toolbox:get_challenge_ctx:93 - 🎮 Activate challenger context
2022-06-03 21:13:56.835 | DEBUG    | services.hcaptcha_challenger.core:log:143 - >> Challenge [ArmorCaptcha] Handle hCaptcha checkbox
2022-06-03 21:14:04.361 | DEBUG    | services.hcaptcha_challenger.core:log:143 - >> Challenge [ArmorCaptcha] Handle hCaptcha checkbox
2022-06-03 21:14:12.371 | DEBUG    | services.hcaptcha_challenger.core:log:143 - >> Challenge [ArmorCaptcha] Handle hCaptcha checkbox
2022-06-03 21:14:21.169 | DEBUG    | services.hcaptcha_challenger.core:log:143 - >> Challenge [ArmorCaptcha] Handle hCaptcha checkbox
2022-06-03 21:14:31.590 | DEBUG    | services.hcaptcha_challenger.core:log:143 - >> Challenge [ArmorCaptcha] Handle hCaptcha checkbox
2022-06-03 21:14:55.450 | DEBUG    | services.utils.toolbox.toolbox:get_challenge_ctx:93 - 🎮 Activate challenger context

[Question] About the `next step`

Recently I have received many letters from developers. I apologize in advance for not responding in time.

💖 So here is a unified reply

I'd like to talk about my initial reason for doing this project. As you have seen in the wiki documentation, the project's scaffold interface is named demo. Yes, I started out to build a shelf to demonstrate this solution, with the fundamental goal of providing a more visual way to demonstrate its speed and pass rate. However, it is clear that people are more concerned about whether they can obtain effective TOKEN after solving the hCaptcha challenge. Or how to embed this solution in 「my」project.

I honestly didn't expect so many people to follow this project, so obviously the portability of this project is very poor at the moment, especially across development languages.

If you've been following my recent work, you'll see that I've been using hcapotcha-challegner in the epic-awesome-gamer to handle hCaptcha, and it works perfectly on all major operating systems. So I can understand how developers in various fields need a solution to handle the human-machine challenge.Especially the open source free:)

TL;DR

so, about the next step. I will continue to refactor this project until it meets the needs of some Python developers. Then, I hope it can be ported to various technology stacks.

As of now, the barrier to entry is extremely high for developers not familiar with python or automation testing (selenium). So I also intend to be requirements-oriented and adapt the technical model of this project so that it can be called in a simpler way.

Finally. My ability is limited, so please correct me if there are any errors or omissions in communication or development.

Have fun~🕶

[Question] error occured after downloaded the challenge image

Traceback (most recent call last):
  File "C:\Users\GIGABYTE\Desktop\py1\hcaptcha-challenger-main\src\main.py", line 11, in <module>
    Fire(Scaffold)
  File "C:\Users\GIGABYTE\AppData\Local\Programs\Python\Python39\lib\site-packages\fire\core.py", line 141, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "C:\Users\GIGABYTE\AppData\Local\Programs\Python\Python39\lib\site-packages\fire\core.py", line 466, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "C:\Users\GIGABYTE\AppData\Local\Programs\Python\Python39\lib\site-packages\fire\core.py", line 681, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
> File "C:\Users\GIGABYTE\Desktop\py1\hcaptcha-challenger-main\src\services\scaffold.py", line 54, in demo
    challenge.runner(
  File "C:\Users\GIGABYTE\Desktop\py1\hcaptcha-challenger-main\src\apis\scaffold\challenge.py", line 49, in runner
    resp = challenger.anti_hcaptcha(ctx, dir_model=DIR_MODEL, onnx_prefix=onnx_prefix)
  File "C:\Users\GIGABYTE\Desktop\py1\hcaptcha-challenger-main\src\services\hcaptcha_challenger\core.py", line 505, in anti_hcaptcha
    self.challenge(ctx, model=model)
  File "C:\Users\GIGABYTE\Desktop\py1\hcaptcha-challenger-main\src\services\hcaptcha_challenger\core.py", line 327, in challenge
    result = model.solution(img_stream=data, label=self.label_alias[self.label])
  File "C:\Users\GIGABYTE\Desktop\py1\hcaptcha-challenger-main\src\services\hcaptcha_challenger\solutions\yolo.py", line
 190, in solution
    labels = self.detect_common_objects(img, confidence, nms_thresh)
  File "C:\Users\GIGABYTE\Desktop\py1\hcaptcha-challenger-main\src\services\hcaptcha_challenger\solutions\yolo.py", line
 144, in detect_common_objects
    net = cv2.dnn.readNetFromONNX(self.onnx_model["path"])
cv2.error: OpenCV(4.4.0) D:\Build\OpenCV\opencv-4.4.0\modules\dnn\src\onnx\onnx_importer.cpp:1410: error: (-2:Unspecified error) in function 'void __cdecl cv::dnn::dnn4_v20200609::ONNXImporter::populateNet(class cv::dnn::dnn4_v20200609::Net)'
>  (expected: 'shapes.depth() == CV_32S'), where
>     'shapes.depth()' is 5 (CV_32FC1)
> must be equal to
>     'CV_32S' is 4 (CV_32SC1)

how to solve it?

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.

[Question] Got "attempt to get argmax of an empty sequence" when solving on discord

Traceback

Traceback (most recent call last):
  File "E:\hcaptcha\services\hcaptcha_challenger\core.py", line 507, in anti_hcaptcha        
    self.challenge(ctx, model=model)
  File "E:\hcaptcha\services\hcaptcha_challenger\core.py", line 327, in challenge
    result = model.solution(img_stream=data, label=self.label_alias[self.label])
  File "E:\hcaptcha\services\hcaptcha_challenger\solutions\yolo.py", line 190, in solution   
    labels = self.detect_common_objects(img, confidence, nms_thresh)
  File "E:\hcaptcha\services\hcaptcha_challenger\solutions\yolo.py", line 157, in detect_common_objects
    class_id = np.argmax(scores)
  File "<__array_function__ internals>", line 180, in argmax
  File "C:\Users\Four\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\core\fromnumeric.py", line 1216, in argmax
    return _wrapfunc(a, 'argmax', axis=axis, out=out, **kwds)
  File "C:\Users\Four\AppData\Local\Programs\Python\Python310\lib\site-packages\numpy\core\fromnumeric.py", line 57, in _wrapfunc
    return bound(*args, **kwds)
ValueError: attempt to get argmax of an empty sequence

Can you tell me what is that mean ?

[Question]Selenium

Hi 你好,想问一下如果我想把你的hcaptcha-challenger放进我的selenium的script的话,我该怎么样做?因为我试了放那个challenge.py进去但是一到hcaptcha出现的那一页好像没在solve那个hcaptcha

feat(preview): `i18n` challenger

Preview

I will support the i18n challenge in the next release. But each language has a different dependency syntax, and I wish more players would get involved.

The main work consisted in writing the split function and the label_alias dictionary. #2

It is worth mentioning that i18n is a pseudo requirement in this project. Opening a challenge in either language does not affect the workflow of the program. Even in some languages the dependency syntax is so complex that challenge labels cannot be separated in an elegant way. This feature is only for players to better understand the execution logic of the project, otherwise you can just start the project with the default zh.

Issue Template

  • You can submit an issue using the template by clicking 「New issue」.

  • You can see the use cases we wrote. #14

Just do it

You can launch the specified type of challenge by visiting the following link directly.

[Question] AttributeError: has no attribute 'YOLOAirplane'

When running the project today I come across the following error in the logs. Previously it was solving all captchas correctly but now all it does is return the following error and it doesn't solve anything

2022-06-05 13:47:10.452 | DEBUG    | services.utils.toolbox.toolbox:get_challenge_ctx:93 - 🎮 Activate challenger context
2022-06-05 13:47:15.540 | DEBUG    | services.hcaptcha_challenger.core:log:143 - >> Challenge [ArmorCaptcha] Handle hCaptcha checkbox
2022-06-05 13:47:18.788 | DEBUG    | services.hcaptcha_challenger.core:log:143 - >> Challenge [ArmorCaptcha] Get label - label=「飞机」
2022-06-05 13:47:22.069 | DEBUG    | services.hcaptcha_challenger.core:log:143 - >> Challenge [ArmorCaptcha] Download the challenge image
2022-06-05 13:47:25.670 | ERROR    | services.scaffold:demo:54 - An error has been caught in function 'demo', process 'MainProcess' (25436), thread 'MainThread' (8040):
Traceback (most recent call last):
  File "C:\Users\felip\Desktop\Account Creator v3\src\main.py", line 24, in <module>
    Scaffold.demo()
> File "C:\Users\felip\Desktop\Account Creator v3\src\services\scaffold.py", line 54, in demo
    challenge.runner(
  File "C:\Users\felip\Desktop\Account Creator v3\src\apis\scaffold\challenge.py", line 77, in runner
    resp = challenger.anti_hcaptcha(ctx, dir_model=DIR_MODEL, onnx_prefix=onnx_prefix)
  File "C:\Users\felip\Desktop\Account Creator v3\src\services\hcaptcha_challenger\core.py", line 502, in anti_hcaptcha
    model = self.switch_solution(dir_model, onnx_prefix)
  File "C:\Users\felip\Desktop\Account Creator v3\src\services\hcaptcha_challenger\core.py", line 206, in switch_solution
    return yolo.YOLOAirplane(dir_model, onnx_prefix, path_rainbow=PATH_RAINBOW)
AttributeError: module 'services.hcaptcha_challenger.solutions.yolo' has no attribute 'YOLOAirplane'
2022-06-05 13:47:27.085 | DEBUG    | services.utils.toolbox.toolbox:get_challenge_ctx:93 - 🎮 Activate challenger context

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.