From b9219e37839f610faa83f07abccb7a2ae664c57e Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Tue, 14 Dec 2021 11:53:24 +0100 Subject: [PATCH] Agent: Remove tcp scan interval option --- monkey/infection_monkey/config.py | 1 - monkey/infection_monkey/example.conf | 1 - monkey/infection_monkey/network/network_scanner.py | 4 ---- 3 files changed, 6 deletions(-) diff --git a/monkey/infection_monkey/config.py b/monkey/infection_monkey/config.py index 356a15979..49f2b0c71 100644 --- a/monkey/infection_monkey/config.py +++ b/monkey/infection_monkey/config.py @@ -136,7 +136,6 @@ class Configuration(object): tcp_target_ports = [22, 2222, 445, 135, 3389, 80, 8080, 443, 8008, 3306, 9200] tcp_target_ports.extend(HTTP_PORTS) tcp_scan_timeout = 3000 # 3000 Milliseconds - tcp_scan_interval = 0 # in milliseconds tcp_scan_get_banner = True # Ping Scanner diff --git a/monkey/infection_monkey/example.conf b/monkey/infection_monkey/example.conf index 6d0780456..322171399 100644 --- a/monkey/infection_monkey/example.conf +++ b/monkey/infection_monkey/example.conf @@ -57,7 +57,6 @@ "exploit_ssh_keys": [], "local_network_scan": false, "tcp_scan_get_banner": true, - "tcp_scan_interval": 0, "tcp_scan_timeout": 10000, "tcp_target_ports": [ 22, diff --git a/monkey/infection_monkey/network/network_scanner.py b/monkey/infection_monkey/network/network_scanner.py index c7e39909e..340763957 100644 --- a/monkey/infection_monkey/network/network_scanner.py +++ b/monkey/infection_monkey/network/network_scanner.py @@ -1,5 +1,4 @@ import logging -import time from multiprocessing.dummy import Pool from common.network.network_range import NetworkRange @@ -108,9 +107,6 @@ class NetworkScanner(object): if victims_count >= max_find: logger.debug("Found max needed victims (%d), stopping scan", max_find) return - if WormConfiguration.tcp_scan_interval: - # time.sleep uses seconds, while config is in milliseconds - time.sleep(WormConfiguration.tcp_scan_interval / float(1000)) @staticmethod def _is_any_ip_in_subnet(ip_addresses, subnet_str):