Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions update-CyberChef.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
INSTALL_LOC=/home/$(whoami)/bin/CyberChef
echo "[+] Checking for previous installation directoy"
INSTALL_LOC="/home/$(whoami)/bin/CyberChef"
INSTALL_LOC_FOLDER="$INSTALL_LOC/current"
echo "[+] Checking for previous installation directory"
if [[ ! -d $INSTALL_LOC ]]
then
echo "[+] Directory not found, creating."
Expand All @@ -18,12 +19,13 @@ then
fi
fi
echo "[+] New version $RELEASE located"
find $INSTALL_LOC -type f -not -name version.txt -delete
find $INSTALL_LOC -type f -not -name version.txt -not -name update-CyberChef.sh -delete
ZIP=https://github.com/gchq/CyberChef/releases/download/$RELEASE/CyberChef_$RELEASE.zip
echo "[+] Downloading CyberChef_$RELEASE.zip from Github"
curl -Ls $ZIP --output $INSTALL_LOC/CyberChef_$RELEASE.zip
echo "[+] Extracting ZIP to $INSTALL_LOC"
unzip -q $INSTALL_LOC/CyberChef_$RELEASE.zip -d $INSTALL_LOC
unzip -q $INSTALL_LOC/CyberChef_$RELEASE.zip -d $INSTALL_LOC_FOLDER
mv $INSTALL_LOC_FOLDER/CyberChef_$RELEASE.html $INSTALL_LOC_FOLDER/CyberChef.html
echo "[+] Cleaning up..."
rm $INSTALL_LOC/CyberChef_$RELEASE.zip
mv /home/$(whoami)/bin/CyberChef/CyberChef_* /home/$(whoami)/bin/CyberChef/CyberChef.html
Expand Down