Agent: Add default return value in MockPuppet.exploit_host()

This commit is contained in:
Mike Salvatore 2021-12-14 15:32:10 -05:00
parent 6c1caa1af4
commit 4b3984dbd7
1 changed files with 4 additions and 1 deletions

View File

@ -294,7 +294,10 @@ class MockPuppet(IPuppet):
},
}
return successful_exploiters[host][name]
try:
return successful_exploiters[host][name]
except KeyError:
return ExploiterResultData(False, {}, [], f"{name} failed for host {host}")
def run_payload(
self, name: str, options: Dict, interrupt: threading.Event