Skip to content

Commit

Permalink
Add Windows Path for system-id (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
jabbate19 authored Nov 2, 2023
1 parent 8feb9e9 commit bf75ac9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion implants/imix/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,14 @@ async fn main_loop(config_path: String, loop_count_max: Option<i32>) -> 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 {
Expand Down

0 comments on commit bf75ac9

Please sign in to comment.