Skip to content

Commit

Permalink
Rename build_chmod_command to build_permission_change_command
Browse files Browse the repository at this point in the history
  • Loading branch information
VakarisZ committed Jun 11, 2024
1 parent abe3f7e commit 0cc8393
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions agentpluginapi/i_linux_agent_command_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0cc8393

Please sign in to comment.