Nasty is a tool which can help us to recover a GPG passphrase.
Compile
Download Nasty tarball:
$ cd $HOME $ wget --no-check-certificate https://www.vanheusden.com/nasty/nasty-0.6.tgz $ clamscan nasty-0.6.tgz $ tar xf nasty-0.6.tar.gz $ cd ./nasty-0.6
Download libgpg-error, libassuan and gpgme tarballs:
$ wget https://www.gnupg.org/ftp/gcrypt/gpgme/libgpg-error-1.20.tar.bz2 $ wget https://www.gnupg.org/ftp/gcrypt/libassuan/libassuan-2.3.0.tar.bz2 $ wget https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-1.6.0.tar.bz2 $ tar xf libgpg-error-1.20.tar.bz2 $ tar xf libassuan-2.3.0.tar.bz2 $ tar xf gpgme-1.6.0.tar.bz2
Compile and install libgpg-error:
$ cd libgpg-error-1.20 $ ./configure && make && make install
Compile and install libassuan:
$ cd ../libassuan-2.3.0 $ ./configure && make && make install
Compile and install gpgme:
$ cd ../gpgme-1.6.0 $ ./configure && make && make install
Compile and install Nasty:
$ cd "$HOME"/nasty-0.6 $ make && make install
Run Nasty:
$ nasty -h nasty v0.6, (C) 2005 by [email protected] -a x set minimum length of passphrase -b x set maximum length -m x set guessing mode: incremental: try them all random: try at random file: read phrases from file (use -i) -i x file to read the passphrases from -f x file to write the found passphrase to -c x... charset, one or more from the following: a: a-z A: A-Z 0: 0-9 .: all ascii values (32...126) +: 32...255 (default(!))
Install from Repositories
Nasty package can be also installed from Debian repositories:
# apt-get install nasty