Oct 18th, 2007, 10:28 AM
|
#18
|
|
Newbie
Join Date: Oct 2007
Posts: 20
Rep Power: 0 
|
Re: Is this Perl
Quote:
Originally Posted by iignotus
ROFLMAO!!!! I'm actually rolling on this floor right here, laughing my ass off. What have you 'hacked' lately, then, there? 
|
use Digest::MD4 md4_hex; my $goal = '8c91a67ef3a47031ec08830327848826'; # hash to find my @chars = ( a..z, 0..9 ); # characters to use my $minlen = 1; # minimum length of string my $maxlen = 8; # maximum length of string for ( $minlen..$maxlen ) { print 'Length: ', $_, "\n"; &checkStrings($_); } sub checkStrings { my ( $n, $s ) = ( (shift) - 1, shift ); for ( @chars ) { if ( $n ) { checkStrings($n, $s . $_ ); } else { print $s, $_, "\n" if md4_hex( $s . $_ ) eq $goal; } } }
|
|
|