Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hcaptcha-solver

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hcaptcha-solver

A lightweight python library for solving hCaptcha challenges with selenium.

  • 0.2.14
  • PyPI
  • Socket score

Maintainers
1

hcaptcha-solver

PyPI - Status PyPI PyPI - Downloads

a lightweight Python library for solving hCaptcha challenges with selenium and neural networks

NOTE: this package is still in early development.
If you encounter any issues or unexpected behaviours, please report them!

Installation

pip install hcaptcha-solver

Usage

from hcaptcha_solver import hcaptcha_solver
from selenium import webdriver

# setup chromedriver in english (other languages not supported yet)
options = webdriver.ChromeOptions()
options.add_experimental_option('prefs', {'intl.accept_languages': 'en,en_US'})
driver = webdriver.Chrome(options=options)
driver.get("https://accounts.hcaptcha.com/demo") # open any url with hCaptcha

# create Captcha_Solver object and solve hCaptcha
captcha_solver = hcaptcha_solver.Captcha_Solver(verbose=True)
captcha_solver.is_captcha_present(driver) # returns True
captcha_solver.solve_captcha(driver) # solves the hCaptcha

Functionality

Only V1 hCaptchas are supported - any other captcha types will be skipped.
The correct images are selected using Convolutional Neural Networks trained on labeled hCaptcha data.
The models are chosen by inspecting the captcha header, so the language has to be english in order for the matching to work. (See Issue #6)

The package features models for a handful of hCaptcha tasks. The currently available models and their labeling accuracies are visualized in the figure below. The accuracy was measured on limited data and is therefore not exact.

Functionality for V2 captchas is planned in a similar way to V1 captchas.

Current Model Labeling Performance

Model Labeling Accuracy

Current Data Availability

Data Availability

Contributing

If you encounter any bug, error or unexpected behaviour in general, please report them with an issue giving as much detail as possible - I will try to make this package easy-to-use for everyone.

Forks and pull requests are very welcome. You can also create issues to discuss possible changes or improvements.

To help collecting captchas, run dev/main.ipynb and submit the results. In this notebook you can also explore the data availability and train models.

updated 15/08/2023

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc