new Perl CSS descrambler
2001-03-07 19:16:11+00 by Dan Lyke 1 comments
/. reports a new Perl CSS descrambler (now this'll be a test of my formatting engine...) that's posted on Dr David Touretzky's Gallery of CSS Descramblers and reproduced here because, well, that's what we do. Also of note, the /. entry contains an optimized version apparently fast enough to do this in real time.
#!/usr/bin/perl -w # 526-byte qrpff, Keith Winstein and Marc Horowitz <sipb-iap-dvd@mit.edu> # MPEG 2 PS VOB file on stdin -> descrambled output on stdout # arguments: title key bytes in least to most-significant order ='while(read+STDIN,,2048){=29;=142;if((@a=unx"C*",)[20]&48){=5; =unxb24,join"",@b=map{xB8,unxb8,chr(^[--+84])}@ARGV;s/...$/1$&/;= unxV,xb25,;=73;=256|(ord[4])<<9|ord[3];=>>8^(=(=255)&( >>12^>>4^^/8))<<17,=>>8^(&(=(=>>14&7^)^*8^<<6))<<9 ,=(map{%16or^=^=(=(11,10,116,100,11,122,20,100)[/16%8])&110; ^=(72,@z=(64,72,^=12*(%16-2?0:&17)),^=%64?12:0,@z)[%8]}(16..271)) []^((>>=8)+=+(~&))for@a[128..$#a]}print+x"C*",@a}';s/x/pack+/g;eval