Qrpff |
qrpff is a perl script created by Keith Winstein and Marc Horowitz of the MIT SIPB. It performs DeCSS in six or seven lines.
In fact, two versions of qrpff exist. A short version (6 lines) and a fast version (7 lines). Both appear below.
Short:
#!/usr/bin/perl # 472-byte qrpff, Keith Winstein and Marc Horowitz # MPEG 2 PS VOB file -> descrambled output on stdout. # usage: perl -I :::: qrpff # where k1..k5 are the title key bytes in least to most-significant order s $/=2048;while(){G=29;R=142;if((@a=unqT= C* ,_)[20]&48){D=89;_=unqb24,qT,@ b=map{ord qB8,unqb8,qT,_^$a[--D]}@INC;s/...$/1$&/;Q=unqV,qb25,_;H=73;O=$b[4]8^(P=(E=255)&(Q>>12^Q>>4^Q/8^Q))8^(E&(F=(S=O>>14&7^O) ^S*8^S>12^$d>>4^ $d^$d/8))8^($t&($g=($q=$e>>14&7^$e)^$q*8^$q|
|