rustenium-identity 0.1.9

A versatile stealth overlay for rustenium
Documentation
//! Launches a Chromium session with a built-in preset identity applied, then
//! holds the browser open so you can manually visit fingerprint-detection sites
//! to eyeball the stealth:
//!   - https://abrahamjuliot.github.io/creepjs/         (canvas/audio/webgl/fonts)
//!   - https://bot.sannysoft.com/                       (webdriver/automation tells)
//!   - https://browserleaks.com/canvas                  (canvas hash stability)
//!   - https://fingerprintjs.github.io/fingerprintjs/   (visitor id stability)
//!
//! Pick a preset by ID (1-10) on the command line, or omit for a random one:
//!   cargo run --example launch          # random preset
//!   cargo run --example launch -- 6     # preset 6 (Android / Pixel 7)
//!
//! Stop with Ctrl-C.

use rustenium_identity::{preset, IdentitySession};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let identity = match std::env::args().nth(1) {
        Some(arg) => {
            let id: u64 = arg.parse()?;
            preset::get_by_id(id)?
        }
        None => preset::random(),
    };

    println!(
        "Launching preset #{:?}: {:?} {} / {:?} / {}",
        identity.id, identity.os, identity.os_version, identity.browser, identity.gpu.webgl_renderer
    );

    let _session = IdentitySession::launch(identity).await?;

    println!("Browser is up with the identity applied.");
    println!("Visit a detection site in the opened window (e.g. creepjs / bot.sannysoft.com).");
    println!("Press Ctrl-C to quit.");

    // Hold the process (and therefore the browser) open until interrupted.
    tokio::signal::ctrl_c().await?;
    println!("\nShutting down.");
    Ok(())
}