Agent: Move timestamp closer to ssh.exec_command()

This commit is contained in:
Mike Salvatore 2022-10-06 09:57:11 -04:00
parent 52380a2513
commit c980bfd915
1 changed files with 1 additions and 1 deletions

View File

@ -248,11 +248,11 @@ class SSHExploiter(HostExploiter):
if status == ScanStatus.SCANNED:
raise FailedExploitationError(self.exploit_result.error_message)
timestamp = time()
try:
cmdline = f"{monkey_path_on_victim} {MONKEY_ARG}"
cmdline += build_monkey_commandline(self.servers, self.current_depth + 1)
cmdline += " > /dev/null 2>&1 &"
timestamp = time()
ssh.exec_command(cmdline, timeout=SSH_EXEC_TIMEOUT)
logger.info(