Minor fixes: Removed debugging log and improved readability in PBA path const

This commit is contained in:
VakarisZ 2021-01-27 12:23:39 +02:00
parent 4f43edbefb
commit bde2288da0
2 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,6 @@ class FileUpload(flask_restful.Resource):
filename = ConfigService.get_config_value(copy.deepcopy(PBA_LINUX_FILENAME_PATH)) filename = ConfigService.get_config_value(copy.deepcopy(PBA_LINUX_FILENAME_PATH))
else: else:
filename = ConfigService.get_config_value(copy.deepcopy(PBA_WINDOWS_FILENAME_PATH)) filename = ConfigService.get_config_value(copy.deepcopy(PBA_WINDOWS_FILENAME_PATH))
LOG.info(f"Current dir:{os.getcwd()}")
return send_from_directory(ABS_UPLOAD_PATH, filename) return send_from_directory(ABS_UPLOAD_PATH, filename)
@jwt_required @jwt_required

View File

@ -6,6 +6,8 @@ import monkey_island.cc.services.config
__author__ = "VakarisZ" __author__ = "VakarisZ"
from monkey_island.cc.consts import MONKEY_ISLAND_ABS_PATH
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
# Where to find file names in config # Where to find file names in config
@ -14,8 +16,7 @@ PBA_LINUX_FILENAME_PATH = ['monkey', 'post_breach', 'PBA_linux_filename']
UPLOADS_DIR_NAME = 'userUploads' UPLOADS_DIR_NAME = 'userUploads'
_PBA_UPLOAD_PATH = [os.getcwd(), 'monkey_island', 'cc', UPLOADS_DIR_NAME] ABS_UPLOAD_PATH = Path(MONKEY_ISLAND_ABS_PATH, 'cc', UPLOADS_DIR_NAME)
ABS_UPLOAD_PATH = Path(*_PBA_UPLOAD_PATH)
def remove_PBA_files(): def remove_PBA_files():