diff options
| author | Jacob Christie | 2015-04-22 22:27:27 -0500 |
|---|---|---|
| committer | Jacob Christie | 2015-04-22 22:27:27 -0500 |
| commit | 76b4eceaeb338f88ca1f0fa1847f1c04d6d4e547 (patch) | |
| tree | 2fbdd39db8c308896086bc638744a4bb724dd307 /scripts | |
| parent | 365277423d8f0bba7c84120b55d66b2453e7ea0a (diff) | |
| download | scripts.irssi.org-76b4eceaeb338f88ca1f0fa1847f1c04d6d4e547.tar.bz2 | |
Update blowjob.pl
Update for compatibility with current Crypt::CBC
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/blowjob.pl | 9 |
1 files changed, 3 insertions, 6 deletions
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); } |
