forked from p15670423/monkey
Agent: Add IIslandAPIClient
This commit is contained in:
parent
b432a9f567
commit
ca1bc06c55
|
@ -0,0 +1 @@
|
||||||
|
from .i_island_api_client import IIslandAPIClient
|
|
@ -0,0 +1,12 @@
|
||||||
|
from abc import ABC, abstractmethod
|
||||||
|
|
||||||
|
|
||||||
|
class IIslandAPIClient(ABC):
|
||||||
|
@abstractmethod
|
||||||
|
def __init__(self, island_server: str):
|
||||||
|
"""
|
||||||
|
Construct and API client and connect it to the island
|
||||||
|
|
||||||
|
:param island_server: String representing the island ip address and port
|
||||||
|
:raises IslandAPIError: If connection was unsuccessful
|
||||||
|
"""
|
|
@ -9,6 +9,7 @@ from common.agent_configuration.agent_sub_configurations import (
|
||||||
)
|
)
|
||||||
from common.credentials import Credentials, LMHash, NTHash
|
from common.credentials import Credentials, LMHash, NTHash
|
||||||
from infection_monkey.exploit.log4shell_utils.ldap_server import LDAPServerFactory
|
from infection_monkey.exploit.log4shell_utils.ldap_server import LDAPServerFactory
|
||||||
|
from infection_monkey.island_api_client import IIslandAPIClient
|
||||||
from infection_monkey.transport import IslandAPIClient, IslandAPIRequestFailedError
|
from infection_monkey.transport import IslandAPIClient, IslandAPIRequestFailedError
|
||||||
from monkey_island.cc.event_queue import IslandEventTopic, PyPubSubIslandEventQueue
|
from monkey_island.cc.event_queue import IslandEventTopic, PyPubSubIslandEventQueue
|
||||||
from monkey_island.cc.models import Report
|
from monkey_island.cc.models import Report
|
||||||
|
@ -331,5 +332,6 @@ IslandEventTopic.CLEAR_SIMULATION_DATA
|
||||||
IslandEventTopic.RESET_AGENT_CONFIGURATION
|
IslandEventTopic.RESET_AGENT_CONFIGURATION
|
||||||
|
|
||||||
# TODO: Remove after #2292 is closed
|
# TODO: Remove after #2292 is closed
|
||||||
IslandAPIClient
|
IIslandAPIClient
|
||||||
|
IslandApiClient
|
||||||
IslandAPIRequestFailedError
|
IslandAPIRequestFailedError
|
||||||
|
|
Loading…
Reference in New Issue