forked from p34709852/monkey
Fixed local directory in set_server_config.py to point to project root, so it would be able to access project packages.
This commit is contained in:
parent
05395fee6d
commit
2e95d367b8
|
@ -14,8 +14,8 @@ from infection_monkey.exploit.tools.helpers import (build_monkey_commandline,
|
|||
get_monkey_depth,
|
||||
get_target_monkey)
|
||||
from infection_monkey.exploit.tools.http_tools import HTTPTools
|
||||
from infection_monkey.model import (CHMOD_MONKEY, DOWNLOAD_TIMEOUT, MONKEY_ARG,
|
||||
RUN_MONKEY, WGET_HTTP_UPLOAD)
|
||||
from infection_monkey.model import (
|
||||
CHMOD_MONKEY, DOWNLOAD_TIMEOUT, MONKEY_ARG, RUN_MONKEY, WGET_HTTP_UPLOAD)
|
||||
from infection_monkey.telemetry.attack.t1222_telem import T1222Telem
|
||||
|
||||
LOG = getLogger(__name__)
|
||||
|
|
|
@ -5,12 +5,11 @@ import os
|
|||
from pathlib import Path
|
||||
from typing import Dict, List
|
||||
|
||||
import monkey_island.cc.environment.server_config_generator as server_config_generator
|
||||
from monkey_island.cc.consts import MONKEY_ISLAND_ABS_PATH
|
||||
from monkey_island.cc.environment.user_creds import UserCreds
|
||||
from monkey_island.cc.resources.auth.auth_user import User
|
||||
from monkey_island.cc.resources.auth.user_store import UserStore
|
||||
import monkey_island.cc.environment.server_config_generator as server_config_generator
|
||||
|
||||
|
||||
SERVER_CONFIG_FILENAME = "server_config.json"
|
||||
|
||||
|
|
|
@ -1,8 +1,20 @@
|
|||
import argparse
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from monkey_island.cc.environment.environment_config import EnvironmentConfig
|
||||
|
||||
def add_monkey_dir_to_sys_path():
|
||||
monkey_path = Path(sys.path[0])
|
||||
monkey_path = monkey_path.parents[2]
|
||||
sys.path.insert(0, monkey_path.__str__())
|
||||
|
||||
|
||||
add_monkey_dir_to_sys_path()
|
||||
|
||||
from monkey_island.cc.environment.environment_config import EnvironmentConfig #isort:skip
|
||||
|
||||
SERVER_CONFIG = "server_config"
|
||||
|
||||
|
|
Loading…
Reference in New Issue