1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! captchaforge — automatic CAPTCHA detection and solving for
//! `chromiumoxide`-driven headless browsers.
//!
//! Extracted from [golemn-browser](https://github.com/santhsecurity/golemn)
//! (originally GPL-3.0) and re-licensed MIT OR Apache-2.0 by the
//! original author so it can stand alone and be embedded by other
//! Santh-ecosystem tools (wafrift, gossan, sear, …).
//!
//! Two modules:
//! - [`detect`] — heuristic + DOM-based CAPTCHA identification
//! - [`solver`] — multi-strategy solving chain
//! - **Behavioural** — realistic mouse + timing for Turnstile /
//! reCAPTCHA v3
//! - **Vision-LLM** — screenshot → multimodal model → click /
//! type the answer
//! - **Audio bypass** — accessibility audio challenge → STT →
//! transcribed answer
//! - **Crowd-sourced** — per-domain pattern memory of which
//! method has succeeded before
//! - **Behavioural / human fallback** — return unsolved for
//! human-in-the-loop
//!
//! The crate exposes a `CaptchaSolver` trait so consumers can plug
//! in their own solver strategies without forking.
//!
//! # Example
//!
//! ```rust,no_run
//! use captchaforge::{detect, solver::CaptchaSolverChain};
//! # async fn run(page: &chromiumoxide::Page) -> anyhow::Result<()> {
//! let info = detect::detect(page).await?;
//! if detect::is_captcha(&info) {
//! let chain = CaptchaSolverChain::default_chain();
//! // chain.solve(page, &info).await?;
//! }
//! # Ok(()) }
//! ```
// Back-compat re-export so code that used `golemn_browser::captcha_detect`
// can `use captchaforge::captcha_detect` instead.
pub use detect as captcha_detect;