Quote |
#!/usr/bin/perl # curagacrack.pl my $n = 30; # max len of passphrase my @set = ( "ä", "ö", "y", "a" .. "p", "r" .. "v" ); # ranges and lists to permute my $result; sub create_perm($$){ my($cur,$max)=@_; if($cur>=$max){ print "$result\n"; setpgrp (0,0); system("echo $result | 2>/dev/null openssl rsa -noout -text -passin stdin -in mykey && echo -n 'Found passphrase: ' && echo $result && kill 0"); return; } for(@set){ substr($result,$cur,1)=$_; create_perm($cur+1,$max); } } for ($j=8;$j<=$n;$j++){ create_perm(0,$j); } |