pub struct HoneypotEngine { /* private fields */ }Available on crate feature
react-honeypot only.Expand description
The core honeypot detection and intelligence engine.
Implementations§
Source§impl HoneypotEngine
impl HoneypotEngine
Sourcepub fn with_config(config: HoneypotConfig) -> Self
pub fn with_config(config: HoneypotConfig) -> Self
Create a new honeypot engine with custom configuration.
Sourcepub fn process_request(&mut self, req: &RawRequest) -> DetectionResult
pub fn process_request(&mut self, req: &RawRequest) -> DetectionResult
Process a raw HTTP request and return detection results.
Sourcepub fn get_state(&self) -> &HoneypotState
pub fn get_state(&self) -> &HoneypotState
Get the current honeypot state (for dashboard/export).
Sourcepub fn get_profiles(&self) -> Vec<&AttackerProfile>
pub fn get_profiles(&self) -> Vec<&AttackerProfile>
Get a snapshot of all attacker profiles.
Sourcepub fn get_profile(&self, profile_id: &str) -> Option<&AttackerProfile>
pub fn get_profile(&self, profile_id: &str) -> Option<&AttackerProfile>
Get a specific attacker profile by ID.
Sourcepub fn get_top_threats(&self, n: usize) -> Vec<&AttackerProfile>
pub fn get_top_threats(&self, n: usize) -> Vec<&AttackerProfile>
Get top-N most dangerous attacker profiles.
Sourcepub fn export_json(&self) -> Result<String>
pub fn export_json(&self) -> Result<String>
Export full state as JSON.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HoneypotEngine
impl RefUnwindSafe for HoneypotEngine
impl Send for HoneypotEngine
impl Sync for HoneypotEngine
impl Unpin for HoneypotEngine
impl UnsafeUnpin for HoneypotEngine
impl UnwindSafe for HoneypotEngine
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