Skip to content

Commit da98602

Browse files
committed
Agent: Remove HostExploiter's dependency on Plugin
Issue #1605
1 parent ccfe0a7 commit da98602

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

monkey/infection_monkey/exploit/HostExploiter.py

+1-19
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,14 @@
22
from abc import abstractmethod
33
from datetime import datetime
44

5-
import infection_monkey.exploit
65
from common.utils.exceptions import FailedExploitationError
76
from common.utils.exploit_enum import ExploitType
87
from infection_monkey.config import WormConfiguration
9-
from infection_monkey.utils.plugins.plugin import Plugin
108

119
logger = logging.getLogger(__name__)
1210

1311

14-
class HostExploiter(Plugin):
15-
@staticmethod
16-
def should_run(class_name):
17-
"""
18-
Decides if post breach action is enabled in config
19-
:return: True if it needs to be ran, false otherwise
20-
"""
21-
return class_name in WormConfiguration.exploiter_classes
22-
23-
@staticmethod
24-
def base_package_file():
25-
return infection_monkey.exploit.__file__
26-
27-
@staticmethod
28-
def base_package_name():
29-
return infection_monkey.exploit.__package__
30-
12+
class HostExploiter:
3113
_TARGET_OS_TYPE = []
3214

3315
# Usual values are 'vulnerability' or 'brute_force'

0 commit comments

Comments
 (0)