mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
12 lines
34 KiB
JavaScript
12 lines
34 KiB
JavaScript
|
/*
|
|||
|
频道签到
|
|||
|
|
|||
|
cron:1 1 1 1 * jd_pro_sign.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('频道签到')
|
|||
|
var iil='jsjiami.com.v7';const l1iIII=iii1II;(function(lllI1i,li1i1l,II1i1,lI1lll,iIiII,iil1lI,iiiliI){return lllI1i=lllI1i>>0x9,iil1lI='hs',iiiliI='hs',function(li1i1I,illIii,ii1il1,lI1llI,illIil){const l1l111=iii1II;lI1llI='tfi',iil1lI=lI1llI+iil1lI,illIil='up',iiiliI+=illIil,iil1lI=ii1il1(iil1lI),iiiliI=ii1il1(iiiliI),ii1il1=0x0;const Ill1I=li1i1I();while(!![]&&--lI1lll+illIii){try{lI1llI=-parseInt(l1l111(0x23d,'a92p'))/0x1+-parseInt(l1l111(0x22a,'saKN'))/0x2*(parseInt(l1l111(0x1d7,'iwoR'))/0x3)+parseInt(l1l111(0x245,'r!Yp'))/0x4*(-parseInt(l1l111(0x240,'xjqG'))/0x5)+-parseInt(l1l111(0x26a,'dlHq'))/0x6+parseInt(l1l111(0x1c8,'y@Uq'))/0x7*(-parseInt(l1l111(0x280,'mWMd'))/0x8)+parseInt(l1l111(0x25e,'WiZn'))/0x9+parseInt(l1l111(0x2b3,'PJpC'))/0xa;}catch(i11iiI){lI1llI=ii1il1;}finally{illIil=Ill1I[iil1lI]();if(lllI1i<=lI1lll)ii1il1?iIiII?lI1llI=illIil:iIiII=illIil:ii1il1=illIil;else{if(ii1il1==iIiII['replace'](/[VSnMPTUAYBCHurGftdQ=]/g,'')){if(lI1llI===illIii){Ill1I['un'+iil1lI](illIil);break;}Ill1I[iiiliI](illIil);}}}}}(II1i1,li1i1l,function(lIli11,lllI1I,lillI1,IlIlii,i1l1i1,liil11,iiillI){return lllI1I='\x73\x70\x6c\x69\x74',lIli11=arguments[0x0],lIli11=lIli11[lllI1I](''),lillI1=`\x72\x65\x76\x65\x72\x73\x65`,lIli11=lIli11[lillI1]('\x76'),IlIlii=`\x6a\x6f\x69\x6e`,(0x1649f7,lIli11[IlIlii](''));});}(0x17c00,0xd9ae8,Iii11l,0xc0),Iii11l)&&(iil=Iii11l);const jdCookie=require('./jdCookie'),notify=require(l1iIII(0x244,'#&Z]')),common=require(l1iIII(0x2b0,'2jku')),cryptoJS=require(l1iIII(0x1f1,'x(gY')),isNotify=![];let cookie='';function Iii11l(){const IIIIII=(function(){return[...[iil,'tCPjrMsAVYjGUiSafumQifdG.cUfodBm.HnvTHH7==','WOOqwCkxWR4bWOzN','WPizW50','FbddMmk+WQqaWR7dQGBdRCkbcSkUW4W','W4dcJvG','DXuzW5RcJfa','nKuAW7xdQa','WOatuvKVlLjhWOddL8k8WODwWPVdSmkF','FN5xWRZcMwPT','W7JcJ1a7W4e','WRT0W7xdGmk0','k0xcNmocW7qSWQFdOG/dRW','WOtcOCk+','WOJcTSkEWRpcJMi','p8k1W4T8rYFdICoEwa','WO8fyaRdQMRcR04','WQaBW6e','6lA75y2V5Pw55Pw1','WRuYyx8','6ls45y6F5Pwy5PAz','BgtdMMey','jK/cGCoH','WReTrKWv','W57cL1S','WOWRW4dcQWG','kaPHW4KQ','omo9w1zx','ywKG','WOykW4i2WOO','W50bmrlcUGpcR8kVCvK','ie/cJW','WOHAzW','eJOBnfK','x3auWQKi','5PYT6i+w5y6q5yQA5PAv5O2q772Q6l6a6kkukos9MUI3V+wUHEIJMNBORP7OR7VdTq','WPDbCKVcSbpcSCk5Bq','WORdSeScyG','zdVcG8oFEW','W4jZoa','WRHHWOtcL8kJd2BdSaldONZdKa','WQmjW6S5','WOKyxeWInG','rNuqWP06W4uDCNPcW7ddVehdI1Czxt/dHxpcK8kizmo+qvrRieVdVL5oWQaTB8kF','WOJcSmk+WOSEACovwmkiW5exWRixpCkYW7NdImoUW43cS8kzivfVWQ4iW5DkW6WeWQbxya','WQHuAu7cRa','qwOqkmoXuajIW7TdW7H3W5LUfrWsW5BcUa','nLD0WPZdKaXrkSkwwSkDW5n5','8jwBRmk+','EYtcS8oUDq','n8ouCf8','qIJdLSkDW7G','W7tcSgC2W4hcKaRdMW','WPRcTmk8WO4zBCoDsSky','44oP5O6I56wa44kx6k2E5yE96i+z5yYYrmk5WQdcG8kCW6i','WROaW7eVWPtcKCkefCkE','AhuotSoltK3cLSooiN7dKKBcP8kwv0ldVJ58D1VdVq','W4ZcKJ/cLmkz','iaflW5iYWPCgW6JdISoezmorkSk8WQurW41sWODxWOWkWOO','5A2q5AY4776k5P2r5yMc6lY85O2w5Awt6lEiD1PDnq','WQaqgmkIqG','xoEVJ+wiQ+wLOUI3RmoLw+A1NEwkIUEkOUAbGEs4KEwCOUI9UoIHJUs5LG','B8kdmr0naCoQWO7dQSk5WQ/dLq','WOzbW4xdVa','l8obzuvo','WP7cQmk5WPqaECodw8ks','WR4CW7q1WO3cHCkAbmku','WOKrq8kcWR8kWOHXAq','WO8FhSoaW4e','B24numo8','W61OWRTW','jrhcQqpcK8koW6eSsmkEWPNdVa','pmkFW69FsW','rsldRCk6W6RdM8k0','WOWiDSkjWO8','WPRcTCkSWQqyBSor','WQBcJmoPW67dVmoRACk6WOZcJCo9WR9LF3xdN8k6gCo9','cwtcG8oxW58','W5hdP2XZrq','qwOqkmoXuajIW7igWR80WPOQg1zFW5RcUSkVWRyKWODFgXz8WPxdNam7A8osu8kOWQOSihv5WPddNaXabc4nWPSxrcNcHmowW7lcM8kvgSo7BSoJWPv3W4hdLaj6BJlcJG','WP/dUvOVyq','W6JdIauaWOe','WP4MDIRdGG','WOPhW5q','WQq7BG','W6C8W5S','b8k+W6H4Cq','WQ8ZW4tcNYVcIGJcQCk4W5NcGa','WPepn8kzFSordSkauW','W6HSWQnXxgZcHW','CqtdSmkPWQu','WRtdUSoU','4PYitUACQoEDMEIUSEAYSfq','WPDdBKNcMG','W6aSrq','cw5D5lMC5Pww5BAY56Yz5yIB6l+sca','WRCZW7BcVc/cNq','wIldR8k8W67dJ8kL','cLhdKvJdMs3cIW','5l285OgK5yQ1','WQ4amComW4O','W5NdUMHRt8knWRHRWQuarW'],...(function(){return[...['Dv4XWOv3W4TnWRVcNa','t38nnmoqd1OSW6esWQu','p8kOW557DI7dGCovra','WQ/cT8kpWPe6','mdujW7C','CXVdNW','lqbMW5K+','g8kXgmo0','nsX2gmkigWRcR8oFjhBdHxO','W5uNBwpdJW','iCkiW6O','WOKeBqZdTNtcRYm8nmkKqIZdGmk9WQG','W4hcIhXmla','hHbjW7/dOYGirxbzW6v+uSkIlCoaW6RcMSkSW6FcMCkLWQ/cN2dcICkBaCoUlMi1umolW7KQF2BdG01sye9fWPdcTNNdL8
|
|||
|
// 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
|