diff --git a/monkey/infection_monkey/utils/commands.py b/monkey/infection_monkey/utils/commands.py index b9e042e00..ee2f0153a 100644 --- a/monkey/infection_monkey/utils/commands.py +++ b/monkey/infection_monkey/utils/commands.py @@ -7,7 +7,7 @@ def build_monkey_commandline( target_host: VictimHost, depth: int, vulnerable_port: str, location: str = None ) -> str: - return " ".join( + return " " + " ".join( build_monkey_commandline_explicitly( GUID, target_host.default_tunnel, diff --git a/monkey/tests/unit_tests/infection_monkey/utils/test_commands.py b/monkey/tests/unit_tests/infection_monkey/utils/test_commands.py index efb0623bd..a3f210533 100644 --- a/monkey/tests/unit_tests/infection_monkey/utils/test_commands.py +++ b/monkey/tests/unit_tests/infection_monkey/utils/test_commands.py @@ -100,7 +100,7 @@ def test_build_monkey_commandline(): example_host = VictimHost(ip_addr="bla") example_host.set_default_server("101010") - expected = f"-p {GUID} -s 101010 -d 0 -l /home/bla -vp 80" + expected = f" -p {GUID} -s 101010 -d 0 -l /home/bla -vp 80" actual = build_monkey_commandline( target_host=example_host, depth=0, vulnerable_port="80", location="/home/bla" )