forked from p15670423/monkey
Agent: Accept list of servers in HostExploiter
This commit is contained in:
parent
e4d49f5a12
commit
95ea5e481e
|
@ -2,7 +2,7 @@ import logging
|
||||||
import threading
|
import threading
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Dict
|
from typing import Dict, List
|
||||||
|
|
||||||
from common.event_queue import IAgentEventQueue
|
from common.event_queue import IAgentEventQueue
|
||||||
from common.utils.exceptions import FailedExploitationError
|
from common.utils.exceptions import FailedExploitationError
|
||||||
|
@ -35,6 +35,7 @@ class HostExploiter:
|
||||||
self.event_queue = None
|
self.event_queue = None
|
||||||
self.options = {}
|
self.options = {}
|
||||||
self.exploit_result = {}
|
self.exploit_result = {}
|
||||||
|
self.servers = []
|
||||||
|
|
||||||
def set_start_time(self):
|
def set_start_time(self):
|
||||||
self.exploit_info["started"] = datetime.now().isoformat()
|
self.exploit_info["started"] = datetime.now().isoformat()
|
||||||
|
@ -58,6 +59,7 @@ class HostExploiter:
|
||||||
def exploit_host(
|
def exploit_host(
|
||||||
self,
|
self,
|
||||||
host,
|
host,
|
||||||
|
servers: List[str],
|
||||||
current_depth: int,
|
current_depth: int,
|
||||||
telemetry_messenger: ITelemetryMessenger,
|
telemetry_messenger: ITelemetryMessenger,
|
||||||
event_queue: IAgentEventQueue,
|
event_queue: IAgentEventQueue,
|
||||||
|
@ -66,6 +68,7 @@ class HostExploiter:
|
||||||
interrupt: threading.Event,
|
interrupt: threading.Event,
|
||||||
):
|
):
|
||||||
self.host = host
|
self.host = host
|
||||||
|
self.servers = servers
|
||||||
self.current_depth = current_depth
|
self.current_depth = current_depth
|
||||||
self.telemetry_messenger = telemetry_messenger
|
self.telemetry_messenger = telemetry_messenger
|
||||||
self.event_queue = event_queue
|
self.event_queue = event_queue
|
||||||
|
|
Loading…
Reference in New Issue