diff --git a/monkey/infection_monkey/network/tcp_scanner.py b/monkey/infection_monkey/network/tcp_scanner.py index 69a659bf8..5605d5654 100644 --- a/monkey/infection_monkey/network/tcp_scanner.py +++ b/monkey/infection_monkey/network/tcp_scanner.py @@ -31,6 +31,7 @@ class TcpScanner(HostScanner, HostFinger): # maybe hide under really bad detection systems target_ports = self._config.tcp_target_ports[:] + target_ports = list(filter(None, target_ports)) # remove None values shuffle(target_ports) ports, banners = check_tcp_ports(host.ip_addr, target_ports, self._config.tcp_scan_timeout / 1000.0,