mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
18 lines
67 KiB
JavaScript
18 lines
67 KiB
JavaScript
|
/*
|
|||
|
|
|||
|
脚本默认会帮我助力开工位,介意请添加变量HELP_JOYPARK,false为不助力
|
|||
|
export HELP_JOYPARK=""
|
|||
|
|
|||
|
运行频繁会403,请自行定时运行
|
|||
|
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#京东版-汪汪庄园助力
|
|||
|
1 1 1 1 * jd_wwzy_help.js, tag=京东版-汪汪庄园助力, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
const $ = new Env('京东版-汪汪庄园助力');
|
|||
|
var version_='jsjiami.com.v7';const iIliiI=iii1II;(function(iIl1i,i11i1,liIIi1,I1liiI,l1I11l,iIliii,l1I11i){return iIl1i=iIl1i>>0x9,iIliii='hs',l1I11i='hs',function(iIlii1,IIiil1,l1IlII,ii1i,ilIIl1){const liIIl1=iii1II;ii1i='tfi',iIliii=ii1i+iIliii,ilIIl1='up',l1I11i+=ilIIl1,iIliii=l1IlII(iIliii),l1I11i=l1IlII(l1I11i),l1IlII=0x0;const ii1l=iIlii1();while(!![]&&--I1liiI+IIiil1){try{ii1i=parseInt(liIIl1(0x2d5,'#Pg['))/0x1+parseInt(liIIl1(0x1d1,'aYlS'))/0x2+-parseInt(liIIl1(0x2d9,'9(!e'))/0x3*(parseInt(liIIl1(0x3f3,'c%qX'))/0x4)+-parseInt(liIIl1(0x2ff,'oYTh'))/0x5+parseInt(liIIl1(0x32a,'c0W2'))/0x6*(parseInt(liIIl1(0x2ab,'x8qi'))/0x7)+-parseInt(liIIl1(0x1db,'agri'))/0x8*(parseInt(liIIl1(0x1ca,'KKRU'))/0x9)+parseInt(liIIl1(0x3c8,'9(!e'))/0xa;}catch(iIl1I){ii1i=l1IlII;}finally{ilIIl1=ii1l[iIliii]();if(iIl1i<=I1liiI)l1IlII?l1I11l?ii1i=ilIIl1:l1I11l=ilIIl1:l1IlII=ilIIl1;else{if(l1IlII==l1I11l['replace'](/[SfTxFVuIkAMDhrGBpWNY=]/g,'')){if(ii1i===IIiil1){ii1l['un'+iIliii](ilIIl1);break;}ii1l[l1I11i](ilIIl1);}}}}}(liIIi1,i11i1,function(liIi,liIIlI,IliIil,iliiIi,i11Ill,iliiIl,IliIii){return liIIlI='\x73\x70\x6c\x69\x74',liIi=arguments[0x0],liIi=liIi[liIIlI](''),IliIil='\x72\x65\x76\x65\x72\x73\x65',liIi=liIi[IliIil]('\x76'),iliiIi='\x6a\x6f\x69\x6e',(0x13b19a,liIi[iliiIi](''));});}(0x18a00,0x71bf3,Iii11l,0xc7),Iii11l)&&(version_=Iii11l);function iii1II(_0x155264,_0x4000a4){const _0x42bdc5=Iii11l();return iii1II=function(_0x98f44d,_0x4a7ead){_0x98f44d=_0x98f44d-0x193;let _0x5707eb=_0x42bdc5[_0x98f44d];if(iii1II['YdiAds']===undefined){var _0x1cee08=function(_0x7bbd6a){const _0x4dc77d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x37dada='',_0x570f8e='';for(let _0x58c32f=0x0,_0x324910,_0x540192,_0x3f29fc=0x0;_0x540192=_0x7bbd6a['charAt'](_0x3f29fc++);~_0x540192&&(_0x324910=_0x58c32f%0x4?_0x324910*0x40+_0x540192:_0x540192,_0x58c32f++%0x4)?_0x37dada+=String['fromCharCode'](0xff&_0x324910>>(-0x2*_0x58c32f&0x6)):0x0){_0x540192=_0x4dc77d['indexOf'](_0x540192);}for(let _0x1bdaad=0x0,_0x50862d=_0x37dada['length'];_0x1bdaad<_0x50862d;_0x1bdaad++){_0x570f8e+='%'+('00'+_0x37dada['charCodeAt'](_0x1bdaad)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x570f8e);};const _0x426fe3=function(_0x58cef7,_0x31f517){let _0x3ab713=[],_0x4ba061=0x0,_0x43ddba,_0x32572f='';_0x58cef7=_0x1cee08(_0x58cef7);let _0x117f1b;for(_0x117f1b=0x0;_0x117f1b<0x100;_0x117f1b++){_0x3ab713[_0x117f1b]=_0x117f1b;}for(_0x117f1b=0x0;_0x117f1b<0x100;_0x117f1b++){_0x4ba061=(_0x4ba061+_0x3ab713[_0x117f1b]+_0x31f517['charCodeAt'](_0x117f1b%_0x31f517['length']))%0x100,_0x43ddba=_0x3ab713[_0x117f1b],_0x3ab713[_0x117f1b]=_0x3ab713[_0x4ba061],_0x3ab713[_0x4ba061]=_0x43ddba;}_0x117f1b=0x0,_0x4ba061=0x0;for(let _0x43838f=0x0;_0x43838f<_0x58cef7['length'];_0x43838f++){_0x117f1b=(_0x117f1b+0x1)%0x100,_0x4ba061=(_0x4ba061+_0x3ab713[_0x117f1b])%0x100,_0x43ddba=_0x3ab713[_0x117f1b],_0x3ab713[_0x117f1b]=_0x3ab713[_0x4ba061],_0x3ab713[_0x4ba061]=_0x43ddba,_0x32572f+=String['fromCharCode'](_0x58cef7['charCodeAt'](_0x43838f)^_0x3ab713[(_0x3ab713[_0x117f1b]+_0x3ab713[_0x4ba061])%0x100]);}return _0x32572f;};iii1II['bTjHUd']=_0x426fe3,_0x155264=arguments,iii1II['YdiAds']=!![];}const _0x2bad7a=_0x42bdc5[0x0],_0x1a1399=_0x98f44d+_0x2bad7a,_0x45a2f8=_0x155264[_0x1a1399];return!_0x45a2f8?(iii1II['iBIlrp']===undefined&&(iii1II['iBIlrp']=!![]),_0x5707eb=iii1II['bTjHUd'](_0x5707eb,_0x4a7ead),_0x155264[_0x1a1399]=_0x5707eb):_0x5707eb=_0x45a2f8,_0x5707eb;},iii1II(_0x155264,_0x4000a4);}function Iii11l(){const liIl=(function(){return[version_,'kjAhksjrixafGSmix.MNckoBmB.vYDW7IuFGFpTV==','WP/dNmkGWR7cHMxcUmkAALhcICkyqvW','WRuVxdy','WQuVwZWyuMldGmkuW5nCW70','W4iukmkTgW','WObWW7BdKt8F','WR7cKYlcUXO','WQihztqq','E+IVI+MfPoAxHUEBGow9LEIoSEwoM8ocW6ddQmk4fxC','W7/cI8kXWQVcGG','W4iLWRBcHf9azCozpXe','W6b+bMz/fG','qmoEW5VcVSk9','W7VdG3VcSCok','W73cO8kHgNS','5lIF5lI36lwY5y+D','aKJdMX/dLwDVk8oy','WQldRCk5WRhcNa','W67dI8kGFmoz','WQdcHSoEW6fJ','W7dcPSo8W5VOR7hMSQNLPPROTOlVVkBORPBMOyxMNAxNVzFOTzlPH5tORBi','y8oZWP3cJSoR','ECoxW4FdHSkl','pCksbwRcMwNdHtW','EMJcJ280','W5FcP8kUdMq','aCk2
|
|||
|
// 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
|