forked from p34709852/monkey
Agent: Re-raise exceptions in HostExploiter
The AutomatedMaster can't process the exceptions if the HostExploiter swallows them. The HostExploiter can log and re-raise the exceptions so they can be processed by the AutomatedMaster.
This commit is contained in:
parent
00829ac094
commit
fd2143a4df
|
@ -82,16 +82,16 @@ class HostExploiter:
|
|||
self.options = options
|
||||
|
||||
self.pre_exploit()
|
||||
result = None
|
||||
try:
|
||||
result = self._exploit_host()
|
||||
return self._exploit_host()
|
||||
except FailedExploitationError as e:
|
||||
logger.debug(f"Exploiter failed: {e}.")
|
||||
except Exception:
|
||||
raise e
|
||||
except Exception as e:
|
||||
logger.error("Exception in exploit_host", exc_info=True)
|
||||
raise e
|
||||
finally:
|
||||
self.post_exploit()
|
||||
return result
|
||||
|
||||
def pre_exploit(self):
|
||||
self.exploit_result = ExploiterResultData(
|
||||
|
|
Loading…
Reference in New Issue