Created
December 20, 2012 14:08
-
-
Save anonymous/4345493 to your computer and use it in GitHub Desktop.
Simple md5 checking script: type "compare.sh <md5> <file>" Added some interactive text for fun!
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
clear | |
echo "" | |
echo " ---- CHECKING MD5 ---- " | |
echo "" | |
echo "" | |
SUM=$(openssl md5 "$2") | |
BFO="MD5($2)= " | |
echo "MD5 TO CHECK WITH" | |
echo "----------------------------------" | |
echo "" | |
echo "$BFO$1" | |
echo "" | |
echo "" | |
echo "FILE'S MD5" | |
echo "----------------------------------" | |
echo "" | |
echo "$SUM" | |
echo "" | |
echo "" | |
if [ "$BFO$1" == "$SUM" ] | |
then | |
echo "----------------------------------" | |
echo "| M D 5 MATCHES ! :) |" | |
echo "----------------------------------" | |
echo " --- HAPPPY MD5ing! --- " | |
else | |
echo "----------------------------------" | |
echo "| M D 5 DOES NOT MATCH ! :( |" | |
echo "----------------------------------" | |
fi | |
echo "" | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment