From a31067a7529b44d13e5b9fc223b4d81d6e4fd088 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Fri, 21 May 2021 15:25:37 +0300 Subject: [PATCH] Added a common method to determine the runtime OS --- .../monkey_island/cc/server_utils/common_methods.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 monkey/monkey_island/cc/server_utils/common_methods.py diff --git a/monkey/monkey_island/cc/server_utils/common_methods.py b/monkey/monkey_island/cc/server_utils/common_methods.py new file mode 100644 index 000000000..218f146ed --- /dev/null +++ b/monkey/monkey_island/cc/server_utils/common_methods.py @@ -0,0 +1,11 @@ +import platform + +WINDOWS = "Windows" +LINUX = "Linux" + + +def get_runtime_os() -> str: + if platform.system() == "Windows": + return WINDOWS + else: + return LINUX