From ed921fceedee42b84c2825dcdf91392d1b585cbe Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Mon, 4 Feb 2019 10:35:39 +0200 Subject: [PATCH] Refactored for island to have only one requirements file. --- deployment_scripts/deploy_linux.sh | 4 ++-- deployment_scripts/deploy_windows.ps1 | 6 +++--- .../{requirements_linux.txt => requirements.txt} | 0 monkey/monkey_island/requirements_windows.txt | 16 ---------------- 4 files changed, 5 insertions(+), 21 deletions(-) rename monkey/monkey_island/{requirements_linux.txt => requirements.txt} (100%) delete mode 100644 monkey/monkey_island/requirements_windows.txt diff --git a/deployment_scripts/deploy_linux.sh b/deployment_scripts/deploy_linux.sh index 4eb5a9225..176c2e4fc 100644 --- a/deployment_scripts/deploy_linux.sh +++ b/deployment_scripts/deploy_linux.sh @@ -69,7 +69,7 @@ log_message "Installing pip" sudo apt-get install python-pip log_message "Installing island requirements" -requirements="$ISLAND_PATH/requirements_linux.txt" +requirements="$ISLAND_PATH/requirements.txt" python -m pip install --user -r ${requirements} || handle_error # Download binaries @@ -154,4 +154,4 @@ sudo chmod +x ./build.sh || handle_error sudo chmod +x ${monkey_home}/monkey/infection_monkey/build_linux.sh log_message "Deployment script finished." -exit 0 \ No newline at end of file +exit 0 diff --git a/deployment_scripts/deploy_windows.ps1 b/deployment_scripts/deploy_windows.ps1 index 9ff7d7d5d..17d08ecc8 100644 --- a/deployment_scripts/deploy_windows.ps1 +++ b/deployment_scripts/deploy_windows.ps1 @@ -39,7 +39,7 @@ function Deploy-Windows([String] $monkey_home = (Get-Item -Path ".\").FullName, New-Item -ItemType directory -path $binDir "Bin directory added" } - + # We check if python is installed try { @@ -72,11 +72,11 @@ function Deploy-Windows([String] $monkey_home = (Get-Item -Path ".\").FullName, "Downloading Visual C++ Compiler for Python 2.7 ..." $webClient.DownloadFile($VC_FOR_PYTHON27_URL, $TEMP_VC_FOR_PYTHON27_INSTALLER) Start-Process -Wait $TEMP_VC_FOR_PYTHON27_INSTALLER -ErrorAction Stop - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") Remove-Item $TEMP_VC_FOR_PYTHON27_INSTALLER # Install requirements for island - $islandRequirements = Join-Path -Path $monkey_home -ChildPath $MONKEY_ISLAND_DIR | Join-Path -ChildPath "\requirements_windows.txt" -ErrorAction Stop + $islandRequirements = Join-Path -Path $monkey_home -ChildPath $MONKEY_ISLAND_DIR | Join-Path -ChildPath "\requirements.txt" -ErrorAction Stop "Upgrading pip..." $output = cmd.exe /c 'python -m pip install --user --upgrade pip 2>&1' $output diff --git a/monkey/monkey_island/requirements_linux.txt b/monkey/monkey_island/requirements.txt similarity index 100% rename from monkey/monkey_island/requirements_linux.txt rename to monkey/monkey_island/requirements.txt diff --git a/monkey/monkey_island/requirements_windows.txt b/monkey/monkey_island/requirements_windows.txt deleted file mode 100644 index 29c364c9f..000000000 --- a/monkey/monkey_island/requirements_windows.txt +++ /dev/null @@ -1,16 +0,0 @@ -python-dateutil -tornado -werkzeug -jinja2 -markupsafe -itsdangerous -click -flask -Flask-Pymongo -Flask-Restful -Flask-JWT -jsonschema -netifaces -ipaddress -enum34 -PyCrypto