From a158665f2b00a3992bbc86dcd7a67eb0c31aa028 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 18 Jun 2021 12:38:32 +0200 Subject: [PATCH] agent: Change absolute path to full path in get_monkey_commandline_linux --- monkey/infection_monkey/utils/commands.py | 2 +- monkey/tests/unit_tests/infection_monkey/utils/test_commands.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/infection_monkey/utils/commands.py b/monkey/infection_monkey/utils/commands.py index c5755a4be..bb7ec569d 100644 --- a/monkey/infection_monkey/utils/commands.py +++ b/monkey/infection_monkey/utils/commands.py @@ -56,6 +56,6 @@ def get_monkey_commandline_windows(destination_path, monkey_options): def get_monkey_commandline_linux(destination_path, monkey_options): - monkey_cmdline = [destination_path.split("/")[-1], MONKEY_ARG] + monkey_cmdline = [destination_path, MONKEY_ARG] return monkey_cmdline + monkey_options 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 df92296a9..4eebd0ee4 100644 --- a/monkey/tests/unit_tests/infection_monkey/utils/test_commands.py +++ b/monkey/tests/unit_tests/infection_monkey/utils/test_commands.py @@ -73,7 +73,7 @@ def test_get_monkey_commandline_windows(): def test_get_monkey_commandline_linux(): expected = [ - "monkey-linux-64", + "/home/user/monkey-linux-64", "m0nk3y", "-p", "101010",