Fix the path to static scanners
Some checks failed
Build IP lists / Build scanners list (binaryedge) (push) Failing after -2m31s
Build IP lists / Build scanners list (stretchoid) (push) Failing after -2m33s
Build IP lists / build-aws-cloudfront (push) Failing after -2m32s

This commit is contained in:
2024-10-08 01:30:45 +02:00
parent 75dc88bcc1
commit dbbbdc4818

View File

@ -430,7 +430,12 @@ async fn handle_list_scanners(
let mut path: PathBuf = PathBuf::new(); let mut path: PathBuf = PathBuf::new();
path.push(static_data_dir); path.push(static_data_dir);
path.push("scanners"); path.push("scanners");
path.push(scanner_name.to_string()); path.push(match scanner_name {
Scanners::Stretchoid |
Scanners::Binaryedge => panic!("This should not happen"),
Scanners::Censys => "censys.txt".to_string(),
Scanners::InternetMeasurement => "internet-measurement.com.txt".to_string(),
});
return match NamedFile::open(path).await { return match NamedFile::open(path).await {
Ok(file) => MultiReply::FileContents(file), Ok(file) => MultiReply::FileContents(file),