simple_waf_scanner/lib.rs
1//! Simple WAF Scanner - A tool for detecting and testing web application firewalls
2//!
3//! This library provides functionality for:
4//! - Detecting WAF presence through fingerprinting
5//! - Testing WAF bypass techniques with various evasion methods
6//! - Scanning endpoints with structured payload sets
7//!
8//! # Warning
9//!
10//! This tool is intended for **authorized security testing only**.
11//! Unauthorized access to computer systems is illegal.
12
13pub mod config;
14pub mod error;
15pub mod evasion;
16pub mod extractor;
17pub mod fingerprints;
18pub mod http;
19pub mod payloads;
20pub mod scanner;
21pub mod types;
22
23// Re-export main types
24pub use config::Config;
25pub use error::{Result, ScanError};
26pub use scanner::Scanner;
27pub use types::{Finding, ScanResults, Severity};
28
29/// Perform a WAF scan with the given configuration
30///
31/// # Example
32///
33/// ```no_run
34/// use simple_waf_scanner::{Config, scan};
35///
36/// #[tokio::main]
37/// async fn main() -> Result<(), Box<dyn std::error::Error>> {
38/// let config = Config::new("https://example.com".to_string());
39/// let results = scan(config).await?;
40/// println!("Found {} findings", results.findings.len());
41/// Ok(())
42/// }
43/// ```
44pub async fn scan(config: Config) -> Result<ScanResults> {
45 let scanner = Scanner::new(config).await?;
46 scanner.scan().await
47}