Skip to main content

web_analyzer/
lib.rs

1//! # Web Analyzer
2//!
3//! **Enterprise domain security & intelligence platform** — a high-performance
4//! Rust toolkit for comprehensive web reconnaissance, security assessment, and
5//! technology fingerprinting.
6//!
7//! ## Module Architecture
8//!
9//! The crate is organized into three security pillars, each gated by
10//! individual Cargo feature flags:
11//!
12//! ### 🔎 Intelligence Gathering
13//! - [`domain_info`] — WHOIS, SSL certificates, DNS, port scanning, security score
14//! - [`domain_dns`] — A, AAAA, MX, NS, SOA, TXT, CNAME record resolution
15//! - [`seo_analysis`] — 13-category SEO audit with composite scoring
16//! - [`web_technologies`] — Technology fingerprinting across 16 categories
17//! - [`domain_validator`] — Bulk domain validation with parallel processing
18//!
19//! ### 🕵️ Reconnaissance
20//! - [`subdomain_discovery`] — Subfinder integration with deduplication
21//! - [`contact_spy`] — BFS crawl for email, phone, and social media extraction
22//! - [`advanced_content_scanner`] — Secret pattern detection & JS vulnerability analysis
23//!
24//! ### 🛡️ Security Assessment
25//! - [`security_analysis`] — WAF detection, SSL grading, CORS, cookies, composite score
26//! - [`subdomain_takeover`] — 36-service vulnerability database with exploitation ratings
27//! - [`cloudflare_bypass`] — Origin IP discovery via history lookup
28//! - [`nmap_zero_day`] — Nmap integration with NVD CVE and Exploit-DB lookup
29//! - [`api_security_scanner`] — 9 test suites: SQLi, XSS, SSRF, path traversal, and more
30//! - [`geo_analysis`] — AI/LLM readiness analysis and crawler directives
31//!
32//! ## Quick Start
33//!
34//! ```toml
35//! [dependencies]
36//! web-analyzer = "0.1"
37//! tokio = { version = "1", features = ["full"] }
38//! ```
39//!
40//! ```rust,no_run
41//! use web_analyzer::domain_info::get_domain_info;
42//!
43//! #[tokio::main]
44//! async fn main() {
45//!     let info = get_domain_info("example.com").await.unwrap();
46//!     println!("IP: {:?}", info.ipv4);
47//! }
48//! ```
49//!
50//! ## Feature Flags
51//!
52//! By default, **all modules** are enabled. Disable default features and
53//! select only what you need to reduce compile times:
54//!
55//! ```toml
56//! [dependencies]
57//! web-analyzer = { version = "0.1", default-features = false, features = ["domain-info", "security-analysis"] }
58//! ```
59
60#![cfg_attr(docsrs, feature(doc_cfg))]
61
62/// Error types for the web-analyzer crate.
63pub mod error;
64
65/// Compile-time embedded payloads from the `payloads/` directory.
66pub mod payloads;
67
68// ── Intelligence Gathering ──────────────────────────────────────────
69
70#[cfg(feature = "domain-info")]
71#[cfg_attr(docsrs, doc(cfg(feature = "domain-info")))]
72pub mod domain_info;
73
74#[cfg(feature = "domain-dns")]
75#[cfg_attr(docsrs, doc(cfg(feature = "domain-dns")))]
76pub mod domain_dns;
77
78#[cfg(feature = "seo-analysis")]
79#[cfg_attr(docsrs, doc(cfg(feature = "seo-analysis")))]
80pub mod seo_analysis;
81
82#[cfg(feature = "web-technologies")]
83#[cfg_attr(docsrs, doc(cfg(feature = "web-technologies")))]
84pub mod web_technologies;
85
86#[cfg(feature = "domain-validator")]
87#[cfg_attr(docsrs, doc(cfg(feature = "domain-validator")))]
88pub mod domain_validator;
89
90// ── Reconnaissance ──────────────────────────────────────────────────
91
92#[cfg(feature = "subdomain-discovery")]
93#[cfg_attr(docsrs, doc(cfg(feature = "subdomain-discovery")))]
94pub mod subdomain_discovery;
95
96#[cfg(feature = "contact-spy")]
97#[cfg_attr(docsrs, doc(cfg(feature = "contact-spy")))]
98pub mod contact_spy;
99
100#[cfg(feature = "advanced-content-scanner")]
101#[cfg_attr(docsrs, doc(cfg(feature = "advanced-content-scanner")))]
102pub mod advanced_content_scanner;
103
104// ── Security Assessment ─────────────────────────────────────────────
105
106#[cfg(feature = "security-analysis")]
107#[cfg_attr(docsrs, doc(cfg(feature = "security-analysis")))]
108pub mod security_analysis;
109
110#[cfg(feature = "subdomain-takeover")]
111#[cfg_attr(docsrs, doc(cfg(feature = "subdomain-takeover")))]
112pub mod subdomain_takeover;
113
114#[cfg(feature = "cloudflare-bypass")]
115#[cfg_attr(docsrs, doc(cfg(feature = "cloudflare-bypass")))]
116pub mod cloudflare_bypass;
117
118#[cfg(feature = "nmap-zero-day")]
119#[cfg_attr(docsrs, doc(cfg(feature = "nmap-zero-day")))]
120pub mod nmap_zero_day;
121
122#[cfg(feature = "api-security-scanner")]
123#[cfg_attr(docsrs, doc(cfg(feature = "api-security-scanner")))]
124pub mod api_security_scanner;
125
126#[cfg(feature = "geo-analysis")]
127#[cfg_attr(docsrs, doc(cfg(feature = "geo-analysis")))]
128pub mod geo_analysis;