forked from p15670423/monkey
Agent: Add "error_message" to ExploiterResultData
This commit is contained in:
parent
eb7612d80d
commit
1e02286b2a
|
@ -16,7 +16,9 @@ class UnknownPluginError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
ExploiterResultData = namedtuple("ExploiterResultData", ["success", "info", "attempts"])
|
ExploiterResultData = namedtuple(
|
||||||
|
"ExploiterResultData", ["success", "info", "attempts", "error_message"]
|
||||||
|
)
|
||||||
PingScanData = namedtuple("PingScanData", ["response_received", "os"])
|
PingScanData = namedtuple("PingScanData", ["response_received", "os"])
|
||||||
PortScanData = namedtuple("PortScanData", ["port", "status", "banner", "service"])
|
PortScanData = namedtuple("PortScanData", ["port", "status", "banner", "service"])
|
||||||
FingerprintData = namedtuple("FingerprintData", ["os_type", "os_version", "services"])
|
FingerprintData = namedtuple("FingerprintData", ["os_type", "os_version", "services"])
|
||||||
|
|
|
@ -280,8 +280,12 @@ class MockPuppet(IPuppet):
|
||||||
"executed_cmds": [],
|
"executed_cmds": [],
|
||||||
}
|
}
|
||||||
successful_exploiters = {
|
successful_exploiters = {
|
||||||
DOT_1: {"PowerShellExploiter": ExploiterResultData(True, info_powershell, attempts)},
|
DOT_1: {
|
||||||
DOT_3: {"SSHExploiter": ExploiterResultData(False, info_ssh, attempts)},
|
"PowerShellExploiter": ExploiterResultData(True, info_powershell, attempts, None)
|
||||||
|
},
|
||||||
|
DOT_3: {
|
||||||
|
"SSHExploiter": ExploiterResultData(False, info_ssh, attempts, "Failed exploiting")
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return successful_exploiters[host][name]
|
return successful_exploiters[host][name]
|
||||||
|
|
Loading…
Reference in New Issue