use crate::detectors::Detector;
use crate::utils::checks::MatchMode;
use crate::utils::http::HttpResponse;
pub struct Wordfence;
impl Detector for Wordfence {
fn name(&self) -> &'static str {
"Wordfence"
}
fn detect(&self, resp: &HttpResponse) -> bool {
resp.body_has(&["generated by wordfence"], MatchMode::Any) && resp.is_forbidden()
}
}
inventory::submit! {
&Wordfence as &dyn Detector
}