From 76b4eceaeb338f88ca1f0fa1847f1c04d6d4e547 Mon Sep 17 00:00:00 2001 From: Jacob Christie Date: Wed, 22 Apr 2015 22:27:27 -0500 Subject: Update blowjob.pl Update for compatibility with current Crypt::CBC--- scripts/blowjob.pl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'scripts') diff --git a/scripts/blowjob.pl b/scripts/blowjob.pl index 9e24111..072703c 100644 --- a/scripts/blowjob.pl +++ b/scripts/blowjob.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -# BlowJob 0.9.0, a crypto script - ported from xchat +# BlowJob 0.9.1, a crypto script - ported from xchat # was based on rodney mulraney's crypt # changed crypting method to Blowfish+Base64+randomness+Z-compression # needs : @@ -13,6 +13,7 @@ use strict; # crypted format is : # HEX(Base64((paranoia-factor)*(blowfish(RANDOM+Zcomp(string))+RANDOM))) # +# 04-22-2015 Updated for compatibility with current Crypt::CBC # 10-03-2004 Removed seecrypt, fixed two minor bugs # 09-03-2004 Supporting multiline messages now. # 08-03-2004 Lots of bugfixes on the irssi version by Thomas Reifferscheid @@ -175,7 +176,7 @@ sub getkey $key=$gkey; $paranoia=$gparanoia; } - $cipher=new Crypt::CBC($key,'Blowfish',undef); + $cipher=new Crypt::CBC(-key=> $key, -cipher=> 'Blowfish', -header => 'randomiv'); } sub setkey @@ -281,8 +282,6 @@ sub enc $tbout = $prng1.$tbout; $tbout = $cipher->encrypt($tbout); $tbout .= $prng2; - # don't wan't to see "RandomIV" - $tbout =~ s/^.{8}//; } $tbout = encode_base64($tbout); @@ -450,8 +449,6 @@ sub infoline my $i; for ($i=0;$i<$paranoia;$i++) { $out = substr($out,0,(length($out)-4)); - # restore RandomIV - $out = 'RandomIV'.$out; $out = $cipher->decrypt($out); $out = substr($out,4); } -- cgit v1.2.3