mirror of https://github.com/KingRan/KR.git
20 lines
33 KiB
JavaScript
20 lines
33 KiB
JavaScript
|
/*
|
|||
|
活动名称:账号健康检查 · 超级无线/超级会员
|
|||
|
|
|||
|
用于检测账号是否黑了,没有变量直接运行即可不适用一般活动
|
|||
|
|
|||
|
⚠ 请勿定时或频繁运行!
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#账号健康检查
|
|||
|
1 1 1 1 * jd_healthCheck.js, tag=账号健康检查, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('账号健康检查(超级无线/超级会员)')
|
|||
|
var version_='jsjiami.com.v7';const i1ilII=iii1II;(function(iillI,lI1III,IIliIi,IllIiI,i1il1,I1l111,IIii1l){return iillI=iillI>>0x2,I1l111='hs',IIii1l='hs',function(I1iIII,liiI11,ililI1,IIii1i,i1ili){const lI1II1=iii1II;IIii1i='tfi',I1l111=IIii1i+I1l111,i1ili='up',IIii1l+=i1ili,I1l111=ililI1(I1l111),IIii1l=ililI1(IIii1l),ililI1=0x0;const Iiill1=I1iIII();while(!![]&&--IllIiI+liiI11){try{IIii1i=parseInt(lI1II1(0x140,'ZEI@'))/0x1*(-parseInt(lI1II1(0x12e,'wRFc'))/0x2)+parseInt(lI1II1(0x1bf,'Lpr^'))/0x3+-parseInt(lI1II1(0x1ab,'RG4b'))/0x4*(-parseInt(lI1II1(0x190,'fWZ!'))/0x5)+parseInt(lI1II1(0x194,'PAgB'))/0x6+parseInt(lI1II1(0xb0,'n3Mv'))/0x7+-parseInt(lI1II1(0x101,'rD)r'))/0x8+parseInt(lI1II1(0xe8,'7]yA'))/0x9;}catch(I1iII1){IIii1i=ililI1;}finally{i1ili=Iiill1[I1l111]();if(iillI<=IllIiI)ililI1?i1il1?IIii1i=i1ili:i1il1=i1ili:ililI1=i1ili;else{if(ililI1==i1il1['replace'](/[lXxpSPEKyGYRHONbqLnUf=]/g,'')){if(IIii1i===liiI11){Iiill1['un'+I1l111](i1ili);break;}Iiill1[IIii1l](i1ili);}}}}}(IIliIi,lI1III,function(lilII1,iill1,iii1l1,IIliIl,II11ll,liiI1I,ililII){return iill1='\x73\x70\x6c\x69\x74',lilII1=arguments[0x0],lilII1=lilII1[iill1](''),iii1l1='\x72\x65\x76\x65\x72\x73\x65',lilII1=lilII1[iii1l1]('\x76'),IIliIl='\x6a\x6f\x69\x6e',(0x1372ed,lilII1[IIliIl](''));});}(0x320,0xc926f,Iii11l,0xca),Iii11l)&&(version_=Iii11l);const Ill11=require(i1ilII(0xed,'TSyY')),liiIII=require(i1ilII(0x17b,'N1wf')),li1i11=require(i1ilII(0x133,'5ZJa'));let iI11I1='',il1i1l='',IlIlll='';const IIIl1I=Object[i1ilII(0x136,'%wFV')](Ill11)['map'](ii1ii1=>Ill11[ii1ii1])[i1ilII(0x113,'JJ@I')](llllI=>llllI);!IIIl1I[0x0]&&($[i1ilII(0x193,'PaYH')]($['name'],i1ilII(0xc9,'Snc8')),process[i1ilII(0xdc,'f7iT')](0x1));function Iii11l(){const i1ilIi=(function(){return[version_,'fqbjsKxjyGPiNKEamOiUl.llfcponYmS.LyvH7RX==','r28ljmkCWQO5','WRJdNmk6nSoUEmow','ASk9D8kf','WQ1UWPpdP8kvW7VcVmoTm1Sgzmk5W7OHAmkVrNy','W5aIWPZdUmkw','WPtcSXqzta','WOldGCkSW4xcJa','WP3dJ301fq','WPhdPColW6lcGHn9WOjCWRRcOCkuWPfkes16W4ldJW','WQRdHCkK','fd/cKmokW5q','q8ouiWT/','W5ZcJmkXWRBcKW','xCo7itrh','kSkSWPRcSSoR','WO5aWO3dLSkn','gJtcGmoPW4vkW7BcKdldQSknW6ldIUITSEAXLUwNQEI0JE++IoIUMUAJNoACPEE/OUI3HEMfSEIVPW','dmkXB8o8WQJcJa','W67dKZBcG3NcPSoCAmkoW7C','W4NdO8oNW6VcTq','W7BdKZdcGthcS8oGAmkw','W6tcT8kJWObp','W6dcSSkdWObk','W77cLmoFWRpcNa','W6pcKmo2r8kZlmo+vN8cDh0','dJRcNCoFW75nW6S','sIGgAK8','W5pdTCoz','gviOW6PYW65Vkmo3wvfAWO0','W5fVW47dPIq9WPXqtG','DCoWW4T3WPS','WPJcLcu8rq','EmobiWjr','qSopW43dHemuBa','WP8uyhfa','WR7dRmkicmoo','uCkiFmotWPpcRmkg','WRSvWQ7dQSox','W4D4W5/dUZmeWQLku0FdJCki','W6RdGYFcTtJcPSox','WQ4NxfDHW4OI','WPGEWPddUq','W7a1WOFdU8kvW78','u8oaBNuqW79wmmkQ','WQ7cGty','fZe8CSo9','WQ7dNSk3W6pcRmo8WQTijmoOmaxcOYmaW5LoWOBcPG/cImkeWQW6CgJdH8k9W7tcRW','smoBW6OIWRW','W6T9W57dRru','W5/dMJxcQCo+WQO6W5JcPIbxW4LchwSdW6C','W63cNsRcVSkMjNBcOq','W7JcMM4bmgJcLCoU','WRTzWRtdJ8kSW5W8yeXcy8kXyCktWOSm','W6XpWRmlWR0','W6ldKYFcOthcTmoaBSkwW6fQW7n+FCopW7dcUG','W5hcHCo1WQe','W5dcIY7cOmkCl0NcOr3dT8kOzG','nSkMWPdcU8oXtmkqW5fQCMj0','bEITTEAZK+wtU+w5OJ8','q8oWps5F','tSoaW4S','l8ojWRu','W4NcPqPpW7u','bWRdOG','AUAmIEwoTEwrTEw4HEAvHEAoH+IMIUAENEwNOEI1U8keWPq','FJziWRii','W5/cI8oOWRlcTW','gbhdPaHGWP7cKe5xWRO','W5pdOaBcMr4','WPSuWP7dKmoi','hxDmlX7dLmkcW5ldNdnrWRqU','W64qW7tcKSoXWOTOrwTbvColsq','W7nhW5H+ECkxsa','WOBORjpMS57LKjJLUANcOW','WRddJmk6jCoXFmodv18fwG','lSodWQeanqrb','orxcOmoEW68','W7jEW7FdHte','WR8JtebrW4WEEha','l3dcKSklcW','WP/dHqCA6k205Rc95AwT6lA1bWpcQw4','qav8WRq2WRqndmo1shX0','B8oWW4NdR8k0eCo3W7jVyKXTWQy','dLdcQmkN','WPlcGdC6xG','FGdcTh7cQa','WR8YxvTAW58','W611ztiVjmkeW6qYp8kVo0i','WQGXpL17','WQBdGu4','ltRcGtvo','t1nR','rqvUWQSJWRS6','rseB','sc0iD1ZcICodW7RdHY1L'].concat((function(){return['CG9VWRin','qCovW54','W7LYWOJcRSo/','umoYx28k','WRVcPbmpCa','jSoSvmozaSoClwjmkW','5lUl5PAf5O+c55Ix6kYO5Rke5Ps95RkY','tSovW4CyW7tOTBNNUBxMLkVNU5ff4P69','hZdcH8okW7LkW6K','W5xdH8oPW6lcSW','EYzsWRau','c8o5aSoWWR9ZWQGGqCkvgSkqW7BdM8oxpW0','vSoNW7jeWPnRr8kkvG','W5xcKmoUWRZcK8oK','i2rwnaddISkD5B6d5Awz44gp5lQL5lU96lwk5yY7','lSkiWQBcTSoS','WRZOR7tMSQVLP7pOTRVVVjRdVvRcIg99WQddQCoIWO9Ce8kiW5/cSW','44km5O+t56Et44ot6k2P5ywA6iYy5y+PW
|
|||
|
// prettier-ignore
|
|||
|
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.d
|