From ca0e679e2d6fb2381f56664f10c746e1c3f9f3c0 Mon Sep 17 00:00:00 2001 From: Adir Shitrit Date: Sat, 8 Nov 2025 11:09:18 +0200 Subject: [PATCH] integrate thread enumeration into CLI scanning --- ghost-cli/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ghost-cli/src/main.rs b/ghost-cli/src/main.rs index f86aa45..8d53bff 100644 --- a/ghost-cli/src/main.rs +++ b/ghost-cli/src/main.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use ghost_core::{memory, process, DetectionEngine, ThreatLevel}; +use ghost_core::{memory, process, thread, DetectionEngine, ThreatLevel}; fn main() -> Result<()> { env_logger::init(); @@ -15,7 +15,9 @@ fn main() -> Result<()> { for proc in &processes { if let Ok(regions) = memory::enumerate_memory_regions(proc.pid) { - let result = engine.analyze_process(proc, ®ions); + // Get thread information if available + let threads = thread::enumerate_threads(proc.pid).ok(); + let result = engine.analyze_process(proc, ®ions, threads.as_deref()); if result.threat_level != ThreatLevel::Clean { detections.push(result);