From bf75ac95aa38ae08726405009471abfbf768f573 Mon Sep 17 00:00:00 2001 From: Joe Abbate <40615740+jabbate19@users.noreply.github.com> Date: Thu, 2 Nov 2023 19:38:54 -0400 Subject: [PATCH] Add Windows Path for system-id (#346) --- implants/imix/src/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/implants/imix/src/main.rs b/implants/imix/src/main.rs index 0dd1a7a8a..30b0884af 100644 --- a/implants/imix/src/main.rs +++ b/implants/imix/src/main.rs @@ -235,8 +235,14 @@ async fn main_loop(config_path: String, loop_count_max: Option) -> Result<( None }, }; + + let host_id_file = if cfg!(target_os="windows") { + "C:\\ProgramData\\system-id" + } else { + "/etc/system-id" + }.to_string(); - let host_id = match get_host_id("/etc/system-id".to_string()) { + let host_id = match get_host_id(host_id_file) { Ok(tmp_host_id) => tmp_host_id, Err(error) => { if debug {