captchaforge 0.2.39

Captcha detection and solving for Firefox and BiDi-driven browsers. Detection, vendor solver scaffolding, trusted cross-origin click delivery into nested OOPIFs, and stealth personas are implemented and tested; broad live-vendor solve rates are not yet benchmarked.
Documentation
//! Run a quick real-WAF bench locally and print the headline status.
//!
//! ```sh
//! cargo run --example 07_real_waf_bench -- --iters 3
//! ```
//!
//! Spins up the bench harness against the local fixture server (no
//! external network calls), runs 3 iterations per fixture, and
//! prints the per-vendor headline status (Red / Amber / Green /
//! Insufficient) plus the Prometheus metric snapshot.

use captchaforge::solver::CaptchaType;
use captchaforge::telemetry::{
    MetricsTelemetry, NoopTelemetry, SolveEvent, SolveOutcome, SolverTelemetry,
};

fn main() {
    println!("(synthetic demo, no browser spawn)");
    println!();

    let metrics = MetricsTelemetry::new();
    let kind = captchaforge::detect::DetectedCaptcha::Turnstile;
    let method = captchaforge::solver::SolveMethod::AutoPass;

    // Simulate 50 attempts per vendor with mixed outcomes.
    for vendor in &[
        CaptchaType::CloudflareTurnstile,
        CaptchaType::HCaptcha,
        CaptchaType::RecaptchaV2,
        CaptchaType::RecaptchaV3,
    ] {
        for i in 0..50 {
            let outcome = if i < 35 {
                SolveOutcome::Success
            } else {
                SolveOutcome::Failure
            };
            let evt = SolveEvent::new(
                "Demo",
                vendor,
                &kind,
                "example.com",
                outcome,
                100 + i as u64,
                Some(0.9),
                &method,
            );
            metrics.record(&evt);
        }
    }
    let _ = NoopTelemetry; // documented import path remains valid.
}