From 16b2b87adcd0d6a34dfd21c9ead44bd40f5f836f Mon Sep 17 00:00:00 2001 From: Shreya Date: Fri, 21 Feb 2020 12:37:42 +0530 Subject: [PATCH] Remove `None` values from list of TCP ports --- monkey/infection_monkey/network/tcp_scanner.py | 1 + 1 file changed, 1 insertion(+) 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,