Fixed custom post breach action path bug.

This commit is contained in:
VakarisZ 2020-11-24 17:58:28 +02:00
parent 5ba1bf1db8
commit 424c666f65
2 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,7 @@
import flask_restful
from flask import send_from_directory
from monkey_island.cc.services.post_breach_files import UPLOADS_DIR
from monkey_island.cc.services.post_breach_files import UPLOADS_DIR_NAME
__author__ = 'VakarisZ'
@ -13,4 +13,4 @@ class PBAFileDownload(flask_restful.Resource):
# Used by monkey. can't secure.
def get(self, path):
return send_from_directory(UPLOADS_DIR, path)
return send_from_directory(UPLOADS_DIR_NAME, path)

View File

@ -11,7 +11,8 @@ logger = logging.getLogger(__name__)
# Where to find file names in config
PBA_WINDOWS_FILENAME_PATH = ['monkey', 'post_breach', 'PBA_windows_filename']
PBA_LINUX_FILENAME_PATH = ['monkey', 'post_breach', 'PBA_linux_filename']
PBA_UPLOAD_PATH = ['monkey_island', 'cc', 'userUploads']
UPLOADS_DIR_NAME = 'userUploads'
PBA_UPLOAD_PATH = ['monkey_island', 'cc', UPLOADS_DIR_NAME]
UPLOADS_DIR = Path(*PBA_UPLOAD_PATH)