From 6150610bdc7c1f94855ef8d75a9342802341effd Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Sun, 20 Feb 2022 14:14:15 -0500 Subject: [PATCH] Agent: Remove HostExploiter's dependency on Plugin Issue #1605 PR #1725 --- .../infection_monkey/exploit/HostExploiter.py | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/monkey/infection_monkey/exploit/HostExploiter.py b/monkey/infection_monkey/exploit/HostExploiter.py index 34fd674ff..ed7d29d18 100644 --- a/monkey/infection_monkey/exploit/HostExploiter.py +++ b/monkey/infection_monkey/exploit/HostExploiter.py @@ -2,32 +2,14 @@ import logging from abc import abstractmethod from datetime import datetime -import infection_monkey.exploit from common.utils.exceptions import FailedExploitationError from common.utils.exploit_enum import ExploitType from infection_monkey.config import WormConfiguration -from infection_monkey.utils.plugins.plugin import Plugin logger = logging.getLogger(__name__) -class HostExploiter(Plugin): - @staticmethod - def should_run(class_name): - """ - Decides if post breach action is enabled in config - :return: True if it needs to be ran, false otherwise - """ - return class_name in WormConfiguration.exploiter_classes - - @staticmethod - def base_package_file(): - return infection_monkey.exploit.__file__ - - @staticmethod - def base_package_name(): - return infection_monkey.exploit.__package__ - +class HostExploiter: _TARGET_OS_TYPE = [] # Usual values are 'vulnerability' or 'brute_force'