diff --git a/implants/lib/eldritchv2/stdlib/eldritch-libsys/Cargo.toml b/implants/lib/eldritchv2/stdlib/eldritch-libsys/Cargo.toml index d8e7e2029..fe1340bec 100644 --- a/implants/lib/eldritchv2/stdlib/eldritch-libsys/Cargo.toml +++ b/implants/lib/eldritchv2/stdlib/eldritch-libsys/Cargo.toml @@ -37,6 +37,7 @@ stdlib = ["dep:sysinfo", "dep:whoami", "dep:local-ip-address", "dep:hex"] fake_bindings = [] [dev-dependencies] +uuid = { version = "1.0", features = ["v4"] } tempfile = { workspace = true } [build-dependencies] diff --git a/implants/lib/eldritchv2/stdlib/eldritch-libsys/src/std/exec_impl.rs b/implants/lib/eldritchv2/stdlib/eldritch-libsys/src/std/exec_impl.rs index 60dc8e372..dd94f3a49 100644 --- a/implants/lib/eldritchv2/stdlib/eldritch-libsys/src/std/exec_impl.rs +++ b/implants/lib/eldritchv2/stdlib/eldritch-libsys/src/std/exec_impl.rs @@ -211,14 +211,15 @@ mod tests { #[test] fn test_exec_input() -> Result<()> { #[cfg(target_os = "windows")] - let (cmd, args) = ( + let (cmd, args, input) = ( "cmd.exe".to_string(), - vec!["/C".to_string(), "echo".to_string(), "hello".to_string()], + vec!["/C".to_string(), "findstr".to_string(), "^".to_string()], + "hello".to_string(), ); #[cfg(not(target_os = "windows"))] - let (cmd, input) = ("cat".to_string(), "hello".to_string()); + let (cmd, args, input) = ("cat".to_string(), Vec::new(), "hello".to_string()); - let res = exec(cmd, Vec::new(), Some(false), None, Some(input))?; + let res = exec(cmd, args, Some(false), None, Some(input))?; assert_eq!(res.get("status").unwrap(), &Value::Int(0)); let stdout = res.get("stdout").unwrap();