From 552e2100faa767f13f5e9fd1227e64416814c5c1 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Wed, 22 Jun 2022 14:33:47 +0300 Subject: [PATCH] Agent: Set default depth cmd parameter to 0 If user runs the agent it should start with depth 0, because usually it means that it's running on the island --- monkey/infection_monkey/dropper.py | 2 +- monkey/infection_monkey/monkey.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/infection_monkey/dropper.py b/monkey/infection_monkey/dropper.py index 48e5bb86d..3ba310492 100644 --- a/monkey/infection_monkey/dropper.py +++ b/monkey/infection_monkey/dropper.py @@ -46,7 +46,7 @@ class MonkeyDrops(object): arg_parser.add_argument("-p", "--parent") arg_parser.add_argument("-t", "--tunnel") arg_parser.add_argument("-s", "--server") - arg_parser.add_argument("-d", "--depth", type=positive_int) + arg_parser.add_argument("-d", "--depth", type=positive_int, default=0) arg_parser.add_argument("-l", "--location") arg_parser.add_argument("-vp", "--vulnerable-port") self.opts = arg_parser.parse_args(args) diff --git a/monkey/infection_monkey/monkey.py b/monkey/infection_monkey/monkey.py index e02e4e2eb..d91f28018 100644 --- a/monkey/infection_monkey/monkey.py +++ b/monkey/infection_monkey/monkey.py @@ -106,7 +106,7 @@ class InfectionMonkey: arg_parser.add_argument("-p", "--parent") arg_parser.add_argument("-t", "--tunnel") arg_parser.add_argument("-s", "--server") - arg_parser.add_argument("-d", "--depth", type=positive_int) + arg_parser.add_argument("-d", "--depth", type=positive_int, default=0) opts = arg_parser.parse_args(args) InfectionMonkey._log_arguments(opts)