From 053f9686c63074825aa5cfafef733ec8a8569d28 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Thu, 30 May 2019 21:04:30 +0300 Subject: [PATCH] Hotfixed telemetry feed for post breach actions --- monkey/infection_monkey/post_breach/pba.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/post_breach/pba.py b/monkey/infection_monkey/post_breach/pba.py index 8be04a468..7df3693fa 100644 --- a/monkey/infection_monkey/post_breach/pba.py +++ b/monkey/infection_monkey/post_breach/pba.py @@ -1,5 +1,6 @@ import logging import subprocess +import socket from infection_monkey.control import ControlClient from infection_monkey.utils import is_windows_os from infection_monkey.config import WormConfiguration @@ -44,9 +45,12 @@ class PBA(object): """ exec_funct = self._execute_default result = exec_funct() + hostname = socket.gethostname() ControlClient.send_telemetry('post_breach', {'command': self.command, 'result': result, - 'name': self.name}) + 'name': self.name, + 'hostname': hostname, + 'ip': socket.gethostbyname(hostname)}) def _execute_default(self): """