From 00829ac094c5850b3a88ea411e60720d3b44d65a Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 7 Mar 2022 06:20:34 -0500 Subject: [PATCH] Agent: Add TODOs to AutomatedMaster --- monkey/infection_monkey/master/automated_master.py | 1 + monkey/infection_monkey/master/ip_scanner.py | 1 + 2 files changed, 2 insertions(+) diff --git a/monkey/infection_monkey/master/automated_master.py b/monkey/infection_monkey/master/automated_master.py index bf2e11132..370bcfedd 100644 --- a/monkey/infection_monkey/master/automated_master.py +++ b/monkey/infection_monkey/master/automated_master.py @@ -209,6 +209,7 @@ class AutomatedMaster(IMaster): interrupted_message = f"Received a stop signal, skipping remaining {plugin_type}s" for p in interruptable_iter(plugins, self._stop, interrupted_message): + # TODO: Catch exceptions to prevent thread from crashing callback(p) logger.info(f"Finished running {plugin_type}s") diff --git a/monkey/infection_monkey/master/ip_scanner.py b/monkey/infection_monkey/master/ip_scanner.py index 5c768506b..ee474ab49 100644 --- a/monkey/infection_monkey/master/ip_scanner.py +++ b/monkey/infection_monkey/master/ip_scanner.py @@ -58,6 +58,7 @@ class IPScanner: address = addresses.get_nowait() logger.info(f"Scanning {address.ip}") + # TODO: Catch exceptions to prevent thread from crashing ping_scan_data = self._puppet.ping(address.ip, icmp_timeout) port_scan_data = self._puppet.scan_tcp_ports(address.ip, tcp_ports, tcp_timeout)