forked from p15670423/monkey
Agent: Update type hints in commands.py
This commit is contained in:
parent
48797397f6
commit
f091c1c83d
|
@ -1,3 +1,5 @@
|
||||||
|
from typing import List
|
||||||
|
|
||||||
from infection_monkey.config import GUID
|
from infection_monkey.config import GUID
|
||||||
from infection_monkey.exploit.tools.helpers import AGENT_BINARY_PATH_LINUX, AGENT_BINARY_PATH_WIN64
|
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
|
from infection_monkey.model import CMD_CARRY_OUT, CMD_EXE, MONKEY_ARG
|
||||||
|
@ -27,7 +29,7 @@ def build_monkey_commandline_explicitly(
|
||||||
server: str = None,
|
server: str = None,
|
||||||
depth: int = None,
|
depth: int = None,
|
||||||
location: str = None,
|
location: str = None,
|
||||||
) -> list:
|
) -> List[str]:
|
||||||
cmdline = []
|
cmdline = []
|
||||||
|
|
||||||
if parent is not None:
|
if parent is not None:
|
||||||
|
@ -49,13 +51,13 @@ def build_monkey_commandline_explicitly(
|
||||||
return cmdline
|
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]
|
monkey_cmdline = [CMD_EXE, CMD_CARRY_OUT, destination_path, MONKEY_ARG]
|
||||||
|
|
||||||
return monkey_cmdline + monkey_cmd_args
|
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]
|
monkey_cmdline = [destination_path, MONKEY_ARG]
|
||||||
|
|
||||||
return monkey_cmdline + monkey_cmd_args
|
return monkey_cmdline + monkey_cmd_args
|
||||||
|
|
Loading…
Reference in New Issue