Skip to content

Instantly share code, notes, and snippets.

@erincerys
Created July 21, 2014 00:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erincerys/0d5ce36521659907a602 to your computer and use it in GitHub Desktop.
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
#!/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