Remove `None` values from list of TCP ports

This commit is contained in:
Shreya 2020-02-21 12:37:42 +05:30
parent 20fff43fa9
commit 16b2b87adc
1 changed files with 1 additions and 0 deletions

View File

@ -31,6 +31,7 @@ class TcpScanner(HostScanner, HostFinger):
# maybe hide under really bad detection systems # maybe hide under really bad detection systems
target_ports = self._config.tcp_target_ports[:] target_ports = self._config.tcp_target_ports[:]
target_ports = list(filter(None, target_ports)) # remove None values
shuffle(target_ports) shuffle(target_ports)
ports, banners = check_tcp_ports(host.ip_addr, target_ports, self._config.tcp_scan_timeout / 1000.0, ports, banners = check_tcp_ports(host.ip_addr, target_ports, self._config.tcp_scan_timeout / 1000.0,