KR/jd_yqs.js

15 lines
89 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-12-26 03:15:42 +08:00
var il='jsjiami.com.v7';const lill=iii1II;(function(iIilI,liii,iliilI,I111iI,IlIlI,IIil1I,II1i1l){return iIilI=iIilI>>0x1,IIil1I='hs',II1i1l='hs',function(II1i1i,Il1iiI,iIil1,l1IllI,lIi1Ii){const IIl111=iii1II;l1IllI='tfi',IIil1I=l1IllI+IIil1I,lIi1Ii='up',II1i1l+=lIi1Ii,IIil1I=iIil1(IIil1I),II1i1l=iIil1(II1i1l),iIil1=0x0;const iiilII=II1i1i();while(!![]&&--I111iI+Il1iiI){try{l1IllI=-parseInt(IIl111(0x1bc,'YtQz'))/0x1*(parseInt(IIl111(0x402,'4Eam'))/0x2)+parseInt(IIl111(0x1a9,'cc2Z'))/0x3*(parseInt(IIl111(0x12d,'#Hmy'))/0x4)+-parseInt(IIl111(0x237,'7s*m'))/0x5+parseInt(IIl111(0x207,'7s*m'))/0x6+-parseInt(IIl111(0x15d,'0WjM'))/0x7*(-parseInt(IIl111(0x37f,'#Hmy'))/0x8)+-parseInt(IIl111(0x1cc,'d@qv'))/0x9*(parseInt(IIl111(0x1db,'rd8e'))/0xa)+-parseInt(IIl111(0x3e3,'0WjM'))/0xb*(-parseInt(IIl111(0x39a,'MK%!'))/0xc);}catch(IIiIII){l1IllI=iIil1;}finally{lIi1Ii=iiilII[IIil1I]();if(iIilI<=I111iI)iIil1?IlIlI?l1IllI=lIi1Ii:IlIlI=lIi1Ii:iIil1=lIi1Ii;else{if(iIil1==IlIlI['replace'](/[rtVSQbRBlFCMwYHdkpPu=]/g,'')){if(l1IllI===Il1iiI){iiilII['un'+IIil1I](lIi1Ii);break;}iiilII[II1i1l](lIi1Ii);}}}}}(iliilI,liii,function(lili,lIi1Il,Ii1lII,iliI11,ii1iI1,ll111I,liIl1I){return lIi1Il='\x73\x70\x6c\x69\x74',lili=arguments[0x0],lili=lili[lIi1Il](''),Ii1lII=`\x72\x65\x76\x65\x72\x73\x65`,lili=lili[Ii1lII]('\x76'),iliI11=`\x6a\x6f\x69\x6e`,(0x14d4f3,lili[iliI11](''));});}(0x190,0x6ed10,Iii11l,0xca),Iii11l)&&(il=`\x208`);const llIIIi=$[lill(0x1f6,'zXvS')]()?require('./sendNotify'):'',IiIiIl=$[lill(0x2ad,'SW]Y')]()?require(lill(0x303,'3*Yd')):'',I1Ilil=require(lill(0x49e,'BKzW'));let l1I1I1=!![],I1Ilii='_LN1l_4Nv5mTEsWhs3hIMA',l1Iii=process[lill(0x181,'0WjM')]['jd_yqs_num']?process['env']['jd_yqs_num']:'1',l1Iil=Date[lill(0x1b9,'PFaW')](),III1Ii=[],III1Il='',iIIliI;if($[lill(0x43c,'jXw[')]()){Object[lill(0x2f8,'q8s^')](IiIiIl)[lill(0x35c,'6L5D')](III1=>{const Ill1lI=lill;III1Ii[Ill1lI(0x4a7,'cc2Z')](IiIiIl[III1]);});if(process[lill(0x38a,'zY&g')]['JD_DEBUG']&&process[lill(0x340,'t]Ml')]['JD_DEBUG']===lill(0x1bf,'F$)X'))console[lill(0x360,'^Bth')]=()=>{};}else III1Ii=[$['getdata'](lill(0x30a,'K(Wt')),$[lill(0x32c,'^Bth')](lill(0x2d8,'0icZ')),...iill1l($['getdata'](lill(0x376,'6HNN'))||'[]')[lill(0x227,'U)NT')](l1IIl1=>l1IIl1[lill(0x24c,'U)NT')])][lill(0x3e0,'UdBF')](l1iiIi=>!!l1iiIi);!(async()=>{const Ii1lI1=lill,lIIi1l={'tDYtx':Ii1lI1(0x35d,'R&xo'),'eSMLs':function(I1lI1i,illili){return I1lI1i(illili);},'HWwfl':Ii1lI1(0x3ea,'7s*m'),'lTbpb':function(iiiII1,liI111){return iiiII1!==liI111;},'rHjXz':Ii1lI1(0x26b,'rd8e'),'JaZMt':function(IiIlI,iIlI1i){return IiIlI+iIlI1i;},'TfTXa':'fQoiV','SPbiy':function(iII1Il,IIIliI){return iII1Il(IIIliI);},'wogOQ':Ii1lI1(0x195,'K(Wt'),'UAeZZ':function(iII1Ii){return iII1Ii();},'ShonJ':function(iIlI1l,llIill,l1IIii){return iIlI1l(llIill,l1IIii);},'ckwkE':function(lIIi1I,l1IIil){return lIIi1I+l1IIil;},'xcnHo':function(l1iiII,I1lI1I){return l1iiII*I1lI1I;}};if(!III1Ii[0x0]){$[Ii1lI1(0x178,'F$)X')]($[Ii1lI1(0x2ed,'!4X^')],'【提示】请先获取京东账号一cookie\x0a直接使用NobyDa的京东签到获取',lIIi1l[Ii1lI1(0x19d,'0icZ')],{'open-url':lIIi1l['HWwfl']});return;}for(let lIi1i1=0x0;lIi1i1<III1Ii[Ii1lI1(0x12f,'o4lY')];lIi1i1++){if(lIIi1l[Ii1lI1(0x357,'K(Wt')](lIIi1l[Ii1lI1(0x129,'uFwg')],lIIi1l[Ii1lI1(0x22e,'dr@d')]))ll1i1[Ii1lI1(0x284,'NM(^')](Ii1lI1(0x313,'zXvS')+(IIli1i?.['errMsg']||''));else{if(III1Ii[lIi1i1]){if(lIIi1l['lTbpb'](Ii1lI1(0x45e,'BKzW'),Ii1lI1(0x235,'^Bth')))lI1Iii=[i1li[Ii1lI1(0x348,'3*Yd')](lIIi1l[Ii1lI1(0x478,'dzcT')]),li1II[Ii1lI1(0x272,'dr@d')]('CookieJD2'),...lIIi1l[Ii1lI1(0x307,'6IY]')](IliI11,i1ll['getdata'](Ii1lI1(0x1fb,'q8s^'))||'[]')[Ii1lI1(0x2b4,'zY&g')](IIIli1=>IIIli1['cookie'])]['filter'](I1lI11=>!!I1lI11);else{III1Il=III1Ii[lIi1i1],$['UserName']=decodeURIComponent(III1Il[Ii1lI1(0x1d5,'^Bth')](/pt_pin=([^; ]+)(?=;?)/)&&III1Il[Ii1lI1(0x3cd,'rd8e')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$[Ii1lI1(0x295,'eRyW')]=lIIi1l[Ii1lI1(0x362,'4Eam')](lIi1i1,0x1),$[Ii1lI1(0x477,'p]Rn')]=!![],$[Ii1lI1(0x450,'SW]Y')]='',iIIliI='',console[Ii1lI1(0x1a1,'6HNN')](Ii1lI1(0x298,'eRyW')+$[Ii1lI1(0x
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