83d1f8d499
We use OpenSSL 1.0.0 in installed environments. Previously, John the Ripper was compiled against 0.9.8 which prevented it from running. This recompiles the same version (jtr 1.7.8 jumbo 2) against OpenSSL 1.0.0. [FIXRM #7834]
20 lines
491 B
Perl
20 lines
491 B
Perl
#!/usr/bin/perl
|
|
# http://www.perl.com/CPAN-local/modules/by-module/MIME/MIME-Base64-2.06.tar.gz
|
|
# http://www.perl.com/CPAN-local/modules/by-module/SHA/SHA-1.2.tar.gz
|
|
|
|
use MIME::Base64;
|
|
use SHA;
|
|
if ("SHA-1" ne &SHA::sha_version) { die "wrong SHA version\n"; }
|
|
$sha = new SHA;
|
|
|
|
$label = "{SHA}";
|
|
$count = 1;
|
|
while(<>) {
|
|
chomp;
|
|
$hash = $sha->hash ($_);
|
|
printf ("%s:%s%s:%d:%d:%s:/home/%s/:\n",
|
|
$_, $label, encode_base64 ($hash . $salt, ""), $count, $count,
|
|
$_, $_);
|
|
$count++;
|
|
}
|