jdpro/jd_yqs.js

8 lines
138 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
特价版摇钱树
46 3,15 * * * jd_yqs.js
*/
const $ = new Env('摇钱树');
const bdy_0xc043c4=bdy_0x28cb;(function(_0x4ff208,_0x1608d2){const bdy_0x394fbf={_0x5d30e5:'0x3c9',_0x568e94:'JLOA',_0x18e1ab:'0x2b9',_0x375421:'N]W3',_0x4f3204:'0x357',_0xebec26:')gp^',_0x41738a:'0x3a5',_0x2e5508:'v((P',_0x2313b2:'0x257',_0x510128:'iNP1',_0x45887c:'0x3b6',_0x1ad676:'dzQq',_0x27961:'0x45a',_0x2f9575:'mpDY',_0x517c38:'0x1b3',_0x233eea:'tdyZ',_0x3cddf9:'0x25e',_0x1d6a64:'G42j'},_0xb5fea9=bdy_0x28cb,_0x30df57=_0x4ff208();while(!![]){try{const _0x28b7c2=-parseInt(_0xb5fea9(bdy_0x394fbf._0x5d30e5,bdy_0x394fbf._0x568e94))/(0x158f*0x1+0xa28+0x29*-0xc6)+parseInt(_0xb5fea9(bdy_0x394fbf._0x18e1ab,bdy_0x394fbf._0x375421))/(-0x26fd+-0x194b+-0x2*-0x2025)*(-parseInt(_0xb5fea9(bdy_0x394fbf._0x4f3204,bdy_0x394fbf._0xebec26))/(0x4eb+-0x16bb+0x11d3))+parseInt(_0xb5fea9(bdy_0x394fbf._0x41738a,bdy_0x394fbf._0x2e5508))/(-0x478+-0x14+0x2*0x248)+parseInt(_0xb5fea9(bdy_0x394fbf._0x2313b2,bdy_0x394fbf._0x510128))/(0xca*0x13+0xdb*-0x16+0x3d9)+-parseInt(_0xb5fea9(bdy_0x394fbf._0x45887c,bdy_0x394fbf._0x1ad676))/(-0x15b*0x6+0x531+0x1*0x2f7)*(parseInt(_0xb5fea9(bdy_0x394fbf._0x27961,bdy_0x394fbf._0x2f9575))/(0x5*0xa1+0x189f+-0x1bbd))+-parseInt(_0xb5fea9(bdy_0x394fbf._0x517c38,bdy_0x394fbf._0x233eea))/(0x84*-0x1+-0x1837+0x841*0x3)+parseInt(_0xb5fea9(bdy_0x394fbf._0x3cddf9,bdy_0x394fbf._0x1d6a64))/(0x125*0x7+-0x24e1+0x1ce7);if(_0x28b7c2===_0x1608d2)break;else _0x30df57['push'](_0x30df57['shift']());}catch(_0x553261){_0x30df57['push'](_0x30df57['shift']());}}}(bdy_0x3a7a,0x12*-0x143b+0x17d0c+0x17e04));const bdy_0xe41c8e=$[bdy_0xc043c4('0x302','ON]H')]()?require(bdy_0xc043c4('0x363','*R8o')):'',bdy_0x5410e1=$[bdy_0xc043c4('0x4b4','YjL4')]()?require(bdy_0xc043c4('0x267','2CHX')):'',bdy_0x99a83c=require(bdy_0xc043c4('0x25b','JC49')),bdy_0x305423=require(bdy_0xc043c4('0x491','cfnY'));let bdy_0x55e97d=[],bdy_0x167fd0='';const bdy_0x39f5fa=bdy_0xc043c4('0x2a2','CE8W');if($[bdy_0xc043c4('0x464','N]W3')]()){Object[bdy_0xc043c4('0x35d','iNP1')](bdy_0x5410e1)[bdy_0xc043c4('0x415','mpDY')](_0x25f50c=>{const bdy_0x2951ae={_0x51e264:'0x43c',_0x5d648d:'M5f6'},_0x1283c0=bdy_0xc043c4;bdy_0x55e97d[_0x1283c0(bdy_0x2951ae._0x51e264,bdy_0x2951ae._0x5d648d)](bdy_0x5410e1[_0x25f50c]);});if(process[bdy_0xc043c4('0x262','*R8o')][bdy_0xc043c4('0x39b','cfnY')]&&process[bdy_0xc043c4('0x385','I2B$')][bdy_0xc043c4('0x485','[M!T')]===bdy_0xc043c4('0x412','5j*!'))console[bdy_0xc043c4('0x274','*aKv')]=()=>{};}else bdy_0x55e97d=[$[bdy_0xc043c4('0x2b7','ZBjz')](bdy_0xc043c4('0x2e8','mpDY')),$[bdy_0xc043c4('0x1c1','mpDY')](bdy_0xc043c4('0x4a3','ZBjz')),...bdy_0x304bd6($[bdy_0xc043c4('0x36d','w#m@')](bdy_0xc043c4('0x25f','6LFc'))||'[]')[bdy_0xc043c4('0x203','n6IK')](_0x1056b3=>_0x1056b3[bdy_0xc043c4('0x3dd','6LFc')])][bdy_0xc043c4('0x2c9','zGk^')](_0x30873b=>!!_0x30873b);!(async()=>{const bdy_0x40e237={_0x31ef1c:'0x269',_0x5c4756:'fD94',_0x5c41a9:'0x494',_0x154de8:'fD94',_0x5a2f3f:'0x467',_0x24df10:'G42j',_0x4c2da3:'0x27c',_0x55b79c:'w#m@',_0x473be9:'0x49a',_0x1526f8:'M33d',_0x10f041:'0x49e',_0x148080:'*aKv',_0x6d2328:'0x343',_0x249476:'tdyZ',_0x3ebf24:'0x378',_0x5baffa:'dzQq',_0x5e3227:'0x1c6',_0x180ab0:'iNP1',_0x1ced05:'0x197',_0x9b8665:'tdyZ',_0x5583d6:'0x2ce',_0x2f3348:'JC49',_0x32b379:'0x230',_0x2660e0:'JLOA',_0x198749:'0x45e',_0x71b51e:'cfnY',_0x916ad0:'0x2ef',_0x47e543:'2CHX',_0x44a79f:'0x2f0',_0xbad30a:'YjL4',_0x5a6b2b:'0x39a',_0x310502:'0x439',_0x89ffd:'zGk^',_0x52777c:'0x44f',_0x38d9eb:'0x487',_0x1bcf3d:'JLOA',_0x47a80d:'0x243',_0x2c2068:'N]W3',_0x2d63ae:'0x19a',_0x275866:'M5f6',_0x535f54:'0x3a6',_0x1c19e8:'0x3fd',_0x3880c6:'!Cg$',_0x443baf:'0x41f',_0x363fd5:']kc$',_0x26db62:'0x24d',_0xe55514:'ZBjz',_0x559526:'0x18a',_0xd3ba06:'*aKv',_0x359944:'0x19d',_0x4e8104:'0x217',_0x17325b:'0x261',_0x210a9b:'2CHX',_0x58b9b8:'0x450',_0x5267a0:'slaq',_0x5e7a87:'0x289',_0x5a0334:'HObj',_0x43609f:'0x362',_0x467703:'w#m@',_0x55f23d:'0x420',_0x4cd3bc:'P*ei',_0x16b674:'0x2cf',_0x206143:')cD7',_0x44edc3:'0x25c',_0x57d2a4:'JC49',_0x434060:'0x308',_0x3d218a:'0x253',_0x132e03:')gp^',_0x8e9d4c:'0x1ea',_0x25a56d:'0x301',_0x1fdfcd:'0x296',_0x46ae11:'jQ)o',_0x2d0ab7:'0x32f',_0x27dbd5:'w
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