Agent: Handle error messages from exploit_host() in MockMaster

This commit is contained in:
Mike Salvatore 2021-12-15 09:44:22 -05:00
parent ba5d755dfa
commit 0f149f7eee
1 changed files with 4 additions and 2 deletions

View File

@ -100,7 +100,7 @@ class MockMaster(IMaster):
def _exploit(self):
logger.info("Exploiting victims")
result, info, attempts = self._puppet.exploit_host(
result, info, attempts, error_message = self._puppet.exploit_host(
"PowerShellExploiter", "10.0.0.1", {}, None
)
logger.info(f"Attempts for exploiting {attempts}")
@ -108,7 +108,9 @@ class MockMaster(IMaster):
ExploitTelem("PowerShellExploiter", self._hosts["10.0.0.1"], result, info, attempts)
)
result, info, attempts = self._puppet.exploit_host("SSHExploiter", "10.0.0.3", {}, None)
result, info, attempts, error_message = self._puppet.exploit_host(
"SSHExploiter", "10.0.0.3", {}, None
)
logger.info(f"Attempts for exploiting {attempts}")
self._telemetry_messenger.send_telemetry(
ExploitTelem("SSHExploiter", self._hosts["10.0.0.3"], result, info, attempts)