batch program to find my password - help please!!!

wegwerf4 at gmx.de wegwerf4 at gmx.de
Sat Aug 7 15:30:47 CEST 2010


Unfortunately I forgot my passphrase but can  remember some
characters and the position of them in the phrase. 
I wrote a bash-script to check a list of passwords which
are all candidates. 

I also created a test-gpg-account to test the script before
I run it with the quite longer list. 

Now the output of the test-script shows me that it works
at a speed of about three tests per second and it finds the
correct phrase.  
But if I run the same script in my actual
environment, in the .gnupg directory I see the passwords
running at a much higher speed.  The output per check is
the same. But this script doesn't find the passphrase.  

The script reads:

------------------------------------------------------------
#!/bin/bash
echo $1
while read -r line
do
	echo $line
	gpg --batch --yes --homedir /home/user/.gnupg -o zahl.txt --passphrase $line --decrypt zahl.gpg
	success=$?
	if [ $success -eq 0 ]; then echo "success: $line"; exit 0; fi
done < $1
echo "No success"
-------------------------------------------------------------------

Does anybody have any idea?

Best
Josef



More information about the Gnupg-users mailing list