From f39ee626682eceba4b5433b8745ae5234e9df323 Mon Sep 17 00:00:00 2001 From: Daniel Goldberg Date: Sun, 14 Oct 2018 16:35:18 +0300 Subject: [PATCH] Fix base path for monkey download after refactor --- monkey/monkey_island/cc/resources/monkey_download.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/monkey/monkey_island/cc/resources/monkey_download.py b/monkey/monkey_island/cc/resources/monkey_download.py index acf92b558..305d8c6e9 100644 --- a/monkey/monkey_island/cc/resources/monkey_download.py +++ b/monkey/monkey_island/cc/resources/monkey_download.py @@ -1,15 +1,14 @@ -import logging import json - +import logging import os -from flask import request, send_from_directory + import flask_restful +from flask import request, send_from_directory __author__ = 'Barak' logger = logging.getLogger(__name__) - MONKEY_DOWNLOADS = [ { 'type': 'linux', @@ -81,7 +80,8 @@ class MonkeyDownload(flask_restful.Resource): result = get_monkey_executable(host_os.get('type'), host_os.get('machine')) if result: - real_path = os.path.join('binaries', result['filename']) + # change resulting from new base path + real_path = os.path.join("monkey_island", "cc", 'binaries', result['filename']) if os.path.isfile(real_path): result['size'] = os.path.getsize(real_path) return result