Skip to content

Instantly share code, notes, and snippets.

@q121q
Last active October 3, 2017 17:10
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save q121q/6113685 to your computer and use it in GitHub Desktop.
Save q121q/6113685 to your computer and use it in GitHub Desktop.
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
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