Skip to main content

peripheral_stealth_script

Function peripheral_stealth_script 

Source
pub fn peripheral_stealth_script(config: &PeripheralStealthConfig) -> String
Expand description

Generate the peripheral stealth injection script.

Pass fingerprint_profile when you want platform-appropriate device names; if None, defaults to Windows-like device names.

ยงExample

use stygian_browser::peripheral_stealth::{peripheral_stealth_script, PeripheralStealthConfig};
use stygian_browser::noise::NoiseSeed;

let cfg = PeripheralStealthConfig::default_with_seed(NoiseSeed::from(1_u64));
let js = peripheral_stealth_script(&cfg);
assert!(js.contains("visibilityState"));