Page 1 of 1

Updated adf.ly surrogate

Posted: Fri Jul 25, 2014 1:27 am
by kasper93
Updated version for adf.ly

Code: Select all

@^https?://adf.ly/[A-z0-9]+/?$

Code: Select all

var wait=true;setInterval(function(){if(wait && typeof stCntr !== 'undefined'){wait=false;stCntr();countdown=2;cnt();countdown=0;cnt();document.getElementById('skip_button').click();}},100)
This will also work if we have their ad iframe blocked :)

I hope you will include the fix in next release.

EDIT:

Or even this version

Code: Select all

var wait=true;setInterval(function(){if(wait&&typeof ysmm!=="undefined"){wait=false;window.onbeforeunload={};var strLeft="",strRight="";for(var z=0;z<ysmm.length;z++)if(z%2==0)strLeft+=ysmm.charAt(z);else strRight=ysmm.charAt(z)+strRight;window.location=base64_decode(strLeft+strRight).substring(2)}},100);
[/s]

EDIT2

In fact. We shouldn't even need to whitelist adf.ly.

Code: Select all

!@^https?:\/\/adf.ly\/[A-z0-9]+\/?$

Code: Select all

var v = /ysmm = \'(.*?)\';/gi;
var ysmm = v.exec(document.getElementsByTagName('html')[0].innerHTML)[1];
var strLeft = "",
    strRight = "";
for (var z = 0; z < ysmm.length; z++) {
    if (z % 2 == 0) {
        strLeft += ysmm.charAt(z);
    } else {
        strRight = ysmm.charAt(z) + strRight;
    }
}
window.location = atob(strLeft + strRight).substring(2);
To avoid redirection we could also add:

Code: Select all

var goToUrl = atob(strLeft + strRight).substring(2);
window.location = atob(goToUrl.split("go.php?u=")[1]);
min:

Code: Select all

for(var a=/ysmm = \'(.*?)\';/gi.exec(document.getElementsByTagName("html")[0].innerHTML)[1],b="",c="",d=0;d<a.length;d++)0==d%2?b+=a.charAt(d):c=a.charAt(d)+c;window.location=atob(b+c).substring(2);

Re: List of scripts for which NS runs surrogate[UPD 23 Feb 2

Posted: Fri Jul 25, 2014 11:50 am
by Giorgio Maone
kasper93 wrote:Updated version for adf.ly
Thank you, I'm gonna include it in 2.6.8.36.

BTW, (@barbaz, too), would be the case of splitting this topic with a "Proposed Surrogates" one, in the development forum?