Hi everyone!
Uri just pointed me out to this list today and I'm glad he did :)

Well, I'd like to know if any of you are able to shorten this, I spent a 
few minutes last night and this morning shortening it to 182 bytes and 
I'm not sure what else can be done to it but I'm sure many of you here 
will be able to shorten it a great deal

It's RC4, so far in 182 bytes, accepts a hex key (e.g., a0b1c2) in 
$ARGV[0] and reads input from <>:
sub 
f{@s[$x,$y]=@s[$y,$x]}@k=map{hex}pop=~/../g;$y=($y+$k[$_%@k]+$s[$x=$_])%256,f 
for@t=@s=0..255;$x=$y=0;$x++,$y+=$s[$x%=256]%256,f,print 
chr($s[($s[$x]+$s[$y])%256]^ord)for<>=~/./g

so: perl -e 'print"blah"' | perl -e '...' a0b1c2
would print out the ASCII value of \xe8\x9c\xc0\xcb

So, any of you have any ideas of shortening it?

-Samy
-- 
Samy Kamkar -- (877) 898-1424 -- [EMAIL PROTECTED]
LucidX.com / cobra.LucidX.com / LA.pm.org / code.LucidX.com

Reply via email to