Agent: Remove code that set `exploit_result`'s fields to the default value in SSH exploiter
This commit is contained in:
parent
4ecc5283e5
commit
58703f9b5b
|
@ -125,9 +125,6 @@ class SSHExploiter(HostExploiter):
|
|||
self.exploit_result["exploitation_success"] = True
|
||||
except FailedExploitationError:
|
||||
self.exploit_result["error_message"] = "Exploiter SSHExploiter is giving up..."
|
||||
self.exploit_result["exploitation_success"] = False
|
||||
self.exploit_result["propagation_success"] = False
|
||||
|
||||
logger.debug(self.exploit_result["error_message"])
|
||||
return self.return_exploit_result_data()
|
||||
|
||||
|
@ -145,7 +142,6 @@ class SSHExploiter(HostExploiter):
|
|||
logger.error(self.exploit_result["error_message"])
|
||||
return self.return_exploit_result_data()
|
||||
except Exception as exc:
|
||||
self.exploit_result["propagation_success"] = False
|
||||
self.exploit_result[
|
||||
"error_message"
|
||||
] = f"Error running uname os command on victim {self.host}: ({exc})"
|
||||
|
@ -168,7 +164,6 @@ class SSHExploiter(HostExploiter):
|
|||
src_path = get_target_monkey(self.host)
|
||||
|
||||
if not src_path:
|
||||
self.exploit_result["propagation_success"] = False
|
||||
self.exploit_result[
|
||||
"error_message"
|
||||
] = f"Can't find suitable monkey executable for host {self.host}"
|
||||
|
@ -198,7 +193,6 @@ class SSHExploiter(HostExploiter):
|
|||
)
|
||||
ftp.close()
|
||||
except Exception as exc:
|
||||
self.exploit_result["propagation_success"] = False
|
||||
self.exploit_result[
|
||||
"error_message"
|
||||
] = f"Error uploading file into victim {self.host}: ({exc})"
|
||||
|
@ -233,7 +227,6 @@ class SSHExploiter(HostExploiter):
|
|||
return self.return_exploit_result_data()
|
||||
|
||||
except Exception as exc:
|
||||
self.exploit_result["propagation_success"] = False
|
||||
self.exploit_result[
|
||||
"error_message"
|
||||
] = f"Error running monkey on victim {self.host}: ({exc})"
|
||||
|
|
Loading…
Reference in New Issue