Documentation

Learn how to integrate web-analyzer into your Rust projects for programmatic web security analysis.

Quick Start

main.rs
use web_analyzer::DomainAnalyzer;

#[tokio::main]
async fn main() {
    let analyzer = DomainAnalyzer::new();
    let result = analyzer
        .analyze("example.com")
        .await
        .expect("Analysis failed");
    
    println!("Domain: {}", result.domain);
    println!("Score: {}/100", result.security_score);
}

External Dependencies

Some modules shell out to external CLI tools for scanning. Install these for full scanner capability:

Nmap

Required for port scanning and Nmap Zero-Day module. Install via package manager.

sudo apt install nmap

Subfinder

Required for subdomain-discovery feature. Install from ProjectDiscovery.

go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest

dig

Required for DNS resolution. Usually pre-installed on Linux/macOS.

sudo apt install dnsutils

Architecture

web-analyzer is a modular Rust crate where each analysis capability is gated behind a Cargo feature flag. This allows consumers to compile only the modules they need, keeping binary size and dependency footprint minimal.

All modules are fully async, built on Tokio, and designed for parallel execution. The crate internally uses reqwest for HTTP, scraper for HTML parsing, and serde for structured output.

View on GitHub

Explore examples, contribute new modules, or report issues on GitHub.

Go to Repository