Created
July 21, 2014 00:21
-
-
Save erincerys/0d5ce36521659907a602 to your computer and use it in GitHub Desktop.
Download truecrypt 7.1a, verify the SHA256 checksum against an independent and trusted source and install the package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# You might want to change the download url to another if your system is not using the amd64 architecture | |
wget -c -q https://www.grc.com/misc/truecrypt/truecrypt-7.1a-linux-x64.tar.gz | |
TC_CHECKSUM=`sha256sum ./truecrypt-7.1a-linux-x64.tar.gz | awk '{print $1}'` | |
TC_VERIFIED_CHECKSUM=`curl -s https://defuse.ca/downloads/truecrypt-hashes.asc | grep -A19 -i sha256 | grep 'truecrypt-7.1a-linux-x64.tar.gz$' | awk '{print $1}'` | |
if [ -n "${TC_VERIFIED_CHECKSUM}" ] ; then | |
if [ "${TC_CHECKSUM}" == "${TC_VERIFIED_CHECKSUM}" ] ; then | |
tar xfz truecrypt-7.1a-linux-x64.tar.gz | |
chmod 775 truecrypt-7.1a-setup-x64 | |
./truecrypt-7.1a-setup-x64 | |
else | |
echo "[?] Truecrypt checksum didn't match verified sources! Not installing" | |
fi | |
else | |
echo "[?] Truecrypt verified checksum could not be obtained to compare against downloaded archive! Not installing" | |
fi | |
rm truecrypt-7.1a-* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment