use std::path::Path;
use std::process::Command;
fn pd_httpx_path() -> Option<String> {
let candidates = [
format!("{}/go/bin/httpx", std::env::var("HOME").unwrap_or_default()),
"/usr/local/bin/httpx-pd".into(),
];
candidates.into_iter().find(|c| Path::new(c).exists())
}
fn binary_present(name: &str) -> bool {
Command::new("which")
.arg(name)
.output()
.map(|o| o.status.success())
.unwrap_or(false)
}
#[test]
fn versus_pd_httpx() {
let Some(p) = pd_httpx_path() else {
eprintln!("SKIP: projectdiscovery httpx not at ~/go/bin/httpx (the python httpx in PATH is the wrong binary). Install: go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest");
return;
};
eprintln!("pd-httpx at {p}; head-to-head against gossan-techstack pending fixture corpus");
}
#[test]
fn versus_webanalyze() {
if !binary_present("webanalyze") {
eprintln!("SKIP: webanalyze not installed; go install github.com/rverton/webanalyze/cmd/webanalyze@latest");
return;
}
eprintln!("webanalyze IS installed; head-to-head against gossan-techstack pending");
}