diff --git a/monkey/infection_monkey/exploit/consts.py b/monkey/infection_monkey/exploit/consts.py new file mode 100644 index 000000000..e74c7786c --- /dev/null +++ b/monkey/infection_monkey/exploit/consts.py @@ -0,0 +1,3 @@ +# Constants used to refer to windows architectures +WIN_ARCH_32 = "32" +WIN_ARCH_64 = "64" diff --git a/monkey/infection_monkey/exploit/powershell.py b/monkey/infection_monkey/exploit/powershell.py index 952337e81..17a8913f8 100644 --- a/monkey/infection_monkey/exploit/powershell.py +++ b/monkey/infection_monkey/exploit/powershell.py @@ -11,9 +11,9 @@ from urllib3 import connectionpool import infection_monkey.monkeyfs as monkeyfs from common.utils.exceptions import FailedExploitationError from common.utils.exploit_enum import ExploitType +from infection_monkey.exploit.consts import WIN_ARCH_32, WIN_ARCH_64 from infection_monkey.exploit.HostExploiter import HostExploiter from infection_monkey.exploit.tools.helpers import get_monkey_depth, get_target_monkey_by_os -from infection_monkey.exploit.web_rce import WIN_ARCH_32, WIN_ARCH_64 from infection_monkey.model import DROPPER_ARG, GET_ARCH_WINDOWS, RUN_MONKEY, VictimHost from infection_monkey.utils.commands import build_monkey_commandline diff --git a/monkey/infection_monkey/exploit/web_rce.py b/monkey/infection_monkey/exploit/web_rce.py index ad39b3b8b..8c1ac96c7 100644 --- a/monkey/infection_monkey/exploit/web_rce.py +++ b/monkey/infection_monkey/exploit/web_rce.py @@ -4,6 +4,7 @@ from abc import abstractmethod from posixpath import join from common.utils.attack_utils import BITS_UPLOAD_STRING, ScanStatus +from infection_monkey.exploit.consts import WIN_ARCH_32, WIN_ARCH_64 from infection_monkey.exploit.HostExploiter import HostExploiter from infection_monkey.exploit.tools.helpers import get_monkey_depth, get_target_monkey from infection_monkey.exploit.tools.http_tools import HTTPTools @@ -30,9 +31,6 @@ LOG = logging.getLogger(__name__) # Command used to check if monkeys already exists LOOK_FOR_FILE = "ls %s" POWERSHELL_NOT_FOUND = "powershell is not recognized" -# Constants used to refer to windows architectures( used in host.os['machine']) -WIN_ARCH_32 = "32" -WIN_ARCH_64 = "64" class WebRCE(HostExploiter):