From f091c1c83ddd99782d12f51091759466ae5f4c8e Mon Sep 17 00:00:00 2001 From: Kekoa Kaaikala Date: Wed, 10 Aug 2022 17:31:42 +0000 Subject: [PATCH] Agent: Update type hints in commands.py --- monkey/infection_monkey/utils/commands.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/monkey/infection_monkey/utils/commands.py b/monkey/infection_monkey/utils/commands.py index b66a622e9..7b91b8c2a 100644 --- a/monkey/infection_monkey/utils/commands.py +++ b/monkey/infection_monkey/utils/commands.py @@ -1,3 +1,5 @@ +from typing import List + from infection_monkey.config import GUID from infection_monkey.exploit.tools.helpers import AGENT_BINARY_PATH_LINUX, AGENT_BINARY_PATH_WIN64 from infection_monkey.model import CMD_CARRY_OUT, CMD_EXE, MONKEY_ARG @@ -27,7 +29,7 @@ def build_monkey_commandline_explicitly( server: str = None, depth: int = None, location: str = None, -) -> list: +) -> List[str]: cmdline = [] if parent is not None: @@ -49,13 +51,13 @@ def build_monkey_commandline_explicitly( return cmdline -def get_monkey_commandline_windows(destination_path: str, monkey_cmd_args: list) -> list: +def get_monkey_commandline_windows(destination_path: str, monkey_cmd_args: List[str]) -> List[str]: monkey_cmdline = [CMD_EXE, CMD_CARRY_OUT, destination_path, MONKEY_ARG] return monkey_cmdline + monkey_cmd_args -def get_monkey_commandline_linux(destination_path: str, monkey_cmd_args: list) -> list: +def get_monkey_commandline_linux(destination_path: str, monkey_cmd_args: List[str]) -> List[str]: monkey_cmdline = [destination_path, MONKEY_ARG] return monkey_cmdline + monkey_cmd_args