Island: Rename resource MonkeyDownload to AgentBinaries
This commit is contained in:
parent
0baacf3027
commit
594d215598
|
@ -12,6 +12,7 @@ from common import DIContainer
|
||||||
from monkey_island.cc.database import database, mongo
|
from monkey_island.cc.database import database, mongo
|
||||||
from monkey_island.cc.resources import RemoteRun
|
from monkey_island.cc.resources import RemoteRun
|
||||||
from monkey_island.cc.resources.AbstractResource import AbstractResource
|
from monkey_island.cc.resources.AbstractResource import AbstractResource
|
||||||
|
from monkey_island.cc.resources.agent_binaries import AgentBinaries
|
||||||
from monkey_island.cc.resources.agent_controls import StopAgentCheck, StopAllAgents
|
from monkey_island.cc.resources.agent_controls import StopAgentCheck, StopAllAgents
|
||||||
from monkey_island.cc.resources.attack.attack_report import AttackReport
|
from monkey_island.cc.resources.attack.attack_report import AttackReport
|
||||||
from monkey_island.cc.resources.auth.auth import Authenticate, init_jwt
|
from monkey_island.cc.resources.auth.auth import Authenticate, init_jwt
|
||||||
|
@ -33,7 +34,6 @@ from monkey_island.cc.resources.island_mode import IslandMode
|
||||||
from monkey_island.cc.resources.local_run import LocalRun
|
from monkey_island.cc.resources.local_run import LocalRun
|
||||||
from monkey_island.cc.resources.log import Log
|
from monkey_island.cc.resources.log import Log
|
||||||
from monkey_island.cc.resources.monkey import Monkey
|
from monkey_island.cc.resources.monkey import Monkey
|
||||||
from monkey_island.cc.resources.monkey_download import MonkeyDownload
|
|
||||||
from monkey_island.cc.resources.netmap import NetMap
|
from monkey_island.cc.resources.netmap import NetMap
|
||||||
from monkey_island.cc.resources.node import Node
|
from monkey_island.cc.resources.node import Node
|
||||||
from monkey_island.cc.resources.node_states import NodeStates
|
from monkey_island.cc.resources.node_states import NodeStates
|
||||||
|
@ -155,7 +155,7 @@ def init_api_resources(api: FlaskDIWrapper):
|
||||||
api.add_resource(IslandConfiguration)
|
api.add_resource(IslandConfiguration)
|
||||||
api.add_resource(ConfigurationExport)
|
api.add_resource(ConfigurationExport)
|
||||||
api.add_resource(ConfigurationImport)
|
api.add_resource(ConfigurationImport)
|
||||||
api.add_resource(MonkeyDownload)
|
api.add_resource(AgentBinaries)
|
||||||
api.add_resource(NetMap)
|
api.add_resource(NetMap)
|
||||||
api.add_resource(Edge)
|
api.add_resource(Edge)
|
||||||
api.add_resource(Node)
|
api.add_resource(Node)
|
||||||
|
|
|
@ -19,7 +19,7 @@ class UnsupportedOSError(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class MonkeyDownload(AbstractResource):
|
class AgentBinaries(AbstractResource):
|
||||||
# API Spec: Rename to /api/agent-binaries, because information about agent runs
|
# API Spec: Rename to /api/agent-binaries, because information about agent runs
|
||||||
# and binary files are different resources
|
# and binary files are different resources
|
||||||
urls = ["/api/agent/download/<string:host_os>"]
|
urls = ["/api/agent/download/<string:host_os>"]
|
|
@ -21,7 +21,7 @@ from common.version import get_version # noqa: E402
|
||||||
from monkey_island.cc.app import init_app # noqa: E402
|
from monkey_island.cc.app import init_app # noqa: E402
|
||||||
from monkey_island.cc.arg_parser import IslandCmdArgs # noqa: E402
|
from monkey_island.cc.arg_parser import IslandCmdArgs # noqa: E402
|
||||||
from monkey_island.cc.arg_parser import parse_cli_args # noqa: E402
|
from monkey_island.cc.arg_parser import parse_cli_args # noqa: E402
|
||||||
from monkey_island.cc.resources.monkey_download import MonkeyDownload # noqa: E402
|
from monkey_island.cc.resources.agent_binaries import AgentBinaries # noqa: E402
|
||||||
from monkey_island.cc.server_utils.consts import ( # noqa: E402
|
from monkey_island.cc.server_utils.consts import ( # noqa: E402
|
||||||
GEVENT_EXCEPTION_LOG,
|
GEVENT_EXCEPTION_LOG,
|
||||||
MONGO_CONNECTION_TIMEOUT,
|
MONGO_CONNECTION_TIMEOUT,
|
||||||
|
@ -154,7 +154,7 @@ def _start_island_server(
|
||||||
|
|
||||||
|
|
||||||
def _log_init_info():
|
def _log_init_info():
|
||||||
MonkeyDownload.log_executable_hashes()
|
AgentBinaries.log_executable_hashes()
|
||||||
|
|
||||||
logger.info("Monkey Island Server is running!")
|
logger.info("Monkey Island Server is running!")
|
||||||
logger.info(f"version: {get_version()}")
|
logger.info(f"version: {get_version()}")
|
||||||
|
|
|
@ -6,7 +6,7 @@ import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
|
|
||||||
from monkey_island.cc.resources.monkey_download import get_agent_executable_path
|
from monkey_island.cc.resources.agent_binaries import get_agent_executable_path
|
||||||
from monkey_island.cc.server_utils.consts import ISLAND_PORT
|
from monkey_island.cc.server_utils.consts import ISLAND_PORT
|
||||||
from monkey_island.cc.services.utils.network_utils import local_ip_addresses
|
from monkey_island.cc.services.utils.network_utils import local_ip_addresses
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue