From f68a8a412092cb120ab379cd095936db61f3dfc0 Mon Sep 17 00:00:00 2001 From: Chris Long Date: Sun, 26 Jul 2020 17:43:21 -0700 Subject: [PATCH] Fixing Velociraptor install --- Vagrant/bootstrap.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Vagrant/bootstrap.sh b/Vagrant/bootstrap.sh index a9ce3ec..09ffe27 100644 --- a/Vagrant/bootstrap.sh +++ b/Vagrant/bootstrap.sh @@ -391,12 +391,14 @@ install_zeek() { install_velociraptor() { echo "[$(date +%H:%M:%S)]: Installing Velociraptor..." - mkdir /opt/install_velociraptor + if [ ! -d "/opt/velociraptor" ]; then + mkdir /opt/velociraptor + fi echo "[$(date +%H:%M:%S)]: Attempting to determine the URL for the latest release of Velociraptor" LATEST_VELOCIRAPTOR_LINUX_URL=$(curl -sL https://github.com/Velocidex/velociraptor/releases/latest | grep 'linux-amd64' | grep -Eo "/(?[^\"]+)" | grep amd | sed 's#^#https://github.com#g') echo "[$(date +%H:%M:%S)]: The URL for the latest release was extracted as $LATEST_VELOCIRAPTOR_LINUX_URL" echo "[$(date +%H:%M:%S)]: Attempting to download..." - wget -P --progress=bar:force /opt/velociraptor "$LATEST_VELOCIRAPTOR_LINUX_URL" + wget -P /opt/velociraptor --progress=bar:force "$LATEST_VELOCIRAPTOR_LINUX_URL" if [ "$(file /opt/velociraptor/velociraptor*linux-amd64 | grep -c 'ELF 64-bit LSB executable')" -eq 1 ]; then echo "[$(date +%H:%M:%S)]: Velociraptor successfully downloaded!" else