diff --git a/monkey/infection_monkey/i_puppet.py b/monkey/infection_monkey/i_puppet.py index 78a0ea83f..e25d20f53 100644 --- a/monkey/infection_monkey/i_puppet.py +++ b/monkey/infection_monkey/i_puppet.py @@ -16,7 +16,9 @@ class UnknownPluginError(Exception): pass -ExploiterResultData = namedtuple("ExploiterResultData", ["success", "info", "attempts"]) +ExploiterResultData = namedtuple( + "ExploiterResultData", ["success", "info", "attempts", "error_message"] +) PingScanData = namedtuple("PingScanData", ["response_received", "os"]) PortScanData = namedtuple("PortScanData", ["port", "status", "banner", "service"]) FingerprintData = namedtuple("FingerprintData", ["os_type", "os_version", "services"]) diff --git a/monkey/infection_monkey/puppet/mock_puppet.py b/monkey/infection_monkey/puppet/mock_puppet.py index 5f0389752..fe21f4cb0 100644 --- a/monkey/infection_monkey/puppet/mock_puppet.py +++ b/monkey/infection_monkey/puppet/mock_puppet.py @@ -280,8 +280,12 @@ class MockPuppet(IPuppet): "executed_cmds": [], } successful_exploiters = { - DOT_1: {"PowerShellExploiter": ExploiterResultData(True, info_powershell, attempts)}, - DOT_3: {"SSHExploiter": ExploiterResultData(False, info_ssh, attempts)}, + DOT_1: { + "PowerShellExploiter": ExploiterResultData(True, info_powershell, attempts, None) + }, + DOT_3: { + "SSHExploiter": ExploiterResultData(False, info_ssh, attempts, "Failed exploiting") + }, } return successful_exploiters[host][name]