captchaforge 0.2.32

Automatic CAPTCHA detection and multi-strategy solving for chromiumoxide-driven headless browsers (Cloudflare Turnstile, reCAPTCHA v2/v3, hCaptcha, image grids, audio, sliders).
Documentation
//! Vendor-dedicated CAPTCHA solvers.
//!
//! Each module here handles a specific commercial bot-management
//! vendor with knowledge of its session-token shape, cookie format,
//! interstitial signals, and challenge-iframe URL patterns. Generic
//! cross-vendor solvers ([`super::AudioCaptchaSolver`],
//! [`super::BehavioralCaptchaSolver`], [`super::PowCaptchaSolver`],
//! [`super::SliderCaptchaSolver`], [`super::VlmCaptchaSolver`],
//! [`super::WaitForTokenSolver`], [`super::MathCaptchaSolver`])
//! live one directory up because they apply to multiple vendors
//! at once.
//!
//! The default chain ([`super::CaptchaSolverChain::default_chain`])
//! installs vendor-dedicated solvers BEFORE the generic ones, so a
//! vendor-shaped detection routes through its dedicated solver
//! first and falls through cleanly to the generic chain when the
//! dedicated solver yields (e.g. PerimeterX press-and-hold yields
//! to VLM via screenshot+failure).
//!
//! # Adding a new vendor
//!
//! 1. Add a community rule in `rules/community.toml` with selectors
//!    + window globals + script-src triggers.
//! 2. Add a fixture pair in `tests/rule_fixtures/<vendor>/`.
//! 3. Create `src/solver/vendors/<vendor>.rs` modeled on the
//!    cookie-pass + token-watch pattern (see
//!    [`akamai_interstitial`] for the canonical template).
//! 4. Wire it in `src/solver/vendors/mod.rs` (this file) and
//!    `src/solver/chain.rs`'s `default_chain()`.
//! 5. Update the chain count test.
//! 6. Bump version. 0.0.1 patch unless something massive landed.

pub mod akamai_interstitial;
pub mod arkose;
pub mod aws_waf;
pub mod cloudflare_interstitial;
pub mod datadome;
pub mod geetest;
pub mod perimeterx;
pub mod recaptcha_audio;
pub mod turnstile_interactive;

pub use akamai_interstitial::{classify_abck, AbckValidity, AkamaiInterstitialSolver};
pub use arkose::{is_valid_arkose_token, ArkoseSolver};
pub use aws_waf::{is_valid_aws_waf_token, AwsWafSolver};
pub use cloudflare_interstitial::CloudflareInterstitialSolver;
pub use datadome::{classify_cookie as classify_datadome_cookie, DataDomeCookie, DataDomeSolver};
pub use geetest::{is_valid_v3_triple, is_valid_v4_quad, GeeTestProtocol, GeeTestSolver};
pub use perimeterx::{classify_px_cookie, PerimeterXSolver, PxCookie};
pub use recaptcha_audio::{
    clean_transcript, is_rate_limited, looks_like_audio_url, RecaptchaAudioSolver,
    AUDIO_BUTTON_SELECTOR, AUDIO_ELEMENT_SELECTOR, MAX_AUDIO_RETRIES, RATE_LIMIT_PHRASES,
    RECAPTCHA_BFRAME_SELECTOR, RESPONSE_INPUT_SELECTOR, TOKEN_INPUT_NAME, VERIFY_BUTTON_SELECTOR,
};
pub use turnstile_interactive::{
    TurnstileInteractiveSolver, CHECKBOX_OFFSET_X, CHECKBOX_OFFSET_Y, TURNSTILE_IFRAME_SELECTOR,
};