forked from p15670423/monkey
Deploy: remove sambacry binary download step from linux and windows deployment scripts
This commit is contained in:
parent
67ea6c05ed
commit
d6e397871f
|
@ -37,8 +37,5 @@ export WINDOWS_32_BINARY_URL="https://github.com/guardicore/monkey/releases/down
|
||||||
export WINDOWS_64_BINARY_NAME="monkey-windows-64.exe"
|
export WINDOWS_64_BINARY_NAME="monkey-windows-64.exe"
|
||||||
export WINDOWS_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/monkey-windows-64.exe"
|
export WINDOWS_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/monkey-windows-64.exe"
|
||||||
|
|
||||||
export SAMBACRY_64_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/sc_monkey_runner64.so"
|
|
||||||
export SAMBACRY_32_BINARY_URL="https://github.com/guardicore/monkey/releases/download/$MONKEY_LATEST_RELEASE/sc_monkey_runner32.so"
|
|
||||||
|
|
||||||
# Swimm
|
# Swimm
|
||||||
export SWIMM_URL=https://github.com/swimmio/SwimmReleases/releases/download/v0.4.4-0/Swimm_0.4.4-0_Setup.deb
|
export SWIMM_URL=https://github.com/swimmio/SwimmReleases/releases/download/v0.4.4-0/Swimm_0.4.4-0_Setup.deb
|
||||||
|
|
|
@ -20,16 +20,11 @@ $WINDOWS_32_BINARY_URL = $MONKEY_DOWNLOAD_URL + "monkey-windows-32.exe"
|
||||||
$WINDOWS_32_BINARY_PATH = "monkey-windows-32.exe"
|
$WINDOWS_32_BINARY_PATH = "monkey-windows-32.exe"
|
||||||
$WINDOWS_64_BINARY_URL = $MONKEY_DOWNLOAD_URL + "monkey-windows-64.exe"
|
$WINDOWS_64_BINARY_URL = $MONKEY_DOWNLOAD_URL + "monkey-windows-64.exe"
|
||||||
$WINDOWS_64_BINARY_PATH = "monkey-windows-64.exe"
|
$WINDOWS_64_BINARY_PATH = "monkey-windows-64.exe"
|
||||||
$SAMBA_32_BINARY_URL = $MONKEY_DOWNLOAD_URL + "sc_monkey_runner32.so"
|
|
||||||
$SAMBA_32_BINARY_NAME = "sc_monkey_runner32.so"
|
|
||||||
$SAMBA_64_BINARY_URL = $MONKEY_DOWNLOAD_URL + "sc_monkey_runner64.so"
|
|
||||||
$SAMBA_64_BINARY_NAME = "sc_monkey_runner64.so"
|
|
||||||
|
|
||||||
# Other directories and paths ( most likely you dont need to configure)
|
# Other directories and paths ( most likely you dont need to configure)
|
||||||
$MONKEY_ISLAND_DIR = Join-Path "\monkey" -ChildPath "monkey_island"
|
$MONKEY_ISLAND_DIR = Join-Path "\monkey" -ChildPath "monkey_island"
|
||||||
$MONKEY_DIR = Join-Path "\monkey" -ChildPath "infection_monkey"
|
$MONKEY_DIR = Join-Path "\monkey" -ChildPath "infection_monkey"
|
||||||
$SCOUTSUITE_DIR = Join-Path "\monkey" "common" "cloud" "scoutsuite"
|
$SCOUTSUITE_DIR = Join-Path "\monkey" "common" "cloud" "scoutsuite"
|
||||||
$SAMBA_BINARIES_DIR = Join-Path -Path $MONKEY_DIR -ChildPath "\bin"
|
|
||||||
$TEMP_PYTHON_INSTALLER = ".\python.exe"
|
$TEMP_PYTHON_INSTALLER = ".\python.exe"
|
||||||
$TEMP_MONGODB_ZIP = ".\mongodb.zip"
|
$TEMP_MONGODB_ZIP = ".\mongodb.zip"
|
||||||
$TEMP_OPEN_SSL_ZIP = ".\openssl.zip"
|
$TEMP_OPEN_SSL_ZIP = ".\openssl.zip"
|
||||||
|
|
|
@ -217,17 +217,6 @@ popd || handle_error
|
||||||
# Making dir for binaries
|
# Making dir for binaries
|
||||||
mkdir "${MONKEY_BIN_DIR}"
|
mkdir "${MONKEY_BIN_DIR}"
|
||||||
|
|
||||||
# Download sambacry binaries
|
|
||||||
log_message "Downloading sambacry binaries"
|
|
||||||
# shellcheck disable=SC2086
|
|
||||||
if exists wget; then
|
|
||||||
wget -c -N -P "${MONKEY_BIN_DIR}" ${SAMBACRY_64_BINARY_URL}
|
|
||||||
wget -c -N -P "${MONKEY_BIN_DIR}" ${SAMBACRY_32_BINARY_URL}
|
|
||||||
else
|
|
||||||
curl -o ${MONKEY_BIN_DIR}/sc_monkey_runner64.so ${SAMBACRY_64_BINARY_URL}
|
|
||||||
curl -o ${MONKEY_BIN_DIR}/sc_monkey_runner32.so ${SAMBACRY_32_BINARY_URL}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download Swimm
|
# Download Swimm
|
||||||
log_message "Downloading swimm"
|
log_message "Downloading swimm"
|
||||||
if exists wget; then
|
if exists wget; then
|
||||||
|
|
|
@ -263,21 +263,6 @@ function Deploy-Windows([String] $monkey_home = (Get-Item -Path ".\").FullName,
|
||||||
Remove-Item $TEMP_UPX_ZIP
|
Remove-Item $TEMP_UPX_ZIP
|
||||||
}
|
}
|
||||||
|
|
||||||
# Download sambacry binaries
|
|
||||||
$samba_path = Join-Path -Path $monkey_home -ChildPath $SAMBA_BINARIES_DIR
|
|
||||||
$samba32_path = Join-Path -Path $samba_path -ChildPath $SAMBA_32_BINARY_NAME
|
|
||||||
if (!(Test-Path -Path $samba32_path))
|
|
||||||
{
|
|
||||||
"Downloading sambacry 32 binary"
|
|
||||||
$webClient.DownloadFile($SAMBA_32_BINARY_URL, $samba32_path)
|
|
||||||
}
|
|
||||||
$samba64_path = Join-Path -Path $samba_path -ChildPath $SAMBA_64_BINARY_NAME
|
|
||||||
if (!(Test-Path -Path $samba64_path))
|
|
||||||
{
|
|
||||||
"Downloading sambacry 64 binary"
|
|
||||||
$webClient.DownloadFile($SAMBA_64_BINARY_URL, $samba64_path)
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get Swimm
|
# Get Swimm
|
||||||
"Downloading Swimm..."
|
"Downloading Swimm..."
|
||||||
$swimm_filename = Join-Path -Path $HOME -ChildPath "swimm.exe"
|
$swimm_filename = Join-Path -Path $HOME -ChildPath "swimm.exe"
|
||||||
|
|
Loading…
Reference in New Issue