Skip to content

Instantly share code, notes, and snippets.

@anir0y
Created August 3, 2021 04:22
Show Gist options
  • Save anir0y/3afcd6eaeeebe9f828515f33cf723b4c to your computer and use it in GitHub Desktop.
Save anir0y/3afcd6eaeeebe9f828515f33cf723b4c to your computer and use it in GitHub Desktop.
#!/bin/bash
#soure : https://github.com/felipesi/gpg-crack/blob/master/crackgpg.sh
if [ "$#" != 2 ]; then
echo "USAGE: $0 file.gpg wordlist.txt"
else
while read pass; do
gpg --batch --passphrase "$pass" "$1" &> /dev/null
if [ "$?" == 0 ]; then
echo
echo "SUCESS - $pass"
echo
break
else
echo "FAILED - $pass"
fi
done < "$2"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment