mirror of https://github.com/6dylan6/jdpro.git
9 lines
106 KiB
JavaScript
9 lines
106 KiB
JavaScript
|
/*
|
|||
|
汪汪庄园
|
|||
|
入口:京东app-我的-汪汪庄园
|
|||
|
7 7 7 7 * https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_wwmanor_merge.js
|
|||
|
6dy 2024/5/15
|
|||
|
*/
|
|||
|
const $ = new Env('汪汪庄园合成');
|
|||
|
const bdy_0x42fb2b=bdy_0x85ba;(function(_0x334a91,_0x413027){const bdy_0x33f156={_0x11d052:'0x311',_0x1b6475:'ooiN',_0x77a2f4:'0x347',_0x4273c4:'9bY9',_0xe2d957:'0x3e6',_0x434dbc:'@C@(',_0x3ccbdf:'0x270',_0x47c5f1:'ZAZu',_0x2d9335:'0x397',_0x977ecc:'0Ywi',_0x31569b:'0x185',_0x179826:'iB9o',_0x580433:'0x305',_0x2f9a57:'0x231',_0x482f13:'gf*y',_0x23e73b:'0x209',_0x2e2e06:'MMmf'},_0xfb727c=bdy_0x85ba,_0x71a29e=_0x334a91();while(!![]){try{const _0x599440=parseInt(_0xfb727c(bdy_0x33f156._0x11d052,bdy_0x33f156._0x1b6475))/(-0xa9c+0x1ec1+0x1424*-0x1)+parseInt(_0xfb727c(bdy_0x33f156._0x77a2f4,bdy_0x33f156._0x4273c4))/(0x35*-0x9b+0x16ad+0x86*0x12)*(parseInt(_0xfb727c(bdy_0x33f156._0xe2d957,bdy_0x33f156._0x434dbc))/(-0x1*0x22f1+-0x19d5+0x6c1*0x9))+-parseInt(_0xfb727c(bdy_0x33f156._0x3ccbdf,bdy_0x33f156._0x47c5f1))/(0x1ddc+-0x91*0x9+-0x18bf)+parseInt(_0xfb727c(bdy_0x33f156._0x2d9335,bdy_0x33f156._0x977ecc))/(0x1c*-0xbc+0xf44+-0x551*-0x1)+parseInt(_0xfb727c(bdy_0x33f156._0x31569b,bdy_0x33f156._0x179826))/(0x319*0x1+0x4*-0x4d7+0x17b*0xb)*(parseInt(_0xfb727c(bdy_0x33f156._0x580433,bdy_0x33f156._0x434dbc))/(-0x533+-0x57c+-0x1c9*-0x6))+-parseInt(_0xfb727c(bdy_0x33f156._0x2f9a57,bdy_0x33f156._0x482f13))/(0xdad+0x652+-0x13f7)+-parseInt(_0xfb727c(bdy_0x33f156._0x23e73b,bdy_0x33f156._0x2e2e06))/(-0x1d08*0x1+-0x1*0x422+0x2133*0x1);if(_0x599440===_0x413027)break;else _0x71a29e['push'](_0x71a29e['shift']());}catch(_0x135f30){_0x71a29e['push'](_0x71a29e['shift']());}}}(bdy_0xbac4,0x5448+-0x3feaf+0x113523));const bdy_0x2cad47=$[bdy_0x42fb2b('0x1d9','KOIk')]()?require(bdy_0x42fb2b('0x320','iB9o')):'',bdy_0x58737d=require(bdy_0x42fb2b('0x2fe','18D3')),bdy_0x1eda30=$[bdy_0x42fb2b('0x248','L#kd')]()?require(bdy_0x42fb2b('0x1d7','TJvd')):'';let bdy_0x5dc51e=[],bdy_0x21cd03='',bdy_0x407adf=![];if($[bdy_0x42fb2b('0x1f3','x$mH')]()){Object[bdy_0x42fb2b('0x1c5','iz*#')](bdy_0x2cad47)[bdy_0x42fb2b('0x2d1','KOIk')](_0x51b65f=>{const bdy_0x1ae4f5={_0x4fce31:'0x1cf',_0x1d7553:'nrzf'},_0x39f2e5=bdy_0x85ba;bdy_0x5dc51e[_0x39f2e5(bdy_0x1ae4f5._0x4fce31,bdy_0x1ae4f5._0x1d7553)](bdy_0x2cad47[_0x51b65f]);});if(process[bdy_0x42fb2b('0x350','p@QI')][bdy_0x42fb2b('0x20c','x$mH')]&&process[bdy_0x42fb2b('0x3a6','Txa2')][bdy_0x42fb2b('0x2f9','zFE5')]===bdy_0x42fb2b('0x262','nrzf'))console[bdy_0x42fb2b('0x35e','@C@(')]=()=>{};}else bdy_0x5dc51e=[$[bdy_0x42fb2b('0x31e','mAqn')](bdy_0x42fb2b('0x367','!4eq')),$[bdy_0x42fb2b('0x2b9','0Ywi')](bdy_0x42fb2b('0x188','ghP0')),...bdy_0x4e6284($[bdy_0x42fb2b('0x255','c%%N')](bdy_0x42fb2b('0x365',']xan'))||'[]')[bdy_0x42fb2b('0x39e','L(bt')](_0x5be737=>_0x5be737[bdy_0x42fb2b('0x2bb','L#kd')])][bdy_0x42fb2b('0x2c8',']xan')](_0x38ea37=>!!_0x38ea37);$[bdy_0x42fb2b('0x336','UFh!')]=0x263f*-0x1+0x14f*-0xb+0x34a4,message='',!(async()=>{const bdy_0xf47d52={_0x3eff05:'0x3a1',_0x257a4f:'Izmq',_0x649a5d:'0x227',_0x5489e5:'L(bt',_0x2b181f:'0x32f',_0x45d628:'iz*#',_0x3e6a09:'0x3a2',_0x8d76d1:'DtCX',_0xb9f70d:'0x1a6',_0x2a806f:'MMmf',_0x471720:'0x1c1',_0x2da4ac:'lM5i',_0x14fed4:'0x35e',_0x264ce0:'@C@(',_0x2a9c06:'0x360',_0x44e1f0:'#PbI',_0x35f307:'0x2a7',_0x1bc1ac:'UFh!',_0x3f3062:'0x28b',_0x5b4a5c:'([e5',_0x53a28e:'0x37b',_0x790e04:'F*z[',_0x112c28:'0x186',_0x4518b2:'#8Vr',_0x563a59:'0x1e8',_0x201c7c:'gf*y',_0x3f82fb:'0x3b1',_0x5b1add:'ooiN',_0x1646b4:'0x16c',_0x3d5d31:'TJvd',_0x3e35c7:'0x35a',_0x30472f:'!4eq',_0x368499:'0x387',_0x5b66a4:'18D3',_0x441ec2:'0x2f5',_0xa63c27:'@C@(',_0x5740e0:'0x3e1',_0x13e80d:'WizF',_0x44100f:'0x33d',_0x2f9a1f:'jY6h',_0x2b515c:'0x20a',_0x6beb56:'p5ke',_0x374b3d:'0x1dc',_0x52dc71:'l]NE',_0xccfa67:'0x309',_0xffd6fb:'0x288',_0x353c6e:'ieTj',_0x52e7a7:'0x3e5',_0xe8587c:'DtCX',_0x146997:'0x1f9',_0x48feb7:'ayhK',_0x3d5ea8:'0x3ab',_0x810bb6:'mgKh',_0x553d31:'0x16f',_0xa678ab:'0x32b',_0x4afea5:'%fRR',_0x2c420b:'0x3c7',_0x51a7fd:'U31U',_0x3124b0:'0x382',_0x5337b4:'T@)P',_0x2e8abb:'0x1e7',_0x24c886:'L#kd',_0x3c0751:'0x31a',_0x2e508a:'0x1d2',_0x49044b:'F*z[',_0x847e4a:'0x23e',_0x4d3cb5:'9bY9',_0x2cc11d:'0x3c1',_0x25e94e:'iz*#',_0x21349b:'0x28c',_0x3e6f01:'0x318',_0x5028e3:'0x204',_0x4c2eec:'#PbI',_0x29b4d6:'0x2c3',_0x44384f
|
|||
|
function Env(t, e) { 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.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) :
|