KR/jd_yqs.js

15 lines
77 KiB
JavaScript
Raw Normal View History

2023-08-27 18:46:14 +08:00
/*
摇钱树任务
cron "25 4,16 * * *" script-path=jd_yqs.js, tag=摇钱树任务
2023-09-28 09:45:46 +08:00
等级达到40级为满级需要停止浇水3天7天后开启新一轮活动
2023-08-27 18:46:14 +08:00
轮询提现变量jd_yqs_num //轮询提现页数 一般无需填写
*/
const $ = new Env('摇钱树任务');
2023-09-28 09:45:46 +08:00
var version_='jsjiami.com.v7';const lII1Ill1=I1lI1ii1;(function(I1lI1l,ll11l1Ii,iiIIiIl1,iiiiIlI1,lI1ili,iiIIi1Ii,l11IIi1i){return I1lI1l=I1lI1l>>0x2,iiIIi1Ii='hs',l11IIi1i='hs',function(I1Ill11l,ii1lilli,l1l11I,i11iI1i1,ilIiI11){const iil1Ii1i=I1lI1ii1;i11iI1i1='tfi',iiIIi1Ii=i11iI1i1+iiIIi1Ii,ilIiI11='up',l11IIi1i+=ilIiI11,iiIIi1Ii=l1l11I(iiIIi1Ii),l11IIi1i=l1l11I(l11IIi1i),l1l11I=0x0;const Ill11li1=I1Ill11l();while(!![]&&--iiiiIlI1+ii1lilli){try{i11iI1i1=parseInt(iil1Ii1i(0x37e,'C9p0'))/0x1*(parseInt(iil1Ii1i(0x1e1,'$V3$'))/0x2)+parseInt(iil1Ii1i(0x159,'iD@W'))/0x3+parseInt(iil1Ii1i(0x1f4,'OPM$'))/0x4*(-parseInt(iil1Ii1i(0x2ba,'D3b@'))/0x5)+parseInt(iil1Ii1i(0x2f0,'%Z@G'))/0x6+parseInt(iil1Ii1i(0x33c,'MnfO'))/0x7*(parseInt(iil1Ii1i(0x329,'zSQI'))/0x8)+-parseInt(iil1Ii1i(0x1e5,'EWJ5'))/0x9+-parseInt(iil1Ii1i(0x315,'agV5'))/0xa*(parseInt(iil1Ii1i(0x1c8,'kY8^'))/0xb);}catch(Illil111){i11iI1i1=l1l11I;}finally{ilIiI11=Ill11li1[iiIIi1Ii]();if(I1lI1l<=iiiiIlI1)l1l11I?lI1ili?i11iI1i1=ilIiI11:lI1ili=ilIiI11:l1l11I=ilIiI11;else{if(l1l11I==lI1ili['replace'](/[DMqRGWwUCTbNVeBnfYLhE=]/g,'')){if(i11iI1i1===ii1lilli){Ill11li1['un'+iiIIi1Ii](ilIiI11);break;}Ill11li1[l11IIi1i](ilIiI11);}}}}}(iiIIiIl1,ll11l1Ii,function(Ill1l1,IIlil1iI,llI1l,ii1li1iI,illIl11l,liIl1i1i,iIlliil1){return IIlil1iI='\x73\x70\x6c\x69\x74',Ill1l1=arguments[0x0],Ill1l1=Ill1l1[IIlil1iI](''),llI1l=`\x72\x65\x76\x65\x72\x73\x65`,Ill1l1=Ill1l1[llI1l]('\x76'),ii1li1iI=`\x6a\x6f\x69\x6e`,(0x140491,Ill1l1[ii1li1iI](''));});}(0x334,0x6dee7,l1ilIlli,0xcf),l1ilIlli)&&(version_=l1ilIlli);const iliiIli=$[lII1Ill1(0x182,'snwm')]()?require(lII1Ill1(0x298,'eJX^')):'',iI1lli1l=$['isNode']()?require('./jdCookie.js'):'',iIiiII1l=require('./function/h5st41.js');let l1lIIi1I=!![],lII1Iiii=lII1Ill1(0x3d7,'Ub3e'),iilIliil=process['env'][lII1Ill1(0x3a6,'kV]y')]?process[lII1Ill1(0x32d,'D]3K')][lII1Ill1(0x1e0,'j2IA')]:'1',Ii1l11=Date['now'](),Ili11ili=[],ll1iiiIl='',l1ll1ii;if($['isNode']()){Object[lII1Ill1(0x3ab,'jEc%')](iI1lli1l)[lII1Ill1(0x391,'QHml')](iilIiii1=>{Ili11ili['push'](iI1lli1l[iilIiii1]);});if(process[lII1Ill1(0x3ea,'d)u@')][lII1Ill1(0x371,'dFqS')]&&process['env'][lII1Ill1(0x32c,'jxjh')]===lII1Ill1(0x354,'7rDi'))console['log']=()=>{};}else Ili11ili=[$[lII1Ill1(0x2ac,'MnfO')](lII1Ill1(0x2fc,'D3b@')),$[lII1Ill1(0x368,'QHml')]('CookieJD2'),...Iiiilill($[lII1Ill1(0x310,'wu5G')](lII1Ill1(0x1d1,'Ub3e'))||'[]')[lII1Ill1(0x184,'mKR#')](lI1i1lI1=>lI1i1lI1[lII1Ill1(0x28b,'0(SZ')])][lII1Ill1(0x308,'Cokg')](li1Iili1=>!!li1Iili1);!(async()=>{const ili1llli=lII1Ill1,lllIIil1={'jKoQe':'请勿随意在BoxJs输入框修改内容\x0a建议通过脚本去获取cookie','EVNRW':ili1llli(0x33d,'0(SZ'),'YXYEq':ili1llli(0x1ed,'D]3K'),'hpuWM':function(lI11IilI,iIl111II){return lI11IilI<iIl111II;},'jPkxo':function(ll1lilIi,iI1ll1){return ll1lilIi!==iI1ll1;},'KjBhE':ili1llli(0x260,'7rDi'),'AcxIq':function(I11IIIl1,li1I1lIl){return I11IIIl1(li1I1lIl);},'rJpuG':function(lIilI1i,ii1lIi1I){return lIilI1i+ii1lIi1I;},'wnwlp':function(iIIll11I,i11lII){return iIIll11I(i11lII);},'GaXnp':ili1llli(0x1d0,'D3b@'),'ukjVV':function(liiiIill){return liiiIill();},'zeCBM':function(i1II1ll1){return i1II1ll1();}};if(!Ili11ili[0x0]){$['msg']($[ili1llli(0x38a,'&t8e')],lllIIil1[ili1llli(0x147,'mKR#')],lllIIil1[ili1llli(0x2cb,'U)Lx')],{'open-url':lllIIil1[ili1llli(0x276,'OPM$')]});return;}for(let illl11li=0x0;lllIIil1['hpuWM'](illl11li,Ili11ili[ili1llli(0x1ab,'m6cQ')]);illl11li++){if(lllIIil1[ili1llli(0x1ee,'2F6V')](lllIIil1[ili1llli(0x31c,'&t8e')],ili1llli(0x1ba,'q)Jo'))){if(Ili11ili[illl11li]){ll1iiiIl=Ili11ili[illl11li],$[ili1llli(0x31e,'eJX^')]=lllIIil1['AcxIq'](decodeURIComponent,ll1iiiIl['match'](/pt_pin=([^; ]+)(?=;?)/)&&ll1iiiIl['match'](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$['index']=lllIIil1[ili1llli(0x1da,'QHml')](illl11li,0x1),$[ili1llli(0x19e,'iD@W')]=!![],$[ili1llli(0x345,'e*%h')]='',l1ll1ii='',console[ili1llli(0x28d,'OPM$')](ili1llli(0x34c,'MnfO')+$[ili1llli(0x3bb,'EWJ5')]+'】'+($['nickName']||$[ili1llli(0x1e9,'wu5G')])+ili1llli(0x349,'0(SZ'));if(!$[ili1llli(0x181,'mKR#')]){$[ili1llli(0x22f,'kY8^')]($[ili1llli
2023-08-27 18:46:14 +08:00
// 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