Island: Rename AwsCmdRunner -> AWSCommandRunner

This commit is contained in:
Mike Salvatore 2022-05-09 13:01:34 -04:00
parent 83f230c5a1
commit a7dcc73a3d
2 changed files with 3 additions and 9 deletions

View File

@ -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)

View File

@ -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