From a7dcc73a3da0469612c0bf1ea64bae0117becd65 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 9 May 2022 13:01:34 -0400 Subject: [PATCH] Island: Rename AwsCmdRunner -> AWSCommandRunner --- .../monkey_island/cc/services/aws/aws_command_runner.py | 8 +------- monkey/monkey_island/cc/services/remote_run_aws.py | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/monkey/monkey_island/cc/services/aws/aws_command_runner.py b/monkey/monkey_island/cc/services/aws/aws_command_runner.py index 16c959197..b07a74e55 100644 --- a/monkey/monkey_island/cc/services/aws/aws_command_runner.py +++ b/monkey/monkey_island/cc/services/aws/aws_command_runner.py @@ -1,21 +1,15 @@ import logging import time -from common.cmd.cmd_runner import CmdRunner -from common.cmd.cmd_status import CmdStatus -from monkey_island.cc.server_utils.aws_cmd_result import AwsCmdResult -from monkey_island.cc.services import aws_service - logger = logging.getLogger(__name__) -class AwsCmdRunner(CmdRunner): +class AWSCommandRunner(): """ Class for running commands on a remote AWS machine """ def __init__(self, is_linux, instance_id, region=None): - super(AwsCmdRunner, self).__init__(is_linux) self.instance_id = instance_id self.region = region self.ssm = aws_service.get_client("ssm", region) diff --git a/monkey/monkey_island/cc/services/remote_run_aws.py b/monkey/monkey_island/cc/services/remote_run_aws.py index c3219171c..02c3b79fc 100644 --- a/monkey/monkey_island/cc/services/remote_run_aws.py +++ b/monkey/monkey_island/cc/services/remote_run_aws.py @@ -2,7 +2,7 @@ import logging from common.cmd.cmd import Cmd from common.cmd.cmd_runner import CmdRunner -from monkey_island.cc.server_utils.aws_cmd_runner import AwsCmdRunner +from monkey_island.cc.services.aws.aws_command_runner import AWSCommandRunner logger = logging.getLogger(__name__) @@ -40,7 +40,7 @@ class RemoteRunAwsService: @staticmethod def _run_aws_cmd_async(instance_id, is_linux, cmd_line): - cmd_runner = AwsCmdRunner(is_linux, instance_id) + cmd_runner = AWSCommandRunner(is_linux, instance_id) return Cmd(cmd_runner, cmd_runner.run_command_async(cmd_line)) @staticmethod