[mythtv-users] Immir tv_grab_au again!

Michael Smith myth at immir.com
Fri Jun 16 08:24:45 UTC 2006


Note: my first reply bounced (wrong sending address) --- I've just 
noticed they're playing an amusing trick --- the site chooses a 
different obfuscation each time, but I only saw two different ones so 
far I think (one of them is shown below)... Might be time to start 
thinking of actually running a java interpreter to do the decoding to 
avoid all this nonsense. - Immir


> My immir tv_grab_au got serious problems last night. It spat out the following errors 

Heh. They changed their obfuscation. It looks trivial to undo --- but
I'm too busy to do it just now; have to wait a day or two for me to find
enough time to code it up (say Monday at the latest).

For anyone who wants to have a stab themselves, the obfuscation is
undone with the javascript below:

(at first glance it looks like to undo it... three digits give a
character in octal, then 5 character chunks are taken in reverse order,
then it's been sort of interleaved by 2 with a shift of 4 on one leg and
a shift of 3 one the other, so that gets undone, then the first half has
been added to the second, and the whole things is reversed again... oh,
and the standard java unescape comes last)


function showContent(x){
     if (x== null||x.length==0)return;
     var a = new RegExp('^http://[a-zA-Z.]{0,20}ninemsn.com.au');
     var d = location.href;
     if (d.search(a)<0) {return;}
     x=unescape(x);
     var y='';
     for(var i=0;i<x.length;i+=3){
         y+=String.fromCharCode(parseInt(x.substr(i,3),8));
     }
     x=y;
     var y='';
     for (i=x.length-1;i>=0;i-=5){
         if (i-4<0){
             y+=x.substr(0,i+1);
         }else{
             y+=x.substr(i-4,5);
         }
     }
     x=y;
     var y='';
     for(var i=0;i<Math.floor(x.length/2);i++){
         y+=String.fromCharCode(x.charCodeAt(i) - 4)
             + String.fromCharCode(x.charCodeAt(i+Math.floor(x.length/2)
                                                + x.length%2) - 3);
     }
     for(var i=0;i<x.length%2;i++){
         y+=String.fromCharCode(x.charCodeAt(i +
Math.floor(x.length/2))-4\);
     }
     x=y;
     var y='';
     for (i=x.length;i>=0;i--){
         y+=x.charAt(i);
     }
     x=y;
     x=unescape(x);
     document.write(x);
}




More information about the mythtv-users mailing list