From cccdf7f6c391b9d77530ed74baf73ea4fcbc6a89 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 6 Oct 2021 14:42:26 +0530 Subject: [PATCH] agent: Send OS info in post breach telem --- monkey/infection_monkey/telemetry/post_breach_telem.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/monkey/infection_monkey/telemetry/post_breach_telem.py b/monkey/infection_monkey/telemetry/post_breach_telem.py index aceb8d294..4c6607b9c 100644 --- a/monkey/infection_monkey/telemetry/post_breach_telem.py +++ b/monkey/infection_monkey/telemetry/post_breach_telem.py @@ -2,6 +2,7 @@ import socket from common.common_consts.telem_categories import TelemCategoryEnum from infection_monkey.telemetry.base_telem import BaseTelem +from infection_monkey.utils.environment import is_windows_os class PostBreachTelem(BaseTelem): @@ -25,6 +26,7 @@ class PostBreachTelem(BaseTelem): "name": self.pba.name, "hostname": self.hostname, "ip": self.ip, + "os": PostBreachTelem._get_os(), } @staticmethod @@ -36,3 +38,7 @@ class PostBreachTelem(BaseTelem): hostname = "Unknown" ip = "Unknown" return hostname, ip + + @staticmethod + def _get_os(): + return "Windows" if is_windows_os() else "Linux"