KR/jd_zqydj.js

13 lines
60 KiB
JavaScript
Raw Normal View History

2023-09-28 13:51:15 +08:00
/*
攒券赢大奖任务
cron "25 9,18 * * *" script-path=jd_zqydj.js, tag=攒券赢大奖任务
首页 右下角图标
*/
const $ = new Env('攒券赢大奖任务');
var version_='jsjiami.com.v7';const Ili11l=l1Ill1il;function l1Ill1il(_0x23c8c7,_0x289827){const _0x46b270=IlI1iII1();return l1Ill1il=function(_0xdafc51,_0x69929f){_0xdafc51=_0xdafc51-0x85;let _0x4d3c99=_0x46b270[_0xdafc51];if(l1Ill1il['twdmOi']===undefined){var _0x34c91b=function(_0x58828b){const _0x20f2cf='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x495a34='',_0x2363dc='';for(let _0x24e4d8=0x0,_0x489f69,_0x11471e,_0x23cf7f=0x0;_0x11471e=_0x58828b['charAt'](_0x23cf7f++);~_0x11471e&&(_0x489f69=_0x24e4d8%0x4?_0x489f69*0x40+_0x11471e:_0x11471e,_0x24e4d8++%0x4)?_0x495a34+=String['fromCharCode'](0xff&_0x489f69>>(-0x2*_0x24e4d8&0x6)):0x0){_0x11471e=_0x20f2cf['indexOf'](_0x11471e);}for(let _0x2545e6=0x0,_0x39b116=_0x495a34['length'];_0x2545e6<_0x39b116;_0x2545e6++){_0x2363dc+='%'+('00'+_0x495a34['charCodeAt'](_0x2545e6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2363dc);};const _0x575b43=function(_0x32a3d9,_0x1dc6d5){let _0x1b9b77=[],_0x537d08=0x0,_0x34c373,_0x27d886='';_0x32a3d9=_0x34c91b(_0x32a3d9);let _0x34ae46;for(_0x34ae46=0x0;_0x34ae46<0x100;_0x34ae46++){_0x1b9b77[_0x34ae46]=_0x34ae46;}for(_0x34ae46=0x0;_0x34ae46<0x100;_0x34ae46++){_0x537d08=(_0x537d08+_0x1b9b77[_0x34ae46]+_0x1dc6d5['charCodeAt'](_0x34ae46%_0x1dc6d5['length']))%0x100,_0x34c373=_0x1b9b77[_0x34ae46],_0x1b9b77[_0x34ae46]=_0x1b9b77[_0x537d08],_0x1b9b77[_0x537d08]=_0x34c373;}_0x34ae46=0x0,_0x537d08=0x0;for(let _0x58ad77=0x0;_0x58ad77<_0x32a3d9['length'];_0x58ad77++){_0x34ae46=(_0x34ae46+0x1)%0x100,_0x537d08=(_0x537d08+_0x1b9b77[_0x34ae46])%0x100,_0x34c373=_0x1b9b77[_0x34ae46],_0x1b9b77[_0x34ae46]=_0x1b9b77[_0x537d08],_0x1b9b77[_0x537d08]=_0x34c373,_0x27d886+=String['fromCharCode'](_0x32a3d9['charCodeAt'](_0x58ad77)^_0x1b9b77[(_0x1b9b77[_0x34ae46]+_0x1b9b77[_0x537d08])%0x100]);}return _0x27d886;};l1Ill1il['nZNuYh']=_0x575b43,_0x23c8c7=arguments,l1Ill1il['twdmOi']=!![];}const _0x44f6cf=_0x46b270[0x0],_0x225c03=_0xdafc51+_0x44f6cf,_0x47d422=_0x23c8c7[_0x225c03];return!_0x47d422?(l1Ill1il['fYfJbg']===undefined&&(l1Ill1il['fYfJbg']=!![]),_0x4d3c99=l1Ill1il['nZNuYh'](_0x4d3c99,_0x69929f),_0x23c8c7[_0x225c03]=_0x4d3c99):_0x4d3c99=_0x47d422,_0x4d3c99;},l1Ill1il(_0x23c8c7,_0x289827);}(function(IlI11i,l1IIil1l,iiI1Il1l,IlIl11l1,lI1iIIiI,I1IIilI,lillIili){return IlI11i=IlI11i>>0x8,I1IIilI='hs',lillIili='hs',function(i1IilI1,iIilil,ii111liI,IlIIIili,i1l1iIl){const Iiliil=l1Ill1il;IlIIIili='tfi',I1IIilI=IlIIIili+I1IIilI,i1l1iIl='up',lillIili+=i1l1iIl,I1IIilI=ii111liI(I1IIilI),lillIili=ii111liI(lillIili),ii111liI=0x0;const IliliIlI=i1IilI1();while(!![]&&--IlIl11l1+iIilil){try{IlIIIili=parseInt(Iiliil(0xa8,'s#Sz'))/0x1+parseInt(Iiliil(0xf4,'Uxxt'))/0x2*(parseInt(Iiliil(0x28d,'WEGz'))/0x3)+-parseInt(Iiliil(0x217,'3E1g'))/0x4*(-parseInt(Iiliil(0x13b,'h6f^'))/0x5)+parseInt(Iiliil(0x12f,'gn1o'))/0x6+-parseInt(Iiliil(0xd1,'6&*M'))/0x7+parseInt(Iiliil(0x266,'QfFk'))/0x8*(-parseInt(Iiliil(0x1ce,'imUI'))/0x9)+-parseInt(Iiliil(0x247,'p&vq'))/0xa*(parseInt(Iiliil(0x121,'XGT^'))/0xb);}catch(Iilllili){IlIIIili=ii111liI;}finally{i1l1iIl=IliliIlI[I1IIilI]();if(IlI11i<=IlIl11l1)ii111liI?lI1iIIiI?IlIIIili=i1l1iIl:lI1iIIiI=i1l1iIl:ii111liI=i1l1iIl;else{if(ii111liI==lI1iIIiI['replace'](/[qwJMRUOutHDhTbQWprFYxAEC=]/g,'')){if(IlIIIili===iIilil){IliliIlI['un'+I1IIilI](i1l1iIl);break;}IliliIlI[lillIili](i1l1iIl);}}}}}(iiI1Il1l,l1IIil1l,function(lllii1,lII1111,l11Ii111,liiili,iiIl1l1I,il1IlII,lIIIIill){return lII1111='\x73\x70\x6c\x69\x74',lllii1=arguments[0x0],lllii1=lllii1[lII1111](''),l11Ii111=`\x72\x65\x76\x65\x72\x73\x65`,lllii1=lllii1[l11Ii111]('\x76'),liiili=`\x6a\x6f\x69\x6e`,(0x1404ec,lllii1[liiili](''));});}(0xc900,0x4b7c4,IlI1iII1,0xcb),IlI1iII1)&&(version_=IlI1iII1);const IliilI1=$['isNode']()?require(Ili11l(0x168,'d1p8')):'',I1lIi11=$['isNode']()?require('./jdCookie.js'):'',Ililll11=require(Ili11l(0x258,'p&vq'));let llIlIiil=!![],iiIil1il=Ili11l(0x158,'j@Sj'),Ii1liIl1=Date[Ili11l(0x157,'TBeV')](),iiiIliil=[],i1iiiIiI='',iiiIlliI;if($[Ili11l(0x18b,'Gtb[')]()){Object[Ili11l(0x1bc,'XFW7')](I1lIi11)[Ili11l(0x218,'NEoR')](lii1iilI=>{cons
// 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