mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
18 lines
66 KiB
JavaScript
18 lines
66 KiB
JavaScript
|
/*
|
|||
|
|
|||
|
脚本默认会帮我助力开工位,介意请添加变量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('特价版-牛牛乐园助力');
|
|||
|
var version_='jsjiami.com.v7';const ii1i=iii1II;(function(liIIii,Iii1lI,I1liii,liiiIi,l1I11I,I1liil,IliIi1){return liIIii=liIIii>>0x4,I1liil='hs',IliIi1='hs',function(Iii1ll,liiiIl,liIIiI,Iii1li,iIl1l){const l1IlII=iii1II;Iii1li='tfi',I1liil=Iii1li+I1liil,iIl1l='up',IliIi1+=iIl1l,I1liil=liIIiI(I1liil),IliIi1=liIIiI(IliIi1),liIIiI=0x0;const iIl1i=Iii1ll();while(!![]&&--liiiIi+liiiIl){try{Iii1li=-parseInt(l1IlII(0x2c7,'ejgn'))/0x1+-parseInt(l1IlII(0x310,'RhUy'))/0x2*(-parseInt(l1IlII(0x2ee,'0Nr('))/0x3)+parseInt(l1IlII(0x31f,'PyNE'))/0x4*(parseInt(l1IlII(0x251,'ihmf'))/0x5)+-parseInt(l1IlII(0x2dd,'BHz$'))/0x6+-parseInt(l1IlII(0x24b,'VG#S'))/0x7+-parseInt(l1IlII(0x205,'d!rR'))/0x8*(parseInt(l1IlII(0x307,'Arv!'))/0x9)+parseInt(l1IlII(0x45f,'p2n!'))/0xa*(parseInt(l1IlII(0x2c8,'d!rR'))/0xb);}catch(i11i1){Iii1li=liIIiI;}finally{iIl1l=iIl1i[I1liil]();if(liIIii<=liiiIi)liIIiI?l1I11I?Iii1li=iIl1l:l1I11I=iIl1l:liIIiI=iIl1l;else{if(liIIiI==l1I11I['replace'](/[wbeMGVkEdILulrpJFNA=]/g,'')){if(Iii1li===liiiIl){iIl1i['un'+I1liil](iIl1l);break;}iIl1i[IliIi1](iIl1l);}}}}}(I1liii,Iii1lI,function(liIIi1,I1liiI,l1I11l,iIliii,l1I11i,iIlii1,IIiil1){return I1liiI='\x73\x70\x6c\x69\x74',liIIi1=arguments[0x0],liIIi1=liIIi1[I1liiI](''),l1I11l='\x72\x65\x76\x65\x72\x73\x65',liIIi1=liIIi1[l1I11l]('\x76'),iIliii='\x6a\x6f\x69\x6e',(0x13b19b,liIIi1[iIliii](''));});}(0xcc0,0xc88da,Iii11l,0xce),Iii11l)&&(version_=Iii11l);const I1ll1l=$['isNode']()?require('./jdCookie.js'):'',I1ll1i=$[ii1i(0x2ab,'n(9#')]()?require(ii1i(0x1f7,'VG#S')):'',i11iII=require(ii1i(0x3d0,'DY6T')),lI1Ii1=require(ii1i(0x20d,'T^*1')),i1I11=require(ii1i(0x46f,'ym^%'));let I1I1i1=[],i1I1l='';if($[ii1i(0x2e9,'KBLt')]()){Object['keys'](I1ll1l)[ii1i(0x248,'&h3W')](IIIIii=>{I1I1i1['push'](I1ll1l[IIIIii]);});if(process[ii1i(0x269,'xAWy')][ii1i(0x290,'e9lk')]&&process[ii1i(0x3cd,'(b$Q')]['JD_DEBUG']==='false')console[ii1i(0x329,'lo5Z')]=()=>{};}else I1I1i1=[$['getdata'](ii1i(0x399,'vOl1')),$[ii1i(0x21d,'MNHj')](ii1i(0x342,'KBLt')),...ii1l11($['getdata']('CookiesJD')||'[]')['map'](liiill=>liiill['cookie'])]['filter'](IIIIil=>!!IIIIil);$[ii1i(0x1ed,'oqwe')]=[],$[ii1i(0x33c,'p2n!')]=['VxQJC6Sr0QZkcOHwxoTjrw',ii1i(0x3bd,'n(9#'),ii1i(0x28c,'ym^%'),ii1i(0x208,'du%%'),ii1i(0x483,'Pc$6'),'1S5w5yU9UZYDq76-t7SPlQ',ii1i(0x3b6,'OoXk'),'Zi6CMKqNUANQa1m3j3NulA',ii1i(0x2a8,'xAWy'),ii1i(0x337,'(b$Q'),ii1i(0x24c,'du%%')];let i1I1i=Date[ii1i(0x2ac,'#0U9')]();const IIiiII=ii1i(0x1fd,'#0U9');message='',!(async()=>{const ilIIl1=ii1i,lI1lIl={'gGbYK':function(liiili,I1ll11){return liiili(I1ll11);},'KmdkJ':ilIIl1(0x358,'alCI'),'haHNL':'这个B助力满了!','BMiwT':ilIIl1(0x23b,'&h3W'),'TPIao':function(lI1lIi,Iii1Ii){return lI1lIi(Iii1Ii);},'vXUmQ':ilIIl1(0x2ca,'BHz$'),'cdciT':'api.m.jd.com','jYCvU':'object','qeNDa':function(Iii1Il,i1l1I1){return Iii1Il+i1l1I1;},'WrVgG':ilIIl1(0x2df,'DY6T'),'BXhek':ilIIl1(0x390,'JxsG'),'dIlDn':function(lI1lI1,llIl1){return lI1lI1<llIl1;},'XoBqK':function(l1iIiI,illlli){return l1iIiI!==illlli;},'qbvtl':ilIIl1(0x3c6,'BHz$'),'ylqXn':function(illlll,IIIIiI){return illlll(IIIIiI);},'iZGwq':function(II1I1,i1i111){return II1I1+i1i111;},'tsPZP':ilIIl1(0x480,'rdWD'),'kKtlD':ilIIl1(0x249,'p2n!'),'eMinL':'haPuL','fVtgi':ilIIl1(0x318,'&h3W'),'bLhcz':ilIIl1(0x353,'IKsf'),'dtudp':function(ii1l1I,lI1lII){return ii1l1I==lI1lII;},'hFfrR':'false','dBHXa':ilIIl1(0x483,'Pc$6'),'EdKLj':ilIIl1(0x299,'0Nr('),'GPIqL':ilIIl1(0x27e,'pmoB'),'tLzbV':ilIIl1(0x312,'xEK7'),'cIFOG':ilIIl1(0x250,'Pc$6'),'Aqlku':ilIIl1(0x408,'T%qe'),'XJOyU':function(lIill1,iiI1i1){return lIill1*iiI1i1;},'dlutf':function(ilIlII,iIiil1,l1lI1i){return ilIlII(iIiil1,l1lI1i);},'qGbTH':function(l1lI1l,l1I1Il,l1I1Ii){return l1lI1l(l1I1Il,l1I1Ii);},'gGPzZ':function(IIlili,IIlill){return IIlili+IIlill;},'oAFDO':function(IllllI,liliil){return IllllI===liliil;},'DnuHO':function(I1iil1){return I1iil1();},'SipYe':function(lIillI,lI1il1,liliii){return lIillI(lI1il1,liliii);},'ABaLh':function(iIiilI,iIiiil){return iIiilI+iIiiil;},'IPlmJ':'服务端异常,尝试手动进入活动,入口:特价版-我的-汪汪乐园','ShjUD':function(iIi
|
|||
|
// 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
|