pub struct DetectionCheck {
pub id: CheckId,
pub description: &'static str,
pub script: &'static str,
}Expand description
A single stealth detection check: identifier, description, and JavaScript
to evaluate via CDP Runtime.evaluate.
Fields§
§id: CheckIdStable identifier.
description: &'static strHuman-readable description of what this check tests.
script: &'static strSelf-contained JavaScript expression that must evaluate to a JSON
string with shape '{"passed":true|false,"details":"..."}'.
The expression is sent verbatim to CDP Runtime.evaluate. Use IIFEs
((function(){ ... })()) for multi-statement scripts.
Implementations§
Source§impl DetectionCheck
impl DetectionCheck
Sourcepub fn parse_output(&self, json: &str) -> CheckResult
pub fn parse_output(&self, json: &str) -> CheckResult
Parse the JSON string returned by the CDP evaluation of script.
If the JSON is invalid (e.g. the script threw an exception), returns a
failing CheckResult with the raw output in details (conservative
fallback — avoids silently hiding problems).
Auto Trait Implementations§
impl Freeze for DetectionCheck
impl RefUnwindSafe for DetectionCheck
impl Send for DetectionCheck
impl Sync for DetectionCheck
impl Unpin for DetectionCheck
impl UnsafeUnpin for DetectionCheck
impl UnwindSafe for DetectionCheck
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