6 Einträge, 1 Seite |
1 2 3 4 5 6 7 8
sub file_algorithm { my @cryptedchr = split(//, reverse (crypt (reverse (shift), '4%'))); my $filename = (); splice (@cryptedchr, 0, -5); foreach (@cryptedchr) { $filename .= sprintf ("%02x", ord($_)); } return $filename; }
586c742534
634e5a2534
1 2 3 4
sub file_algorithm { return unpack('H*',reverse(substr(crypt (reverse (shift), '4%'),0,5))); }
1 2 3 4
sub file_algorithm { return unpack('H*',substr(reverse(crypt (reverse (shift), '4%')),0,5)); }
1 2 3 4 5
sub file_algorithm { use Digest::MD5 qw(md5); return unpack('H*',reverse(substr(md5(reverse(shift) xor '")§$/$00§"9&?4?+'),0,5))); }
xor '")§$/$00§"9&?4?+'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
# Zufallsgenerator mit "Zufallswert" initialisieren srand(rand(time)); my $name='turnen'; my $filename=create_crypt($name); print "$filename\n"; print "OK\n" if(check_crypt($filename,$name)); sub create_crypt { my $salt=join('',grep{$_=chr(int(rand(256)))}(0..5)); return unpack('H*',reverse(substr(md5(reverse(shift) ^ $salt),0,5)).$salt ); } sub check_crypt { my $crypt=pack('H*', shift); my $salt=substr($crypt,5,length($crypt),''); return 1 if($crypt eq reverse(substr(md5(reverse(shift) ^ $salt),0,5))); return 0; }
6 Einträge, 1 Seite |