
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Solve AWS WAF CAPTCHAs using Modern AI! 🚀
Using powerful AI models like Groq and Moondream to solve AWS WAF CAPTCHAs quickly and accurately
A joint development effort by LaProp and XAhai
⚠️ Alpha Status Notice: This library is currently in alpha stage. Many features are still under development, requiring thorough testing and integration. Expect frequent updates and potential breaking changes. We welcome feedback and contributions to help improve stability and functionality!
Features • Installation • Configuration • Quick Start • Documentation • Contributing
Note: Currently, CaptchAI only works with AWS WAF CAPTCHAs. We plan to add support for other CAPTCHAs in the future.
pip install captchai
from captchai.core.models.config import CaptchaGlobalConfig, AWSProviderConfig, AvailableResolvers
config = CaptchaGlobalConfig(
groq_api_key="your-groq-api-key",
moondream_api_key="your-moondream-api-key",
aws_provider_config=AWSProviderConfig(
image_size=(640, 640), # Customize image size
grid_size=3, # Grid dimensions
resolver=AvailableResolvers.GROQ_IMAGE_ONE_SHOOT,
# Fallback resolvers for resilience
list_resolver_image_fallback=[
AvailableResolvers.MOONDREAM_IMAGE_ONE_SHOOT,
AvailableResolvers.GROQ_IMAGE_ONE_SHOOT,
AvailableResolvers.GROQ_IMAGE_MULTI_SHOOT,
AvailableResolvers.MOONDREAM_IMAGE_MULTI_SHOOT
]
)
)
GROQ_IMAGE_ONE_SHOOT
: Single-shot solving with GroqGROQ_IMAGE_MULTI_SHOOT
: Multi-shot approach with GroqMOONDREAM_IMAGE_ONE_SHOOT
: Quick Moondream vision modelMOONDREAM_IMAGE_MULTI_SHOOT
: Advanced Moondream processingGROQ_AUDIO
: Advanced audio CAPTCHA processingHere's a complete example of how to use Captchai to solve different types of CAPTCHAs:
from captchai import CaptchaSolver
from captchai.core.models.config import (
CaptchaGlobalConfig,
AWSProviderConfig,
AvailableResolvers
)
import base64
def solve_captcha_example():
# 1. Configure the solver
config = CaptchaGlobalConfig(
groq_api_key="your-groq-api-key",
moondream_api_key="your-moondream-api-key",
aws_provider_config=AWSProviderConfig(
resolver=AvailableResolvers.GROQ_IMAGE_ONE_SHOOT,
grid_size=3,
image_size=(640, 640)
)
)
# 2. Initialize the solver
solver = CaptchaSolver(config)
# 3. Solve different types of CAPTCHAs
# Image CAPTCHA (using base64 string)
with open("path/to/captcha.png", "rb") as image_file:
image_base64 = base64.b64encode(image_file.read()).decode('utf-8')
# For image CAPTCHAs, query is required - it specifies what type of object to identify
image_result = solver.solve_aws_captcha_image(
data=image_base64,
query="bucket" # Required: Specify the type of object to identify
)
print(f"Image CAPTCHA Solution: {image_result}")
# Audio CAPTCHA (using base64 string)
with open("path/to/audio.mp3", "rb") as audio_file:
audio_base64 = base64.b64encode(audio_file.read()).decode('utf-8')
# For audio CAPTCHAs, query is optional
audio_result = solver.solve_aws_captcha(
data=audio_base64
)
print(f"Audio CAPTCHA Solution: {audio_result}")
if __name__ == "__main__":
solve_captcha_example()
Note: For image CAPTCHAs, the
query
parameter is required - it specifies what type of object to identify (e.g., "Select all images with traffic lights", "Select all squares with buses"). For audio CAPTCHAs, thequery
parameter is optional.
Core Features
Direct AWS Integration
Browser Automation
Future Enhancements
We welcome your contributions! We want to make it easy for you to help improve Captchai. Check out our Contributing Guidelines to get started.
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
IMPORTANT: FOR RESEARCH AND EDUCATIONAL PURPOSES ONLY
This library is for research and educational purposes only. It helps study and understand how AI can solve CAPTCHA challenges.
By using this library, you agree that:
DO NOT use this library to:
Give a ⭐️ if this project helped you!
FAQs
Captchai is a python library for solving captchas using AI
We found that captchai demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.