Agent: Store MSSQLExploiter error message in self.exploit_result

This commit is contained in:
Mike Salvatore 2022-03-15 08:41:23 -04:00
parent 43c8528409
commit 62005e6f88
1 changed files with 6 additions and 2 deletions

View File

@ -89,10 +89,14 @@ class MSSQLExploiter(HostExploiter):
self.remove_temp_dir()
except Exception as e:
logger.error(
f"Unhandled exception occurred when trying "
error_message = (
f"An unexpected error occurred when trying "
f"to exploit MSSQL on host {self.host}: {e}"
)
logger.error(error_message)
self.exploit_result.error_message = error_message
return self.exploit_result
self.exploit_result.propagation_success = True