pub struct Persona {Show 17 fields
pub user_agent: String,
pub platform: String,
pub language: String,
pub languages: Vec<String>,
pub screen_width: u32,
pub screen_height: u32,
pub color_depth: u32,
pub timezone: String,
pub timezone_offset: i32,
pub referrer: String,
pub hardware_concurrency: u32,
pub device_memory: f64,
pub max_touch_points: u32,
pub vendor: String,
pub app_name: String,
pub app_version: String,
pub do_not_track: Option<String>,
}Expand description
Browser persona — configurable identity presented to JavaScript.
Phishing kits fingerprint the browser to detect sandboxes. The persona must be internally consistent: a Chrome UA on Windows should report Win32 platform, en-US language, and realistic screen dimensions.
Fields§
§user_agent: String§platform: String§language: String§languages: Vec<String>§screen_width: u32§screen_height: u32§color_depth: u32§timezone: String§timezone_offset: i32§referrer: String§hardware_concurrency: u32§device_memory: f64§max_touch_points: u32§vendor: String§app_name: String§app_version: String§do_not_track: Option<String>Implementations§
Source§impl Persona
impl Persona
Sourcepub fn chrome_windows() -> Self
pub fn chrome_windows() -> Self
Chrome 120 on Windows 10. The most common browser configuration.
Sourcepub fn chrome_macos() -> Self
pub fn chrome_macos() -> Self
Chrome on macOS. Second most common.
Sourcepub fn chrome_android() -> Self
pub fn chrome_android() -> Self
Chrome on Android. Tests mobile-targeted phishing.
Sourcepub fn firefox_linux() -> Self
pub fn firefox_linux() -> Self
Firefox on Linux. Tests cross-browser compatibility of phishing kits.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Persona
impl<'de> Deserialize<'de> for Persona
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Persona
impl RefUnwindSafe for Persona
impl Send for Persona
impl Sync for Persona
impl Unpin for Persona
impl UnsafeUnpin for Persona
impl UnwindSafe for Persona
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more