forked from p15670423/monkey
Agent: Remove HostExploiter's dependency on Plugin
Issue #1605 PR #1725
This commit is contained in:
parent
250530b456
commit
6150610bdc
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue