forked from p15670423/monkey
Agent: Fix control_client_object TODOs
This commit is contained in:
parent
7fe6c170cd
commit
17a0be2fa0
|
@ -25,8 +25,8 @@ PBA_FILE_DOWNLOAD = "https://%s/api/pba/download/%s"
|
||||||
|
|
||||||
|
|
||||||
class ControlClient:
|
class ControlClient:
|
||||||
# TODO Every telemetry should have its own control client
|
# TODO When we have mechanism that support telemetry messenger
|
||||||
# for the moment that is a big refactor.
|
# with control clients, then this needs to be removed
|
||||||
# Ref: infection_monkey.telemetry.base_telem.py
|
# Ref: infection_monkey.telemetry.base_telem.py
|
||||||
control_client_object = None
|
control_client_object = None
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ import infection_monkey.tunnel as tunnel
|
||||||
from common.network.network_utils import address_to_ip_port
|
from common.network.network_utils import address_to_ip_port
|
||||||
from common.utils.attack_utils import ScanStatus, UsageEnum
|
from common.utils.attack_utils import ScanStatus, UsageEnum
|
||||||
from common.version import get_version
|
from common.version import get_version
|
||||||
from infection_monkey.control import ControlClient
|
|
||||||
from infection_monkey.config import GUID
|
from infection_monkey.config import GUID
|
||||||
|
from infection_monkey.control import ControlClient
|
||||||
from infection_monkey.credential_collectors import (
|
from infection_monkey.credential_collectors import (
|
||||||
MimikatzCredentialCollector,
|
MimikatzCredentialCollector,
|
||||||
SSHCredentialCollector,
|
SSHCredentialCollector,
|
||||||
|
@ -90,7 +90,8 @@ class InfectionMonkey:
|
||||||
self._opts = self._get_arguments(args)
|
self._opts = self._get_arguments(args)
|
||||||
self._cmd_island_ip, self._cmd_island_port = address_to_ip_port(self._opts.server)
|
self._cmd_island_ip, self._cmd_island_port = address_to_ip_port(self._opts.server)
|
||||||
self._control_client = ControlClient(self._opts.server)
|
self._control_client = ControlClient(self._opts.server)
|
||||||
# TODO Refactor the BaseTelem to have its own control client
|
# TODO Refactor the telemetry messengers to accept control client
|
||||||
|
# and remove control_client_object
|
||||||
ControlClient.control_client_object = self._control_client
|
ControlClient.control_client_object = self._control_client
|
||||||
self._monkey_inbound_tunnel = None
|
self._monkey_inbound_tunnel = None
|
||||||
self._telemetry_messenger = LegacyTelemetryMessengerAdapter()
|
self._telemetry_messenger = LegacyTelemetryMessengerAdapter()
|
||||||
|
|
Loading…
Reference in New Issue