forked from p15670423/monkey
Agent: Replace fields in configuration using pydantic syntax in propagator
This commit is contained in:
parent
45c6fda8b2
commit
163c54a8c3
|
@ -1,5 +1,4 @@
|
||||||
import logging
|
import logging
|
||||||
from dataclasses import replace
|
|
||||||
from ipaddress import IPv4Interface
|
from ipaddress import IPv4Interface
|
||||||
from queue import Queue
|
from queue import Queue
|
||||||
from threading import Event
|
from threading import Event
|
||||||
|
@ -93,9 +92,9 @@ class Propagator:
|
||||||
|
|
||||||
modified_options = fingerprinter.options.copy()
|
modified_options = fingerprinter.options.copy()
|
||||||
modified_options["http_ports"] = list(http_ports)
|
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):
|
def _scan_network(self, scan_config: NetworkScanConfiguration, stop: Event):
|
||||||
logger.info("Starting network scan")
|
logger.info("Starting network scan")
|
||||||
|
|
Loading…
Reference in New Issue