From 10d1e7dc0bffef1f9772c2ae9cfa10034e443ca2 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Fri, 8 May 2020 17:14:17 +0300 Subject: [PATCH] Fixed monkey ignoring depth restrictions --- monkey/infection_monkey/monkey.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]