diff --git a/implants/lib/eldritch/src/sys/get_os_impl.rs b/implants/lib/eldritch/src/sys/get_os_impl.rs index cba5d466f..aef68e4cf 100644 --- a/implants/lib/eldritch/src/sys/get_os_impl.rs +++ b/implants/lib/eldritch/src/sys/get_os_impl.rs @@ -39,11 +39,20 @@ pub fn get_os(starlark_heap: &Heap) -> Result { } fn handle_get_os() -> Result { + let tmp_platform = whoami::platform().to_string(); + let platform = String::from(match tmp_platform.to_lowercase().as_str() { + "linux" => "PLATFORM_LINUX", + "windows" => "PLATFORM_WINDOWS", + "mac os" => "PLATFORM_MACOS", + "bsd" => "PLATFORM_BSD", + _ => tmp_platform.as_str(), + }); + Ok(OsInfo { arch: whoami::arch().to_string(), desktop_env: whoami::desktop_env().to_string(), distro: whoami::distro().to_string(), - platform: whoami::platform().to_string(), + platform, }) }