From eea07461c5c494af85f07d218fbfdce967655acf Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 28 Feb 2022 11:22:23 -0500 Subject: [PATCH] Agent: Remove attempt to get architecture from target in ssh exploiter Since Infection Monkey only supports the x86_64 architecture,there's little use in collecting the architecture from the destination. --- monkey/infection_monkey/exploit/sshexec.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/monkey/infection_monkey/exploit/sshexec.py b/monkey/infection_monkey/exploit/sshexec.py index 4cbfd1e5c..5f14ce25b 100644 --- a/monkey/infection_monkey/exploit/sshexec.py +++ b/monkey/infection_monkey/exploit/sshexec.py @@ -149,18 +149,6 @@ class SSHExploiter(HostExploiter): logger.error(self.exploit_result.error_message) return self.exploit_result - if not self.host.os.get("machine"): - try: - _, stdout, _ = ssh.exec_command("uname -m") - uname_machine = stdout.read().lower().strip().decode() - if "" != uname_machine: - self.host.os["machine"] = uname_machine - except Exception as exc: - self.exploit_result.error_message = ( - f"Error running uname machine command on victim {self.host}: ({exc})" - ) - logger.error(self.exploit_result.error_message) - src_path = get_target_monkey(self.host) if not src_path: