Program fails to install
Brought to you by:
behroozi
Program failes to install, it exits with the following
error:
input must be 8 bytes long at
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Crypt/Blowfish.pm
line 56, <STDIN> line 7.
To reproduce, accept all default questions, it fails
after I type password. I tried different password, the
result is the same,
Logged In: YES
user_id=565839
Try replacing the "encrypt_password" subroutine with the
following:
sub encrypt_password {
use bytes;
eval "use Crypt::Blowfish";
eval "use Digest::SHA1 qw(sha1)";
my ($username, $password, $key)=@_;
my $cipher = new Crypt::Blowfish(sha1($key));
my $result = "$username\n$password";
$result = pack("N",length($result)).$result;
my $length = length($result);
while ($length%8) { $result.=pack("C", int(rand(256)));
$length++ }
$block=$cipher->encrypt(substr($result,-8,8));
substr($result, -8, 8, $block);
$length=length($result) - 8;
while(($length-=8)>-8) {
$block^=substr($result,$length,8);
$block=$cipher->encrypt($block);
substr($result,$length,8,$block);
}
return unpack("H*", $result);
}
Does this help?