pub struct DgaScorer { /* private fields */ }Expand description
Default DGA scorer with the bundled English baseline.
Implementations§
Source§impl DgaScorer
impl DgaScorer
Sourcepub fn score(&self, sld: &str) -> DgaScore
pub fn score(&self, sld: &str) -> DgaScore
Score sld. Returns a DgaScore whose
log_likelihood is the mean per-bigram log-likelihood
across classifiable characters.
Sourcepub fn is_dga(&self, sld: &str) -> bool
pub fn is_dga(&self, sld: &str) -> bool
Default-threshold verdict: log_likelihood < -3.5.
Empirically separates the bundled baseline corpus from
random DGA-like strings.
Sourcepub fn is_dga_with_threshold(&self, sld: &str, threshold: f32) -> bool
pub fn is_dga_with_threshold(&self, sld: &str, threshold: f32) -> bool
Verdict against a caller-supplied threshold.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DgaScorer
impl RefUnwindSafe for DgaScorer
impl Send for DgaScorer
impl Sync for DgaScorer
impl Unpin for DgaScorer
impl UnsafeUnpin for DgaScorer
impl UnwindSafe for DgaScorer
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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