From 53bc5a0ddc251f27fb3e32f9fcde70530779b7b8 Mon Sep 17 00:00:00 2001 From: ProofOfConcept Date: Sat, 28 Feb 2026 23:50:54 -0500 Subject: [PATCH] memory-search: use uuid for cookie instead of manual /dev/urandom --- src/bin/memory-search.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/bin/memory-search.rs b/src/bin/memory-search.rs index 2cfd6dd..af68676 100644 --- a/src/bin/memory-search.rs +++ b/src/bin/memory-search.rs @@ -150,11 +150,7 @@ fn load_or_create_cookie(dir: &Path, session_id: &str) -> String { } fn generate_cookie() -> String { - let mut buf = [0u8; 12]; - fs::File::open("/dev/urandom") - .and_then(|mut f| io::Read::read_exact(&mut f, &mut buf)) - .expect("failed to read urandom"); - buf.iter().map(|b| format!("{:02x}", b)).collect() + uuid::Uuid::new_v4().as_simple().to_string()[..12].to_string() } fn load_seen(dir: &Path, session_id: &str) -> HashSet {