diff --git a/monkey/infection_monkey/master/propagator.py b/monkey/infection_monkey/master/propagator.py index c11e38d46..03a5d5ec7 100644 --- a/monkey/infection_monkey/master/propagator.py +++ b/monkey/infection_monkey/master/propagator.py @@ -1,5 +1,4 @@ import logging -from dataclasses import replace from ipaddress import IPv4Interface from queue import Queue from threading import Event @@ -93,9 +92,9 @@ class Propagator: modified_options = fingerprinter.options.copy() modified_options["http_ports"] = list(http_ports) - modified_fingerprinters[i] = replace(fingerprinter, options=modified_options) + modified_fingerprinters[i] = fingerprinter.copy(update={"options": modified_options}) - return replace(network_scan, fingerprinters=modified_fingerprinters) + return network_scan.copy(update={"fingerprinters": modified_fingerprinters}) def _scan_network(self, scan_config: NetworkScanConfiguration, stop: Event): logger.info("Starting network scan")