Skip to main content

Crate captchaforge

Crate captchaforge 

Source
Expand description

captchaforge — automatic CAPTCHA detection and solving for chromiumoxide-driven headless browsers.

Extracted from golemn-browser (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 — detect and solve

use captchaforge::{detect, solver::CaptchaSolverChain};
let info = detect::detect(page).await?;
if detect::is_captcha(&info) {
    let chain = CaptchaSolverChain::default_chain();
    // chain.solve(page, &info).await?;
}

§Example — pattern store

use captchaforge::solver::{CaptchaType, PatternStore, SolveMethod};

let store = PatternStore::default();
store.record("example.com", &CaptchaType::CloudflareTurnstile, true, 1200, SolveMethod::BehavioralBypass);
assert_eq!(store.best_method("example.com", &CaptchaType::CloudflareTurnstile), Some(SolveMethod::BehavioralBypass));

§Example — frame evaluation

use captchaforge::frame::evaluate_in_all_frames;
let titles: Vec<String> = evaluate_in_all_frames(page, "document.title").await?;

§Example — behavior simulation

use captchaforge::behavior::{mouse_move_bezier, click_realistic};
mouse_move_bezier(page, 0.0, 0.0, 400.0, 300.0).await?;
click_realistic(page, 400.0, 300.0).await?;

Re-exports§

pub use config::Config;
pub use cookies::CapturedCookie;
pub use detect as captcha_detect;
pub use provider::CaptchaProvider;
pub use provider::ProviderRegistry;

Modules§

behavior
config
Tier-A operational configuration loaded from .captchaforge.toml.
cookies
Captured browser cookies — preserve a solved-captcha session across page loads.
detect
frame
Cross-origin iframe evaluation helpers.
provider
CaptchaProvider — bundles a captcha’s detector with its recommended solver routing in one self-contained unit.
solver
stealth
Chromium anti-detection (stealth) overrides.
stealth_profiles
Named browser fingerprint profiles.
telemetry
Solver telemetry — structured event hooks for external analytics.
warmup
Page-warming — natural pre-captcha visitor activity.

Functions§

auto_solve
One-call convenience: detect + solve in a single API.