Skip to content

Commit

Permalink
Merge pull request #335 from VakarisZ/post_breach_hotfix
Browse files Browse the repository at this point in the history
Hotfixed telemetry feed for post breach actions
  • Loading branch information
VakarisZ authored May 30, 2019
2 parents 9f0e3c8 + 053f968 commit 016b73c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion monkey/infection_monkey/post_breach/pba.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -44,9 +45,12 @@ def run(self):
"""
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):
"""
Expand Down

0 comments on commit 016b73c

Please sign in to comment.