DeCSS in Perl

ziggy on 2001-03-07T22:39:36

Slashdot, Wired, and others are mentioning qrpff, a pair of 7-line DeCSS programs written in Perl, and found in the Gallery of CSS Descramblers. The first is 526 dense bytes of perl, and the second five bytes longer, and uses a cache.

The Wired article can be found here, and the slashdot article can be found here. The tshirt doesn't appear to be available. Yet.


t-shirt

majcher on 2001-03-08T17:08:26

http://www.cafepress.com/perldecss

Mammy's little baby loves shortenin'

vsergu on 2001-03-08T17:19:07

One reason the T-shirt isn't available yet is that they're still trying to shorten it. With a little help from Fun With Perl, they've gotten it down to 499 bytes. I don't know what's up with the FWP archives, but here's the latest message, with the code (I hope nothing got garbled in the HTML conversion, and why can't we use <PRE> here?):

Date: Thu, 8 Mar 2001 10:08:07 -0500
From: Keith Calvert Ivey <kcivey@cpcug.org>
To: fwp@technofile.org
Subject: Re: [FWP] Shortening

I sent my shortened version to the creators of the code and got
this response.

------- Forwarded Message Follows -------
To: "Keith Calvert Ivey" <kcivey@cpcug.org>
Cc: keithw@MIT.EDU
Subject: Re: Shortened qrpff.pl (503 bytes)
Date: Thu, 08 Mar 2001 05:24:17 -0500
From: Keith Winstein <keithw@MIT.EDU>

> We've had a little discussion on the Fun With Perl list, and
> this is my contribution.

Hey, nice going. You had a few bugs in your code causing it to not quite
run without bombing out, but nothing too major. Thanks mostly to your
suggestions, here's where we are now (at 499 bytes):

$_='$/=\2048;while(<STDIN>){k=29;c=142;if((@ a=unx"C*",_)[20]&48){h=5;_=
unxb24,join"",@b=map{xB8,unxb8,chr(_^$a[--h+84])}@ ARGV;s/...$/1$&/;d=unx
V,xb25,_;l=73;e=256|(ord$b[4])<<9|ord$b[3];d =d>>8^(f=(r=255)&(d>>12^d>>4
^d^d/8))<<17,e=e>>8^(r&(g=(q=e> >14&7^e)^q*8^q<<6))<<9,_=(map{_ %16or+r^=
c^=(m=(11,10,116,100,11,122,20,100)[_/16%8])&1 10;r^=(72,@z=(64,72,k^=12
*(_%16-2?0:m&17)),l^=_%64?12:0,@z)[_%8]}(16..2 71))[_]^((h>>=8)+=f+(~g&r
))for@a[128..$#a]}print+x"C*",@a}';s/x/pack+/g;s/\ b[c-r_]\b/\$$&/g;eval

I couldn't seem to get current "Fun With Perl" archives, so hopefully
you can pass this on to the list. More suggestions are very
welcome. It would be great to get below 6 * 79 or 6 * 80 before it
goes on a T-shirt (although if we get within 5 and get stumped I'm
going to vote for killing the "STDIN" at the expense of some warnings
after it's reached the end of its input).

Best regards,
Keith


--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC

Re:Mammy's little baby loves shortenin'

pudge on 2001-03-14T19:34:16

You can't use PRE because it allows you to totally mess up the pages. Not that you would, but some people certainly would. You can use "Code" as your post mode, which should work fine. In the future, I will add something like UBB markup, I think, where you can use pseudo-markup like [CODE][/CODE] and [REPLY][/REPLY] in the middle of a message. Awww yeah.