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
|
self.exploit_result["exploitation_success"] = True
|
||||||
except FailedExploitationError:
|
except FailedExploitationError:
|
||||||
self.exploit_result["error_message"] = "Exploiter SSHExploiter is giving up..."
|
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"])
|
logger.debug(self.exploit_result["error_message"])
|
||||||
return self.return_exploit_result_data()
|
return self.return_exploit_result_data()
|
||||||
|
|
||||||
|
@ -145,7 +142,6 @@ class SSHExploiter(HostExploiter):
|
||||||
logger.error(self.exploit_result["error_message"])
|
logger.error(self.exploit_result["error_message"])
|
||||||
return self.return_exploit_result_data()
|
return self.return_exploit_result_data()
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
self.exploit_result["propagation_success"] = False
|
|
||||||
self.exploit_result[
|
self.exploit_result[
|
||||||
"error_message"
|
"error_message"
|
||||||
] = f"Error running uname os command on victim {self.host}: ({exc})"
|
] = 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)
|
src_path = get_target_monkey(self.host)
|
||||||
|
|
||||||
if not src_path:
|
if not src_path:
|
||||||
self.exploit_result["propagation_success"] = False
|
|
||||||
self.exploit_result[
|
self.exploit_result[
|
||||||
"error_message"
|
"error_message"
|
||||||
] = f"Can't find suitable monkey executable for host {self.host}"
|
] = f"Can't find suitable monkey executable for host {self.host}"
|
||||||
|
@ -198,7 +193,6 @@ class SSHExploiter(HostExploiter):
|
||||||
)
|
)
|
||||||
ftp.close()
|
ftp.close()
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
self.exploit_result["propagation_success"] = False
|
|
||||||
self.exploit_result[
|
self.exploit_result[
|
||||||
"error_message"
|
"error_message"
|
||||||
] = f"Error uploading file into victim {self.host}: ({exc})"
|
] = f"Error uploading file into victim {self.host}: ({exc})"
|
||||||
|
@ -233,7 +227,6 @@ class SSHExploiter(HostExploiter):
|
||||||
return self.return_exploit_result_data()
|
return self.return_exploit_result_data()
|
||||||
|
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
self.exploit_result["propagation_success"] = False
|
|
||||||
self.exploit_result[
|
self.exploit_result[
|
||||||
"error_message"
|
"error_message"
|
||||||
] = f"Error running monkey on victim {self.host}: ({exc})"
|
] = f"Error running monkey on victim {self.host}: ({exc})"
|
||||||
|
|
Loading…
Reference in New Issue