KR/jd_yqs.js

13 lines
76 KiB
JavaScript
Raw Normal View History

2023-08-27 18:46:14 +08:00
/*
摇钱树任务
cron "25 4,16 * * *" script-path=jd_yqs.js, tag=摇钱树任务
轮询提现变量jd_yqs_num //轮询提现页数 一般无需填写
*/
const $ = new Env('摇钱树任务');
2023-09-28 09:31:16 +08:00
var version_='jsjiami.com.v7';const I1i1l1ii=Ii1li1l1;(function(IIl1iil,l1l1i1l1,IlllI1iI,liiIill1,II1liiii,I1iIl1i1,IiIli1lI){return IIl1iil=IIl1iil>>0x7,I1iIl1i1='hs',IiIli1lI='hs',function(Ill1I1ll,IlIiIli1,lil1iI11,IiIIiI1l,l11lIl1i){const I11I1iIl=Ii1li1l1;IiIIiI1l='tfi',I1iIl1i1=IiIIiI1l+I1iIl1i1,l11lIl1i='up',IiIli1lI+=l11lIl1i,I1iIl1i1=lil1iI11(I1iIl1i1),IiIli1lI=lil1iI11(IiIli1lI),lil1iI11=0x0;const iIlIiII=Ill1I1ll();while(!![]&&--liiIill1+IlIiIli1){try{IiIIiI1l=parseInt(I11I1iIl(0x26a,'oxx9'))/0x1+parseInt(I11I1iIl(0x224,'EGGR'))/0x2*(-parseInt(I11I1iIl(0x1a0,'pBLM'))/0x3)+-parseInt(I11I1iIl(0x2af,'fa1B'))/0x4*(parseInt(I11I1iIl(0x1f0,'bN1X'))/0x5)+parseInt(I11I1iIl(0x1db,'%lGy'))/0x6*(-parseInt(I11I1iIl(0x1b8,'gayE'))/0x7)+parseInt(I11I1iIl(0x2fd,'yrco'))/0x8+parseInt(I11I1iIl(0x200,'q%df'))/0x9+parseInt(I11I1iIl(0x1a9,'bN1X'))/0xa;}catch(Ilillll1){IiIIiI1l=lil1iI11;}finally{l11lIl1i=iIlIiII[I1iIl1i1]();if(IIl1iil<=liiIill1)lil1iI11?II1liiii?IiIIiI1l=l11lIl1i:II1liiii=l11lIl1i:lil1iI11=l11lIl1i;else{if(lil1iI11==II1liiii['replace'](/[lKMDxfTBYpbQhGPtLXJ=]/g,'')){if(IiIIiI1l===IlIiIli1){iIlIiII['un'+I1iIl1i1](l11lIl1i);break;}iIlIiII[IiIli1lI](l11lIl1i);}}}}}(IlllI1iI,l1l1i1l1,function(lIllIi1,Ill1I111,iiiII1iI,IllllIl,liiilII,l11Ii1l,I11ll1iI){return Ill1I111='\x73\x70\x6c\x69\x74',lIllIi1=arguments[0x0],lIllIi1=lIllIi1[Ill1I111](''),iiiII1iI=`\x72\x65\x76\x65\x72\x73\x65`,lIllIi1=lIllIi1[iiiII1iI]('\x76'),IllllIl=`\x6a\x6f\x69\x6e`,(0x14048a,lIllIi1[IllllIl](''));});}(0x6480,0xafd49,IilIiilI,0xcb),IilIiilI)&&(version_=IilIiilI);const II1I1li1=$['isNode']()?require(I1i1l1ii(0x342,'aF^J')):'',lII1IIiI=$[I1i1l1ii(0x1f9,'gayE')]()?require(I1i1l1ii(0x2d9,'0&(a')):'',Iil1li=require('./function/h5st41.js');let liiiIii=!![],IiiIlll1=I1i1l1ii(0x315,'t3dz'),lll1Ilil=process[I1i1l1ii(0x3d9,'t3dz')]['jd_yqs_num']?process['env']['jd_yqs_num']:'1',ill11lI1=Date[I1i1l1ii(0x33f,'wN^z')](),l1iIIli1=[],IIllIlll='',iiIiiI1;if($[I1i1l1ii(0x1ae,'q(c]')]()){Object[I1i1l1ii(0x1ba,'qL%q')](lII1IIiI)[I1i1l1ii(0x3b2,'gayE')](Il1IiIiI=>{l1iIIli1['push'](lII1IIiI[Il1IiIiI]);});if(process[I1i1l1ii(0x19e,'Iy##')]['JD_DEBUG']&&process[I1i1l1ii(0x413,'P6^$')]['JD_DEBUG']==='false')console['log']=()=>{};}else l1iIIli1=[$['getdata']('CookieJD'),$[I1i1l1ii(0x21d,'Iy##')](I1i1l1ii(0x297,'bN1X')),...i1I1il($[I1i1l1ii(0x185,'UlyO')](I1i1l1ii(0x24a,'qL%q'))||'[]')[I1i1l1ii(0x247,'rb82')](li1li1lI=>li1li1lI['cookie'])]['filter'](l11ii1I1=>!!l11ii1I1);function Ii1li1l1(_0x4945c7,_0x2b4523){const _0x4c25e9=IilIiilI();return Ii1li1l1=function(_0x497b92,_0x1973a3){_0x497b92=_0x497b92-0x166;let _0x48b3ed=_0x4c25e9[_0x497b92];if(Ii1li1l1['KuaxIx']===undefined){var _0xaa8c83=function(_0x4d2e21){const _0x1be094='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x215482='',_0x4a6988='';for(let _0x1133c1=0x0,_0x5b343d,_0x4b3f13,_0x321244=0x0;_0x4b3f13=_0x4d2e21['charAt'](_0x321244++);~_0x4b3f13&&(_0x5b343d=_0x1133c1%0x4?_0x5b343d*0x40+_0x4b3f13:_0x4b3f13,_0x1133c1++%0x4)?_0x215482+=String['fromCharCode'](0xff&_0x5b343d>>(-0x2*_0x1133c1&0x6)):0x0){_0x4b3f13=_0x1be094['indexOf'](_0x4b3f13);}for(let _0x39492e=0x0,_0x5518ef=_0x215482['length'];_0x39492e<_0x5518ef;_0x39492e++){_0x4a6988+='%'+('00'+_0x215482['charCodeAt'](_0x39492e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4a6988);};const _0x145b55=function(_0x823bab,_0x14504b){let _0x341c21=[],_0x38e1dd=0x0,_0x1cb4b8,_0x485ae0='';_0x823bab=_0xaa8c83(_0x823bab);let _0x26e611;for(_0x26e611=0x0;_0x26e611<0x100;_0x26e611++){_0x341c21[_0x26e611]=_0x26e611;}for(_0x26e611=0x0;_0x26e611<0x100;_0x26e611++){_0x38e1dd=(_0x38e1dd+_0x341c21[_0x26e611]+_0x14504b['charCodeAt'](_0x26e611%_0x14504b['length']))%0x100,_0x1cb4b8=_0x341c21[_0x26e611],_0x341c21[_0x26e611]=_0x341c21[_0x38e1dd],_0x341c21[_0x38e1dd]=_0x1cb4b8;}_0x26e611=0x0,_0x38e1dd=0x0;for(let _0x5b954d=0x0;_0x5b954d<_0x823bab['length'];_0x5b954d++){_0x26e611=(_0x26e611+0x1)%0x100,_0x38e1dd=(_0x38e1dd+_0x341c21[_0x26e611])%0x100,_0x1cb4b8=_0x341c21[_0x26e611],_0x341c21[_0x26e611]=_0x341c21[_0x38e1dd],_0x341c21[_0x38e1dd]=
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