From 401def5eb2ccf115b4a7a65aa4d30b28c5b02b2e Mon Sep 17 00:00:00 2001 From: Daniel Goldberg Date: Tue, 26 Nov 2019 13:22:56 +0200 Subject: [PATCH] Merge Infection Monkey requirements files --- .travis.yml | 2 +- deployment_scripts/deploy_linux.sh | 2 +- deployment_scripts/deploy_windows.ps1 | 2 +- monkey/infection_monkey/readme.md | 4 ++-- .../{requirements_linux.txt => requirements.txt} | 1 + monkey/infection_monkey/requirements_windows.txt | 15 --------------- 6 files changed, 6 insertions(+), 20 deletions(-) rename monkey/infection_monkey/{requirements_linux.txt => requirements.txt} (78%) delete mode 100644 monkey/infection_monkey/requirements_windows.txt diff --git a/.travis.yml b/.travis.yml index 34f49efe0..880825671 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ install: # Python - pip install -r monkey/monkey_island/requirements.txt # for unit tests - pip install flake8 pytest dlint # for next stages -- pip install -r monkey/infection_monkey/requirements_linux.txt # for unit tests +- pip install -r monkey/infection_monkey/requirements.txt # for unit tests before_script: # Set the server config to `testing`. This is required for for the UTs to pass. diff --git a/deployment_scripts/deploy_linux.sh b/deployment_scripts/deploy_linux.sh index f4c179141..4e641407e 100755 --- a/deployment_scripts/deploy_linux.sh +++ b/deployment_scripts/deploy_linux.sh @@ -93,7 +93,7 @@ ${python_cmd} -m pip install --user --upgrade -r ${requirements} || handle_error log_message "Installing monkey requirements" sudo apt-get install libffi-dev upx libssl-dev libc++1 cd ${monkey_home}/monkey/infection_monkey || handle_error -${python_cmd} -m pip install -r requirements_linux.txt --user --upgrade || handle_error +${python_cmd} -m pip install -r requirements.txt --user --upgrade || handle_error # Download binaries log_message "Downloading binaries" diff --git a/deployment_scripts/deploy_windows.ps1 b/deployment_scripts/deploy_windows.ps1 index 5a21c4daa..dd602e199 100644 --- a/deployment_scripts/deploy_windows.ps1 +++ b/deployment_scripts/deploy_windows.ps1 @@ -78,7 +78,7 @@ function Deploy-Windows([String] $monkey_home = (Get-Item -Path ".\").FullName, $islandRequirements = Join-Path -Path $monkey_home -ChildPath $MONKEY_ISLAND_DIR | Join-Path -ChildPath "\requirements.txt" -ErrorAction Stop & python -m pip install --user -r $islandRequirements "Installing python packages for monkey" - $monkeyRequirements = Join-Path -Path $monkey_home -ChildPath $MONKEY_DIR | Join-Path -ChildPath "\requirements_windows.txt" + $monkeyRequirements = Join-Path -Path $monkey_home -ChildPath $MONKEY_DIR | Join-Path -ChildPath "\requirements.txt" & python -m pip install --user -r $monkeyRequirements $user_python_dir = cmd.exe /c 'py -m site --user-site' diff --git a/monkey/infection_monkey/readme.md b/monkey/infection_monkey/readme.md index 6db622eeb..d6e17acdb 100644 --- a/monkey/infection_monkey/readme.md +++ b/monkey/infection_monkey/readme.md @@ -25,7 +25,7 @@ The monkey is composed of three separate parts. - 32bit: - 64bit: 3. Download the dependent python packages using - `pip install -r requirements_windows.txt` + `pip install -r requirements.txt` 4. Download and extract UPX binary to monkey\infection_monkey\bin\upx.exe: 5. Build/Download Sambacry and Mimikatz binaries @@ -51,7 +51,7 @@ Tested on Ubuntu 16.04. 2. Install the python packages listed in requirements.txt using pip - `cd [code location]/infection_monkey` - - `python3.7 -m pip install -r requirements_linux.txt` + - `python3.7 -m pip install -r requirements.txt` 3. Build Sambacry binaries - Build/Download according to sections at the end of this readme. diff --git a/monkey/infection_monkey/requirements_linux.txt b/monkey/infection_monkey/requirements.txt similarity index 78% rename from monkey/infection_monkey/requirements_linux.txt rename to monkey/infection_monkey/requirements.txt index b32cbc883..93b3b4ca3 100644 --- a/monkey/infection_monkey/requirements_linux.txt +++ b/monkey/infection_monkey/requirements.txt @@ -10,5 +10,6 @@ ecdsa netifaces ipaddress wmi +pywin32 ; sys_platform == 'win32' pymssql<3.0 pyftpdlib diff --git a/monkey/infection_monkey/requirements_windows.txt b/monkey/infection_monkey/requirements_windows.txt deleted file mode 100644 index ceb298160..000000000 --- a/monkey/infection_monkey/requirements_windows.txt +++ /dev/null @@ -1,15 +0,0 @@ -impacket -pycryptodome -cffi -requests -odict -paramiko -psutil -PyInstaller -ecdsa -netifaces -ipaddress -wmi -pywin32 -pymssql<3.0 -pyftpdlib