# Recaptcha Cracker
[![Github release](https://img.shields.io/github/v/release/wipodev/Recaptcha_Cracker?color=0172ad&logo=github&logoColor=white)](https://github.com/wipodev/Recaptcha_Cracker/releases/latest)
[![PyPI - Version](https://img.shields.io/pypi/v/Recaptcha_Cracker?label=pypi%20release&color=0172ad)](https://pypi.org/project/Recaptcha_Cracker/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/Recaptcha_Cracker?color=0172ad&label=pypi%20downloads)](https://pypi.org/project/Recaptcha_Cracker/)
[![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/wipodev/Recaptcha_Cracker/total?color=0172ad&label=github%20downloads)](https://github.com/wipodev/Recaptcha_Cracker)
[![License](https://img.shields.io/badge/license-MIT-%230172ad)](https://github.com/wipodev/Recaptcha_Cracker/blob/master/LICENSE)
## Description
RecaptchaCracker is a tool designed to automate the resolution of Captchas on web pages using Seleniumbase.
It allows you to solve "reCaptcha v2" captchas using audio transcription, making it easy to integrate into web automation workflows.
## Features
- Automated resolution of reCAPTCHA V2 captchas on web pages.
- Automated resolution of text captchas on web pages.
- Flexible configuration of the number of attempts to solve audio captchas.
- Easy integration into web automation workflows.
## Requirements
- Python 3.10+
- Seleniumbase
- Pydub
- SpeechRecognition
- easyocr
- requests
- opencv
- verbose-terminal
> [!IMPORTANT]
> If you're getting an error related to FFmpeg not being installed or in your PATH, get it here: https://ffmpeg.org/download.html
> If the error persists, make sure FFmpeg is properly installed for your OS and in your PATH.
## Installation
```bash
pip install recaptcha-cracker
```
## Usage
### Resolving reCAPTCHA V2
1. Import the necessary class to your Python script:
```python
from recaptcha_cracker import RecaptchaV2
```
2. Initialize a RecaptchaV2 object with a SeleniumBase Driver object:
```python
from seleniumbase import Driver
# Inicializa el objeto Driver
driver = Driver()
# Carga la página web
driver.get("https://www.google.com/recaptcha/api2/demo")
# Inicializa el objeto RecaptchaV2
recaptcha = RecaptchaV2(driver)
```
3. Use the cracker() method to resolve a reCAPTCHA on a web page:
```python
checked_status = recaptcha.cracker(selector='//*[@id="recaptcha-demo"]/div/div/iframe')
```
4. If the reCAPTCHA is successfully resolved, the method will return True. Otherwise, it will return False.
### Resolving text captchas
1. Import the necessary class to your Python script:
```python
from recaptcha_cracker import TextCaptcha
```
2. Initialize a TextCaptcha object:
```python
text_captcha = TextCaptcha(image_path='captcha.png', session=None, processing=True, kernel=(2, 2), verbose=True)
```
3. Use the `download_and_read_image` method to download and read a captcha image from a URL:
```python
captcha_text = text_captcha.download_and_read_image(url='https://example.com/captcha.png')
```
4. Use the `decode_and_read_image` method to decode and read a base64 encoded captcha image:
```python
base64_image = 'data:image/png;base64,...'
captcha_text = text_captcha.decode_and_read_image(base64_image=base64_image)
```
5. Use the `capture_and_read_image` method to capture and read a captcha image from a web page element:
```python
captcha_text = text_captcha.capture_and_read_image(driver, element='//img[@id="captcha_image"]')
```
6. The methods return the decoded captcha text if successful, or None if there was an error.
## Contributions
If you'd like to contribute, please see the [CONTRIBUTING.md](CONTRIBUTING.md) file.
## License
This project is under the MIT License. See the [LICENSE](https://github.com/wipodev/Recaptcha_Cracker/blob/main/LICENSE) file for more details.
## Inspiration
This project was inspired by the project https://github.com/thicccat688/selenium-recaptcha-solver, created by user "thicccat688". The original library provides a robust solution to solve reCAPTCHA v2 challenges using Selenium and speech recognition services. By studying its implementation and design, I was able to better understand how to address captcha resolution challenges in web automation environments.
I thank the team behind selenium-recaptcha-solver for their excellent work and contributions to the open source community.
---
Raw data
{
"_id": null,
"home_page": "https://github.com/wipodev/Recaptcha_Cracker",
"name": "recaptcha-cracker",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "python, captcha, speech recognition, selenium, web automation, recaptcha",
"author": "Wipodev",
"author_email": "ajwipo@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/39/2b/bba2a11ad377248939b896f6a3f27611ffb4638c56a56ef0e4281e69af0d/recaptcha_cracker-0.2.1.tar.gz",
"platform": null,
"description": "# Recaptcha Cracker\r\n\r\n[![Github release](https://img.shields.io/github/v/release/wipodev/Recaptcha_Cracker?color=0172ad&logo=github&logoColor=white)](https://github.com/wipodev/Recaptcha_Cracker/releases/latest)\r\n[![PyPI - Version](https://img.shields.io/pypi/v/Recaptcha_Cracker?label=pypi%20release&color=0172ad)](https://pypi.org/project/Recaptcha_Cracker/)\r\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/Recaptcha_Cracker?color=0172ad&label=pypi%20downloads)](https://pypi.org/project/Recaptcha_Cracker/)\r\n[![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/wipodev/Recaptcha_Cracker/total?color=0172ad&label=github%20downloads)](https://github.com/wipodev/Recaptcha_Cracker)\r\n[![License](https://img.shields.io/badge/license-MIT-%230172ad)](https://github.com/wipodev/Recaptcha_Cracker/blob/master/LICENSE)\r\n\r\n## Description\r\n\r\nRecaptchaCracker is a tool designed to automate the resolution of Captchas on web pages using Seleniumbase.\r\nIt allows you to solve \"reCaptcha v2\" captchas using audio transcription, making it easy to integrate into web automation workflows.\r\n\r\n## Features\r\n\r\n- Automated resolution of reCAPTCHA V2 captchas on web pages.\r\n- Automated resolution of text captchas on web pages.\r\n- Flexible configuration of the number of attempts to solve audio captchas.\r\n- Easy integration into web automation workflows.\r\n\r\n## Requirements\r\n\r\n- Python 3.10+\r\n- Seleniumbase\r\n- Pydub\r\n- SpeechRecognition\r\n- easyocr\r\n- requests\r\n- opencv\r\n- verbose-terminal\r\n\r\n> [!IMPORTANT]\r\n> If you're getting an error related to FFmpeg not being installed or in your PATH, get it here: https://ffmpeg.org/download.html\r\n> If the error persists, make sure FFmpeg is properly installed for your OS and in your PATH.\r\n\r\n## Installation\r\n\r\n```bash\r\npip install recaptcha-cracker\r\n```\r\n\r\n## Usage\r\n\r\n### Resolving reCAPTCHA V2\r\n\r\n1. Import the necessary class to your Python script:\r\n\r\n```python\r\nfrom recaptcha_cracker import RecaptchaV2\r\n```\r\n\r\n2. Initialize a RecaptchaV2 object with a SeleniumBase Driver object:\r\n\r\n```python\r\nfrom seleniumbase import Driver\r\n\r\n# Inicializa el objeto Driver\r\ndriver = Driver()\r\n\r\n# Carga la p\u00c3\u00a1gina web\r\ndriver.get(\"https://www.google.com/recaptcha/api2/demo\")\r\n\r\n# Inicializa el objeto RecaptchaV2\r\nrecaptcha = RecaptchaV2(driver)\r\n\r\n```\r\n\r\n3. Use the cracker() method to resolve a reCAPTCHA on a web page:\r\n\r\n```python\r\nchecked_status = recaptcha.cracker(selector='//*[@id=\"recaptcha-demo\"]/div/div/iframe')\r\n```\r\n\r\n4. If the reCAPTCHA is successfully resolved, the method will return True. Otherwise, it will return False.\r\n\r\n### Resolving text captchas\r\n\r\n1. Import the necessary class to your Python script:\r\n\r\n```python\r\nfrom recaptcha_cracker import TextCaptcha\r\n```\r\n\r\n2. Initialize a TextCaptcha object:\r\n\r\n```python\r\ntext_captcha = TextCaptcha(image_path='captcha.png', session=None, processing=True, kernel=(2, 2), verbose=True)\r\n```\r\n\r\n3. Use the `download_and_read_image` method to download and read a captcha image from a URL:\r\n\r\n```python\r\ncaptcha_text = text_captcha.download_and_read_image(url='https://example.com/captcha.png')\r\n```\r\n\r\n4. Use the `decode_and_read_image` method to decode and read a base64 encoded captcha image:\r\n\r\n```python\r\nbase64_image = 'data:image/png;base64,...'\r\ncaptcha_text = text_captcha.decode_and_read_image(base64_image=base64_image)\r\n```\r\n\r\n5. Use the `capture_and_read_image` method to capture and read a captcha image from a web page element:\r\n\r\n```python\r\ncaptcha_text = text_captcha.capture_and_read_image(driver, element='//img[@id=\"captcha_image\"]')\r\n```\r\n\r\n6. The methods return the decoded captcha text if successful, or None if there was an error.\r\n\r\n## Contributions\r\n\r\nIf you'd like to contribute, please see the [CONTRIBUTING.md](CONTRIBUTING.md) file.\r\n\r\n## License\r\n\r\nThis project is under the MIT License. See the [LICENSE](https://github.com/wipodev/Recaptcha_Cracker/blob/main/LICENSE) file for more details.\r\n\r\n## Inspiration\r\n\r\nThis project was inspired by the project https://github.com/thicccat688/selenium-recaptcha-solver, created by user \"thicccat688\". The original library provides a robust solution to solve reCAPTCHA v2 challenges using Selenium and speech recognition services. By studying its implementation and design, I was able to better understand how to address captcha resolution challenges in web automation environments.\r\n\r\nI thank the team behind selenium-recaptcha-solver for their excellent work and contributions to the open source community.\r\n\r\n---\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "captcha_cracker - A complete Python package for solving various types of CAPTCHAs, including text CAPTCHAs, reCAPTCHAs, and more. Enhance your automation scripts with robust CAPTCHA resolution capabilities.",
"version": "0.2.1",
"project_urls": {
"Bug Tracker": "https://github.com/wipodev/Recaptcha_Cracker/issues",
"Documentation": "https://github.com/wipodev/Recaptcha_Cracker/blob/main/README.md",
"Homepage": "https://github.com/wipodev/Recaptcha_Cracker",
"Source": "https://github.com/wipodev/Recaptcha_Cracker"
},
"split_keywords": [
"python",
" captcha",
" speech recognition",
" selenium",
" web automation",
" recaptcha"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1ff558b16efe97376e25b086b87ab136431cc79e95f792b288c59c46387813b2",
"md5": "546725f69c79f08dcecc117e67c48ade",
"sha256": "88c51807943b45d281a92b13b3626a916d15a9d153b6078be8705826ccd035a5"
},
"downloads": -1,
"filename": "recaptcha_cracker-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "546725f69c79f08dcecc117e67c48ade",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 9990,
"upload_time": "2024-06-11T15:22:25",
"upload_time_iso_8601": "2024-06-11T15:22:25.550869Z",
"url": "https://files.pythonhosted.org/packages/1f/f5/58b16efe97376e25b086b87ab136431cc79e95f792b288c59c46387813b2/recaptcha_cracker-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "392bbba2a11ad377248939b896f6a3f27611ffb4638c56a56ef0e4281e69af0d",
"md5": "92c3f62d00206977f444667735a7ae34",
"sha256": "99fcc13fc10492c9dddbac9f8c38795ccf1ed22acc643f86864b81b25dcf316c"
},
"downloads": -1,
"filename": "recaptcha_cracker-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "92c3f62d00206977f444667735a7ae34",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 10385,
"upload_time": "2024-06-11T15:22:27",
"upload_time_iso_8601": "2024-06-11T15:22:27.166780Z",
"url": "https://files.pythonhosted.org/packages/39/2b/bba2a11ad377248939b896f6a3f27611ffb4638c56a56ef0e4281e69af0d/recaptcha_cracker-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-11 15:22:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wipodev",
"github_project": "Recaptcha_Cracker",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "seleniumbase",
"specs": [
[
"==",
"4.27.0"
]
]
},
{
"name": "pydub",
"specs": [
[
"==",
"0.25.1"
]
]
},
{
"name": "SpeechRecognition",
"specs": [
[
"==",
"3.10.4"
]
]
},
{
"name": "verbose-terminal",
"specs": [
[
"==",
"1.0.1"
]
]
},
{
"name": "easyocr",
"specs": [
[
"==",
"1.7.1"
]
]
}
],
"lcname": "recaptcha-cracker"
}