2023-08-14 17:20:29 +08:00
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
脚本默认会帮我助力开工位,介意请添加变量HELP_JOYPARK,false为不助力
|
|
|
|
|
export HELP_JOYPARK=""
|
|
|
|
|
|
|
|
|
|
运行频繁会403,请自行定时运行
|
|
|
|
|
|
|
|
|
|
============Quantumultx===============
|
|
|
|
|
[task_local]
|
|
|
|
|
#特价版-牛牛乐园助力
|
|
|
|
|
1 1 1 1 * jd_tj_nnly_help.js, tag=特价版-牛牛乐园助力, enabled=true
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
const $ = new Env('特价版-牛牛乐园助力');
|
2023-11-08 22:23:15 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const ll11I1=iii1II;(function(iillIi,iii11,iliI1,i11iI,lIiII,l1lii1,ii1i1i){return iillIi=iillIi>>0x3,l1lii1='hs',ii1i1i='hs',function(IiIi11,ii1i1l,iillII,Illli,i11il){const Il1l=iii1II;Illli='tfi',l1lii1=Illli+l1lii1,i11il='up',ii1i1i+=i11il,l1lii1=iillII(l1lii1),ii1i1i=iillII(ii1i1i),iillII=0x0;const ilI1I1=IiIi11();while(!![]&&--i11iI+ii1i1l){try{Illli=parseInt(Il1l(0x2bb,'EtRW'))/0x1+-parseInt(Il1l(0x281,'sxpE'))/0x2+-parseInt(Il1l(0x1b6,'aMLE'))/0x3*(parseInt(Il1l(0x2e7,'kC*V'))/0x4)+parseInt(Il1l(0x1e3,'BQPf'))/0x5*(parseInt(Il1l(0x336,'x0Vh'))/0x6)+-parseInt(Il1l(0x18a,'NSFR'))/0x7+parseInt(Il1l(0x277,'J2y7'))/0x8+parseInt(Il1l(0x2f8,'x0Vh'))/0x9;}catch(liIlIi){Illli=iillII;}finally{i11il=ilI1I1[l1lii1]();if(iillIi<=i11iI)iillII?lIiII?Illli=i11il:lIiII=i11il:iillII=i11il;else{if(iillII==lIiII['replace'](/[KuJwgTNeqkUfXbnIGFpVQ=]/g,'')){if(Illli===ii1i1l){ilI1I1['un'+l1lii1](i11il);break;}ilI1I1[ii1i1i](i11il);}}}}}(iliI1,iii11,function(liIlIl,I1lI1l,i11ii,lIiIi,Il1i,lIiIl,iiil1l){return I1lI1l='\x73\x70\x6c\x69\x74',liIlIl=arguments[0x0],liIlIl=liIlIl[I1lI1l](''),i11ii=`\x72\x65\x76\x65\x72\x73\x65`,liIlIl=liIlIl[i11ii]('\x76'),lIiIi=`\x6a\x6f\x69\x6e`,(0x146a1d,liIlIl[lIiIi](''));});}(0x660,0x28274,Iii11l,0xce),Iii11l)&&(version_=ll11I1(0x316,'iHsh'));function iii1II(_0xac762e,_0x2c47e9){const _0x41d9f6=Iii11l();return iii1II=function(_0x52abc3,_0xfd6f3e){_0x52abc3=_0x52abc3-0xae;let _0x33c91b=_0x41d9f6[_0x52abc3];if(iii1II['vuCLOs']===undefined){var _0x4ce8bd=function(_0x50f271){const _0x50c50f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x10086c='',_0x3035f3='';for(let _0x31fbe3=0x0,_0x3d67c8,_0x4dac01,_0x26e2b2=0x0;_0x4dac01=_0x50f271['charAt'](_0x26e2b2++);~_0x4dac01&&(_0x3d67c8=_0x31fbe3%0x4?_0x3d67c8*0x40+_0x4dac01:_0x4dac01,_0x31fbe3++%0x4)?_0x10086c+=String['fromCharCode'](0xff&_0x3d67c8>>(-0x2*_0x31fbe3&0x6)):0x0){_0x4dac01=_0x50c50f['indexOf'](_0x4dac01);}for(let _0x5cb25c=0x0,_0x52f17d=_0x10086c['length'];_0x5cb25c<_0x52f17d;_0x5cb25c++){_0x3035f3+='%'+('00'+_0x10086c['charCodeAt'](_0x5cb25c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3035f3);};const _0x41616a=function(_0x2640d0,_0x4fb118){let _0x1a4fe0=[],_0x2778a1=0x0,_0x211dab,_0x49b43f='';_0x2640d0=_0x4ce8bd(_0x2640d0);let _0x2385c8;for(_0x2385c8=0x0;_0x2385c8<0x100;_0x2385c8++){_0x1a4fe0[_0x2385c8]=_0x2385c8;}for(_0x2385c8=0x0;_0x2385c8<0x100;_0x2385c8++){_0x2778a1=(_0x2778a1+_0x1a4fe0[_0x2385c8]+_0x4fb118['charCodeAt'](_0x2385c8%_0x4fb118['length']))%0x100,_0x211dab=_0x1a4fe0[_0x2385c8],_0x1a4fe0[_0x2385c8]=_0x1a4fe0[_0x2778a1],_0x1a4fe0[_0x2778a1]=_0x211dab;}_0x2385c8=0x0,_0x2778a1=0x0;for(let _0x5c73a4=0x0;_0x5c73a4<_0x2640d0['length'];_0x5c73a4++){_0x2385c8=(_0x2385c8+0x1)%0x100,_0x2778a1=(_0x2778a1+_0x1a4fe0[_0x2385c8])%0x100,_0x211dab=_0x1a4fe0[_0x2385c8],_0x1a4fe0[_0x2385c8]=_0x1a4fe0[_0x2778a1],_0x1a4fe0[_0x2778a1]=_0x211dab,_0x49b43f+=String['fromCharCode'](_0x2640d0['charCodeAt'](_0x5c73a4)^_0x1a4fe0[(_0x1a4fe0[_0x2385c8]+_0x1a4fe0[_0x2778a1])%0x100]);}return _0x49b43f;};iii1II['qOAQwb']=_0x41616a,_0xac762e=arguments,iii1II['vuCLOs']=!![];}const _0x4baf3e=_0x41d9f6[0x0],_0x25b70e=_0x52abc3+_0x4baf3e,_0x3bf413=_0xac762e[_0x25b70e];return!_0x3bf413?(iii1II['ZAWhtc']===undefined&&(iii1II['ZAWhtc']=!![]),_0x33c91b=iii1II['qOAQwb'](_0x33c91b,_0xfd6f3e),_0xac762e[_0x25b70e]=_0x33c91b):_0x33c91b=_0x3bf413,_0x33c91b;},iii1II(_0xac762e,_0x2c47e9);}const l1iIi1=$[ll11I1(0x267,'hnCA')]()?require(ll11I1(0xff,'QvZk')):'',i1I1I=$[ll11I1(0x22c,'HM^O')]()?require(ll11I1(0x19b,'#8rO')):'',llIil=require(ll11I1(0x2e6,'kC*V')),llIii=require('./function/jdCommon'),IIiiI1=require(ll11I1(0x2f5,'F&]w'));let IIIIi1=[],ii1IIl='';if($[ll11I1(0x16c,'varU')]()){Object[ll11I1(0x123,'uhs#')](l1iIi1)[ll11I1(0x111,'FKD0')](i11iI1=>{const Illll=ll11I1;IIIIi1[Illll(0x175,'khpy')](l1iIi1[i11iI1]);});if(process['env']['JD_DEBUG']&&process['env'][ll11I1(0x296,'sxpE')]===ll11I1(0x247,'J2y7'))console[ll11I1(0x2fb,'^xbt')]=()=>{};}else IIIIi1=[$[ll11I1(0x30b,'Xy46')](ll11I1(0x29b,'*fIf')),$[ll11I1
|
2023-08-14 17:20:29 +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
|