Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # sha1check.sh
- # USAGE:
- # Download this file: http://dl.dropbox.com/u/83742553/combo_not.txt (using CURL)
- # Write your passwords (the ones you think might be stolen) to a file, one per line >> mypasswords.txt
- # Call this script...
- # ~/sha1check.sh /path/to/combo_not.txt mypasswords.txt
- SRCFILE=$1;
- PSDFILE=$2;
- TMPFILE=`mktemp /tmp/shasums.XXXXX`
- # First, collect all the SHA1 checksum suffixes
- # This is an optimization for grep, which can use a source file of simple patterns to make one pass over the search.
- while read password; do
- echo "$password" | tr -d '\n' | shasum | cut -c 6-40
- done < $PSDFILE > $TMPFILE
- # Show the user what hash suffixes are applicable
- echo '# Searching for...'
- cat $TMPFILE
- # Run the search...
- grep -f $TMPFILE $SRCFILE
- # If this prints anything, your password has probably been stolen.
- rm $TMPFILE
Advertisement
Add Comment
Please, Sign In to add comment