forked from p34709852/monkey
Agent: Add options parameter to IPuppet.fingerprint()
This commit is contained in:
parent
0dae58baaf
commit
5695808adb
|
@ -83,6 +83,7 @@ class IPuppet(metaclass=abc.ABCMeta):
|
||||||
host: str,
|
host: str,
|
||||||
ping_scan_data: PingScanData,
|
ping_scan_data: PingScanData,
|
||||||
port_scan_data: Dict[int, PortScanData],
|
port_scan_data: Dict[int, PortScanData],
|
||||||
|
options: Dict,
|
||||||
) -> FingerprintData:
|
) -> FingerprintData:
|
||||||
"""
|
"""
|
||||||
Runs a fingerprinter against a remote host
|
Runs a fingerprinter against a remote host
|
||||||
|
@ -91,6 +92,8 @@ class IPuppet(metaclass=abc.ABCMeta):
|
||||||
:param PingScanData ping_scan_data: Data retrieved from the target host via ICMP
|
:param PingScanData ping_scan_data: Data retrieved from the target host via ICMP
|
||||||
:param Dict[int, PortScanData] port_scan_data: Data retrieved from the target host via a TCP
|
:param Dict[int, PortScanData] port_scan_data: Data retrieved from the target host via a TCP
|
||||||
port scan
|
port scan
|
||||||
|
:param Dict options: A dictionary containing options that modify the behavior of the
|
||||||
|
fingerprinter
|
||||||
:return: The data collected by running the fingerprinter on the specified host
|
:return: The data collected by running the fingerprinter on the specified host
|
||||||
:rtype: FingerprintData
|
:rtype: FingerprintData
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -95,6 +95,8 @@ class IPScanner:
|
||||||
fingerprint_data = {}
|
fingerprint_data = {}
|
||||||
|
|
||||||
for f in interruptable_iter(fingerprinters, stop):
|
for f in interruptable_iter(fingerprinters, stop):
|
||||||
fingerprint_data[f] = self._puppet.fingerprint(f, ip, ping_scan_data, port_scan_data)
|
fingerprint_data[f] = self._puppet.fingerprint(
|
||||||
|
f, ip, ping_scan_data, port_scan_data, {}
|
||||||
|
)
|
||||||
|
|
||||||
return fingerprint_data
|
return fingerprint_data
|
||||||
|
|
|
@ -206,6 +206,7 @@ class MockPuppet(IPuppet):
|
||||||
host: str,
|
host: str,
|
||||||
ping_scan_data: PingScanData,
|
ping_scan_data: PingScanData,
|
||||||
port_scan_data: Dict[int, PortScanData],
|
port_scan_data: Dict[int, PortScanData],
|
||||||
|
options: Dict,
|
||||||
) -> FingerprintData:
|
) -> FingerprintData:
|
||||||
logger.debug(f"fingerprint({name}, {host})")
|
logger.debug(f"fingerprint({name}, {host})")
|
||||||
empty_fingerprint_data = FingerprintData(None, None, {})
|
empty_fingerprint_data = FingerprintData(None, None, {})
|
||||||
|
|
|
@ -47,8 +47,9 @@ class Puppet(IPuppet):
|
||||||
host: str,
|
host: str,
|
||||||
ping_scan_data: PingScanData,
|
ping_scan_data: PingScanData,
|
||||||
port_scan_data: Dict[int, PortScanData],
|
port_scan_data: Dict[int, PortScanData],
|
||||||
|
options: Dict,
|
||||||
) -> FingerprintData:
|
) -> FingerprintData:
|
||||||
return self._mock_puppet.fingerprint(name, host, ping_scan_data, port_scan_data)
|
return self._mock_puppet.fingerprint(name, host, ping_scan_data, port_scan_data, options)
|
||||||
|
|
||||||
def exploit_host(
|
def exploit_host(
|
||||||
self, name: str, host: str, options: Dict, interrupt: threading.Event
|
self, name: str, host: str, options: Dict, interrupt: threading.Event
|
||||||
|
|
Loading…
Reference in New Issue