Agent: Remove HostExploiter's dependency on Plugin

Issue #1605
PR #1725
This commit is contained in:
Mike Salvatore 2022-02-20 14:14:15 -05:00 committed by VakarisZ
parent 250530b456
commit 6150610bdc
1 changed files with 1 additions and 19 deletions

View File

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