KR/jd_yqs.js

13 lines
80 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('摇钱树任务');
var version_='jsjiami.com.v7';const I1I1i1ii=lll1I11i;(function(IIIlIIII,ll1lll1l,ii1ii11i,lII1IlIi,IiI,I1l1IIl1,IliiI1il){return IIIlIIII=IIIlIIII>>0x9,I1l1IIl1='hs',IliiI1il='hs',function(I1IlIiIl,liii1llI,iiiiI1ii,l1i1lI11,iI11iIii){const IlliIi1=lll1I11i;l1i1lI11='tfi',I1l1IIl1=l1i1lI11+I1l1IIl1,iI11iIii='up',IliiI1il+=iI11iIii,I1l1IIl1=iiiiI1ii(I1l1IIl1),IliiI1il=iiiiI1ii(IliiI1il),iiiiI1ii=0x0;const ii1lIlli=I1IlIiIl();while(!![]&&--lII1IlIi+liii1llI){try{l1i1lI11=parseInt(IlliIi1(0x3c1,'A3Q!'))/0x1*(parseInt(IlliIi1(0x2ce,']J3N'))/0x2)+parseInt(IlliIi1(0x175,'MaR0'))/0x3*(-parseInt(IlliIi1(0x1ca,'tBl]'))/0x4)+parseInt(IlliIi1(0x238,'&4ga'))/0x5*(-parseInt(IlliIi1(0x3a7,'#mso'))/0x6)+-parseInt(IlliIi1(0x384,'$S5d'))/0x7*(-parseInt(IlliIi1(0x2b8,'$WOd'))/0x8)+-parseInt(IlliIi1(0x183,'2s7$'))/0x9*(parseInt(IlliIi1(0x30c,'&4ga'))/0xa)+-parseInt(IlliIi1(0x22b,'$S5d'))/0xb*(-parseInt(IlliIi1(0x343,'DIRO'))/0xc)+-parseInt(IlliIi1(0x442,'G#oX'))/0xd*(-parseInt(IlliIi1(0x251,'X7Lp'))/0xe);}catch(I1IiiIil){l1i1lI11=iiiiI1ii;}finally{iI11iIii=ii1lIlli[I1l1IIl1]();if(IIIlIIII<=lII1IlIi)iiiiI1ii?IiI?l1i1lI11=iI11iIii:IiI=iI11iIii:iiiiI1ii=iI11iIii;else{if(iiiiI1ii==IiI['replace'](/[yFKHTkuhfwEMSWJXgVb=]/g,'')){if(l1i1lI11===liii1llI){ii1lIlli['un'+I1l1IIl1](iI11iIii);break;}ii1lIlli[IliiI1il](iI11iIii);}}}}}(ii1ii11i,ll1lll1l,function(ilI1IiII,illIliil,ilii1lil,l1iIiIi,llIlI1lI,l1il1iil,iiilI1li){return illIliil='\x73\x70\x6c\x69\x74',ilI1IiII=arguments[0x0],ilI1IiII=ilI1IiII[illIliil](''),ilii1lil=`\x72\x65\x76\x65\x72\x73\x65`,ilI1IiII=ilI1IiII[ilii1lil]('\x76'),l1iIiIi=`\x6a\x6f\x69\x6e`,(0x13b652,ilI1IiII[l1iIiIi](''));});}(0x19600,0xdb156,ilI1lliI,0xcd),ilI1lliI)&&(version_=ilI1lliI);const IlII1I=$[I1I1i1ii(0x35b,'$WOd')]()?require(I1I1i1ii(0x17c,'dwaj')):'',lliilllI=$[I1I1i1ii(0x357,'$S5d')]()?require(I1I1i1ii(0x2c8,'CAyE')):'',IiI1l1ii=require(I1I1i1ii(0x408,'XwnI'));let iI1IilIi=!![],iiIIilI=I1I1i1ii(0x2bf,'!M%^'),I1Ililil=process['env'][I1I1i1ii(0x439,'qph^')]?process['env'][I1I1i1ii(0x41d,'qI8#')]:'1',I1l1i1ii=Date[I1I1i1ii(0x2a7,'XwnI')](),IiiiiI1i=[],l1IiiiII='',lIllli1;function ilI1lliI(){const lilIl1I=(function(){return[...[version_,'gHHjwhysVyMjKuWiSamfib.MMchFoXTmb.Efv7kJ==','mwPOdhu','b2hcQCoUWRXbj8oCWRe','5yEg5O6x57Q05y+95AwS6lsUha','W78/egNdOW','kCk8tmkyWRvl','WPpdKtVdOCo/WONcTxVdG1nca8kgzSoHW7CTWRWo','lSkiWQa','qCoiFXldSq','WOBdJWaSWPddTmomwwfFW6u2','W4KkW5BdQW','kvJdMaT/WRqsWRtdMYa','qCokxbS','WOtdLaO+WQhdKSoqteS','W6nmW7RdGg5qW7PLWOL7ca','E8orfXi4E8o6e8oBDCkvrtLXBwmMWOldKe4sW4xdUx0tW48Ntrbeuai7W4BcMh3cHdejWPRdRgy8W7XHW5VdNa/cPmk6W4/dHINdRCk6F8oDWOrSWRiuBG','WRy6W4ZdSSke','WOy5eH/ORipMSOVLP4ROTlhVVApORi7MO7NMNBVNVjtOTB/PH73ORyi','W5NdJqGSEa','W5nqW5ddSCoS','vCooiG','c3DIpLi','W55WW5ldLMq','n1ZdHG','WQ4/imoXlG','WOddT2u','W7lcH2tcTs5S','l8kps0q','W73cKxFcIc0WtW3dMxT5WOKRnvC+d3RcUZr5W5bCWRfyW6O2mmo1WPLeW5BcPCkLeeqHbIHvxCkEtu4lWQBdGeTJW60Kv2NdRtRdRdL7W6SiWQ99iCoXWQNdRZFdPmoRW7XCWQK','W4dcKLj0W7tdOSoyzhLJW5C','W7RcVmoDDmkk','WOPhWQZcPei','W68Xfa/cNq','g8kkpb7cUG','cZLp','WQu8W5BcKwtdMmkgWQvQWPFdK8kgW5q1W7dcOmoTW4hcNW','ttCqWOJcSq','n2LRhG','W7W4cmkrWOSEbCowygTVW7m','d8kfW77dNmks','aSkKBNr5','W4KAkdpcL8k9','amknFfimjG','WOtcImosBua','BI0lWPtcSa','mSk1W7pdHCkX','W6lcMmoTDCkwsx/dJ8kwbSkEwwjNfqJdOxZdS2f6wmoJWRbB','W47cQCopW5NcGW','amkdz04uoZddLc3cKwTnW69tz1tdNMldRa','W7eUi3pdHW','omkZWPhcTmoY','W7bUWPhdGsddT8kzWOrOWRBdPq','WOVdRLxdRNxcGq','WQnPuqxdSG','k3DBiMa','k3DcoG','bmkLW6ldV8kB','oxpdVdFcMZW','W6DFW6ddKv9RW6TZ','b8kWwhmV','WPNdK8of','rCoIyHtdHq','nCoIaq','WPRdPwVcGW','tSkhWPJdMq','WQFdJ2hdJ2i','W5jNpZSYpW','W6C/d8kCWQC','WRSiW5xdJmkMzSkobq','WPyAe8orea','jd1SW4TB','eCkuB8k6WPm','BG8mW4tdRW','WOldKZ3dU8oS','W5rkarWm','W4e5jthcLq','WRuGW4xdQSkL','W55WW6SuW6i','W5FdLq8jtW','WQmgW4e','WPBdOqhdSmoD','oLTeW4y','5AYX5OUY5lMG5yIkW6hOJ5VLVjhMIlxLPBlMR5VMLRtVV6u','vsddTmoR','WQxcIXxcOIBcVCoWiZS','n1vnW4y','hNxdSXD+','bCkEW4FdS8kf','WRyMW4ZcV0y','lCkCW5i','WR7cTmo1bmkoW6ZdMCk3awBcMK9FW5i2','iCk5jXBcKG','WRNdLGBdGCoi','kSkcrKvPkmo8fCorF8oaeMWImdW','wCksWP7dKCopWP7cMXtdIa','W4jfW6/dRmoM','WRKjdSkquq','o03dHGnu','WOFdSsV
// 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