Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ok so adf.ly encodes url and javascript to keep away people/scripts from looking at html source and getting the link, instead of waiting for the link to become available while watching ads.
I googled around for any script that works round this but nothing that was working came up.
So I digged a bit yesterday night, and now, I'm ready to give the solution
<script>
var adflyLink, lnk;
var g_cnt = 0;
var scriptContent = document.getElementsByTagName('head')[0].innerHTML;
lnk = scriptContent.match(/ysmm[^;]+;/g);
if(lnk.length){
lnk = lnk[0].replace(/(^[^'"]+['"])([^'"]+)(['"]\;$)/, "$2");
var p1 = '', p2 = '';
for(var z = 0; z <= lnk.length; z++){
if(z%2 == 0)
p1 += lnk.charAt(z);
else
p2 = lnk.charAt(z) + p2;
}
adflyLink = atob(p1 + p2).substr(2);
}
</script>
it must be ready straight forward what it does..
All you have to is , open up a javascript console and paste that code, hit enter and have fun with the url :)
For anyone interested in how adf.ly does it, have a look at view11.js (or view[1-9]+\.js to be exact) at function cnt..
thanks
@aslian

This comment has been minimized.

Copy link

aslian commented Jul 22, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.