diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index 6b8803a9f..fa736cfc7 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -80,8 +80,10 @@ class InfectionMonkey(object): self._default_tunnel = self._opts.tunnel self._default_server = self._opts.server - if self._opts.depth: + if self._opts.depth is not None: WormConfiguration._depth_from_commandline = True + WormConfiguration.depth = self._opts.depth + self._keep_running = True self._network = NetworkScanner() self._dropper_path = sys.argv[0]