web_analyzer/
subdomain_takeover_mobile.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4pub struct DnsCheckResult {
5 pub a_records: Vec<String>,
6 pub aaaa_records: Vec<String>,
7 pub cname_records: Vec<String>,
8 pub mx_records: Vec<String>,
9 pub txt_records: Vec<String>,
10 pub ns_records: Vec<String>,
11 pub has_valid_dns: bool,
12}
13
14#[derive(Debug, Clone, Serialize, Deserialize)]
15pub struct TakeoverVulnerability {
16 pub subdomain: String,
17 pub service: String,
18 pub vulnerability_type: String,
19 pub cname: Option<String>,
20 pub confidence: String,
21 pub description: String,
22 pub exploitation_difficulty: String,
23 pub mitigation: String,
24 pub dns_info: DnsCheckResult,
25 pub http_status: Option<u16>,
26}
27
28#[derive(Debug, Clone, Serialize, Deserialize)]
29pub struct ScanStatistics {
30 pub subdomains_scanned: usize,
31 pub vulnerable_count: usize,
32 pub high_confidence: usize,
33 pub medium_confidence: usize,
34 pub low_confidence: usize,
35 pub scan_time_secs: f64,
36 pub services_checked: usize,
37}
38
39#[derive(Debug, Clone, Serialize, Deserialize)]
40pub struct TakeoverResult {
41 pub domain: String,
42 pub statistics: ScanStatistics,
43 pub vulnerable: Vec<TakeoverVulnerability>,
44}
45
46pub async fn check_subdomain_takeover(
47 _domain: &str,
48 _subdomains: &[String],
49 _progress_tx: Option<tokio::sync::mpsc::Sender<crate::ScanProgress>>,
50) -> Result<TakeoverResult, Box<dyn std::error::Error + Send + Sync>> {
51 Err(crate::error::WebAnalyzerError::UnsupportedPlatform("Mobile integration via native networking is pending implementation.".into()).into())
52}