feat: show rayhunter version/os/arch in pcap, ndjson, qmdl manifest

Create a util mod to provide information about the rayhunter binary and
system.
This commit is contained in:
oopsbagel
2025-03-18 00:43:03 -07:00
committed by Will Greenberg
parent b785a7f21c
commit f2b5aa2743
7 changed files with 67 additions and 29 deletions

View File

@@ -70,9 +70,18 @@ pub struct AnalyzerMetadata {
pub description: String,
}
#[derive(Serialize, Debug)]
pub struct RayhunterMetadata {
pub version: String,
pub os: String,
pub arch: String,
pub hardware: String,
}
#[derive(Serialize, Debug)]
pub struct ReportMetadata {
pub analyzers: Vec<AnalyzerMetadata>,
pub rayhunter: RayhunterMetadata,
}
#[derive(Serialize, Debug, Clone)]
@@ -205,8 +214,18 @@ impl Harness {
});
}
let metadata = crate::util::RayhunterMetadata::new();
let rayhunter = RayhunterMetadata {
version: metadata.version,
os: metadata.os,
arch: metadata.arch,
hardware: metadata.hardware,
};
ReportMetadata {
analyzers,
rayhunter,
}
}
}