diff --git a/monkey/infection_monkey/i_puppet/i_puppet.py b/monkey/infection_monkey/i_puppet/i_puppet.py index c0a42d95c..1908e5337 100644 --- a/monkey/infection_monkey/i_puppet/i_puppet.py +++ b/monkey/infection_monkey/i_puppet/i_puppet.py @@ -83,6 +83,7 @@ class IPuppet(metaclass=abc.ABCMeta): host: str, ping_scan_data: PingScanData, port_scan_data: Dict[int, PortScanData], + options: Dict, ) -> FingerprintData: """ 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 Dict[int, PortScanData] port_scan_data: Data retrieved from the target host via a TCP 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 :rtype: FingerprintData """ diff --git a/monkey/infection_monkey/master/ip_scanner.py b/monkey/infection_monkey/master/ip_scanner.py index 135f79c94..c78b2e2f9 100644 --- a/monkey/infection_monkey/master/ip_scanner.py +++ b/monkey/infection_monkey/master/ip_scanner.py @@ -95,6 +95,8 @@ class IPScanner: fingerprint_data = {} 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 diff --git a/monkey/infection_monkey/puppet/mock_puppet.py b/monkey/infection_monkey/puppet/mock_puppet.py index d35ec2cbb..ec3984685 100644 --- a/monkey/infection_monkey/puppet/mock_puppet.py +++ b/monkey/infection_monkey/puppet/mock_puppet.py @@ -206,6 +206,7 @@ class MockPuppet(IPuppet): host: str, ping_scan_data: PingScanData, port_scan_data: Dict[int, PortScanData], + options: Dict, ) -> FingerprintData: logger.debug(f"fingerprint({name}, {host})") empty_fingerprint_data = FingerprintData(None, None, {}) diff --git a/monkey/infection_monkey/puppet/puppet.py b/monkey/infection_monkey/puppet/puppet.py index 175a3f0eb..b7be64002 100644 --- a/monkey/infection_monkey/puppet/puppet.py +++ b/monkey/infection_monkey/puppet/puppet.py @@ -47,8 +47,9 @@ class Puppet(IPuppet): host: str, ping_scan_data: PingScanData, port_scan_data: Dict[int, PortScanData], + options: Dict, ) -> 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( self, name: str, host: str, options: Dict, interrupt: threading.Event