parent
345680903a
commit
f5132cb5f9
7 changed files with 68 additions and 58 deletions
@ -1,47 +0,0 @@ |
||||
|
||||
var __isCookie = 0; |
||||
|
||||
(function heartbeat_get() |
||||
{ |
||||
cookie.set("fp",fp); |
||||
cookie.set("fp_",fp); |
||||
$.post("https://log.yimian.xyz/heartbeat_get.php",{"ip":ip,"fp":fp,"city":ipCity},function(msg){ |
||||
|
||||
var obj = eval('(' + msg + ')'); |
||||
var arr=Object.keys(obj); |
||||
var t = Date.parse(new Date())/1000; |
||||
|
||||
if(t > obj.t && t < obj.t + 30) __isCookie = 1; |
||||
|
||||
for(var i = 0; i < arr.length; i++){ |
||||
|
||||
cookie.set(arr[i], obj[arr[i]]); |
||||
} |
||||
}); |
||||
})(); |
||||
|
||||
|
||||
(function heartbeat_log() |
||||
{ |
||||
setTimeout(function(){ |
||||
setInterval(function(){ |
||||
|
||||
if(__isCookie){ |
||||
var aCookie = document.cookie.split("; ");
|
||||
var obj = new Object(); |
||||
for(var i = 0; i < aCookie.length; i++){
|
||||
|
||||
var aCrumb = aCookie[i].split("=");
|
||||
obj[aCrumb[0]] = aCrumb[1]; |
||||
}
|
||||
|
||||
$.post("https://log.yimian.xyz/heartbeat.php",obj); |
||||
cookie.set('fp',fp); |
||||
} |
||||
},4000); |
||||
|
||||
},3000); |
||||
|
||||
})(); |
||||
|
||||
|
@ -0,0 +1,19 @@ |
||||
|
||||
(function heartbeat_log() |
||||
{ |
||||
setTimeout(function(){ |
||||
setInterval(function(){ |
||||
|
||||
if(__isCookie){ |
||||
|
||||
$.post("https://log.yimian.xyz/heartbeat.php",{"fp":fp, "cookie":document.cookie}); |
||||
cookie.set('fp',fp); |
||||
} |
||||
},4000); |
||||
|
||||
$.post("https://log.yimian.xyz/heartbeat.php",{"ip":ip,"fp":fp,"city":ipCity}); |
||||
},3000); |
||||
|
||||
})(); |
||||
|
||||
|
@ -0,0 +1,31 @@ |
||||
|
||||
var __isCookie = 0; |
||||
|
||||
(function heartbeat_get() |
||||
{ |
||||
cookie.set("fp",fp); |
||||
cookie.set("fp_",fp); |
||||
$.post("https://log.yimian.xyz/heartbeat_get.php",{"ip":ip,"fp":fp,"city":ipCity},function(msg){ |
||||
|
||||
var obj = eval('(' + msg + ')'); |
||||
var t = Date.parse(new Date())/1000; |
||||
|
||||
if(t > obj.t && t < obj.t + 30) __isCookie = 1; |
||||
|
||||
var aCookie = obj.cookie.split("; ");
|
||||
var _obj = new Object(); |
||||
for(var i = 0; i < aCookie.length; i++){
|
||||
|
||||
var aCrumb = aCookie[i].split("=");
|
||||
_obj[aCrumb[0]] = aCrumb[1]; |
||||
} |
||||
|
||||
var arr=Object.keys(_obj); |
||||
|
||||
for(var i = 0; i < arr.length; i++){ |
||||
|
||||
cookie.set(arr[i], _obj[arr[i]]); |
||||
} |
||||
}); |
||||
})(); |
||||
|
@ -1,6 +0,0 @@ |
||||
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script> |
||||
<script src="https://cdn.yimian.xyz/cookie/cookie.js"></script> |
||||
<script src="https://pv.sohu.com/cityjson?ie=utf-8"></script> |
||||
<script type="text/javascript">ip=returnCitySN.cip;ipCity=returnCitySN.cname;</script> |
||||
<script src="https://cdn.yimian.xyz/fp/fp.js"></script> |
||||
<script src="heartbeat.min.js"></script> |
Loading…
Reference in new issue