forked from p15670423/monkey
Agent: Handle unexpected errors in mssqlexec.py
This commit is contained in:
parent
1f327a1305
commit
43c8528409
|
@ -73,6 +73,7 @@ class MSSQLExploiter(HostExploiter):
|
||||||
)
|
)
|
||||||
return self.exploit_result
|
return self.exploit_result
|
||||||
|
|
||||||
|
try:
|
||||||
# Create dir for payload
|
# Create dir for payload
|
||||||
self.create_temp_dir()
|
self.create_temp_dir()
|
||||||
self.create_empty_payload_file()
|
self.create_empty_payload_file()
|
||||||
|
@ -87,6 +88,12 @@ class MSSQLExploiter(HostExploiter):
|
||||||
self.run_monkey()
|
self.run_monkey()
|
||||||
|
|
||||||
self.remove_temp_dir()
|
self.remove_temp_dir()
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(
|
||||||
|
f"Unhandled exception occurred when trying "
|
||||||
|
f"to exploit MSSQL on host {self.host}: {e}"
|
||||||
|
)
|
||||||
|
return self.exploit_result
|
||||||
|
|
||||||
self.exploit_result.propagation_success = True
|
self.exploit_result.propagation_success = True
|
||||||
return self.exploit_result
|
return self.exploit_result
|
||||||
|
|
Loading…
Reference in New Issue