From 0cc83939b313d4264a0cbf791ecbcb712296ae20 Mon Sep 17 00:00:00 2001 From: vakarisz Date: Tue, 11 Jun 2024 16:45:54 +0300 Subject: [PATCH] Rename build_chmod_command to build_permission_change_command --- agentpluginapi/i_linux_agent_command_builder.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/agentpluginapi/i_linux_agent_command_builder.py b/agentpluginapi/i_linux_agent_command_builder.py index 9e6ae73..f9bb9c0 100644 --- a/agentpluginapi/i_linux_agent_command_builder.py +++ b/agentpluginapi/i_linux_agent_command_builder.py @@ -4,7 +4,7 @@ from typing import Optional from monkeytypes import InfectionMonkeyBaseModel -from pydantic import model_validator +from pydantic import model_validator, Field from .dropper_execution_mode import DropperExecutionMode @@ -20,9 +20,9 @@ class LinuxDownloadOptions(InfectionMonkeyBaseModel): download_url: str -class LinuxChmodOptions(InfectionMonkeyBaseModel): +class LinuxPermissionChangeOptions(InfectionMonkeyBaseModel): file_path: PurePosixPath - permission_string = "u+x" + permissions: int = Field(ge=0, le=777) class LinuxRunOptions(InfectionMonkeyBaseModel): @@ -53,11 +53,12 @@ def build_download_command(self, download_options: LinuxDownloadOptions): """ @abc.abstractmethod - def build_chmod_command(self, chmod_options: LinuxChmodOptions): + def build_permission_change_command(self, + permission_change_options: LinuxPermissionChangeOptions): """ Build Agent's binary permission change command - :param chmod_options: Options needed for the command to be built + :param permission_change_options: Options needed for the command to be built """ @abc.abstractmethod