mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
16 lines
74 KiB
JavaScript
16 lines
74 KiB
JavaScript
|
/*
|
|||
|
特价版-摇钱树
|
|||
|
|
|||
|
环境变量设置:
|
|||
|
jd_tj_yqs_txcash: 是否提现,默认不提现
|
|||
|
|
|||
|
本地网络环境运行,云服务器环境都是0.01红包
|
|||
|
|
|||
|
cron "27 4,16 * * *" script-path=jd_tj_yqs.js, tag=特价版-摇钱树
|
|||
|
|
|||
|
*/
|
|||
|
const $ = new Env('特价版-摇钱树')
|
|||
|
var iil='jsjiami.com.v7';const llII1l=iii1II;if(function(I1I1I1,IIIlil,Ili111,Il11,iiil11,llII1I,ilI1II){return I1I1I1=I1I1I1>>0x9,llII1I='hs',ilI1II='hs',function(iillI1,i11l1,IlllI,iliIl,ii1i11){const IiIi1i=iii1II;iliIl='tfi',llII1I=iliIl+llII1I,ii1i11='up',ilI1II+=ii1i11,llII1I=IlllI(llII1I),ilI1II=IlllI(ilI1II),IlllI=0x0;const ll11II=iillI1();while(!![]&&--Il11+i11l1){try{iliIl=parseInt(IiIi1i(0x2bc,'c1Zm'))/0x1*(parseInt(IiIi1i(0x356,'%VUZ'))/0x2)+-parseInt(IiIi1i(0x370,'1%J6'))/0x3*(parseInt(IiIi1i(0x2dd,'k7Yg'))/0x4)+-parseInt(IiIi1i(0x102,'%VUZ'))/0x5+parseInt(IiIi1i(0x38c,'N)uk'))/0x6*(parseInt(IiIi1i(0x1ed,'l(ce'))/0x7)+-parseInt(IiIi1i(0xdb,'g55m'))/0x8*(-parseInt(IiIi1i(0xb3,'sjYe'))/0x9)+parseInt(IiIi1i(0x210,'l(ce'))/0xa+-parseInt(IiIi1i(0x2b3,'6eEG'))/0xb*(parseInt(IiIi1i(0xed,'M$4X'))/0xc);}catch(liIlII){iliIl=IlllI;}finally{ii1i11=ll11II[llII1I]();if(I1I1I1<=Il11)IlllI?iiil11?iliIl=ii1i11:iiil11=ii1i11:IlllI=ii1i11;else{if(IlllI==iiil11['replace'](/[uGXHlEgDwyKQSLYWMnVOr=]/g,'')){if(iliIl===i11l1){ll11II['un'+llII1I](ii1i11);break;}ll11II[ilI1II](ii1i11);}}}}}(Ili111,IIIlil,function(Il1I,iii1i,iii1l,iliIi,iiil1I,llII11,lIiI1){return iii1i='\x73\x70\x6c\x69\x74',Il1I=arguments[0x0],Il1I=Il1I[iii1i](''),iii1l=`\x72\x65\x76\x65\x72\x73\x65`,Il1I=Il1I[iii1l]('\x76'),iliIi=`\x6a\x6f\x69\x6e`,(0x16d669,Il1I[iliIi](''));});}(0x19400,0xd6137,Iii11l,0xcc),Iii11l){}const notify=$[llII1l(0x111,'b8s%')]()?require(llII1l(0x32c,'1Irx')):'',jdCookieNode=$[llII1l(0xf1,'fuEo')]()?require('./jdCookie.js'):'',{H5st}=require(llII1l(0x11b,'1Irx')),common=require(llII1l(0x13d,'cNz#'));let linkId=llII1l(0x336,'dDCr'),txnum=process[llII1l(0x1e2,'b]H3')]['jd_tj_yqs_num']?process[llII1l(0x219,'1%J6')][llII1l(0xba,'#SqO')]:'1';const txcash=process[llII1l(0xe7,'Zgw4')][llII1l(0x202,'gN[4')]==='true';let time=Date[llII1l(0x205,'cNz#')](),apCashWithDrawList=[],cookiesArr=[],cookie='',message;if($['isNode']()){Object[llII1l(0x128,'Hzim')](jdCookieNode)[llII1l(0x261,'AAz[')](lil11=>{cookiesArr['push'](jdCookieNode[lil11]);});if(process['env']['JD_DEBUG']&&process['env'][llII1l(0x170,'&ZPE')]===llII1l(0x2e0,'d1Ou'))console[llII1l(0x38e,'3a3r')]=()=>{};}else cookiesArr=[$[llII1l(0x13c,'eCF9')](llII1l(0x188,'d1Ou')),$[llII1l(0x127,'@aAC')](llII1l(0x1d7,'l[4Z')),...jsonParse($['getdata'](llII1l(0x269,'P]lC'))||'[]')['map'](Iillll=>Iillll['cookie'])]['filter'](lllI1=>!!lllI1);!(async()=>{const iil11l=llII1l,III11I={'teXfu':'string','IBbLv':iil11l(0x123,'&CSo'),'CbhfS':function(Ilii1,ll11i1){return Ilii1===ll11i1;},'tScry':iil11l(0x1ef,'[1lD'),'IujNU':iil11l(0x9e,'3a3r'),'elrim':iil11l(0x293,'1RJK'),'GrpOF':function(ili1I1,Iill){return ili1I1<Iill;},'qIqtX':function(ili1II,liIllI){return ili1II!==liIllI;},'UPPZi':function(ll11i){return ll11i();},'sZDQb':function(iI1lI1,I1I1li){return iI1lI1+I1I1li;},'QavQT':function(l1i11,IlI1li){return l1i11+IlI1li;},'sdsPK':function(IlI1ll,ll11l){return IlI1ll*ll11l;},'NQdDj':function(III111,liIll1,l1llli){return III111(liIll1,l1llli);},'LEQGq':function(iI1lII,ll11iI){return iI1lII+ll11iI;}};if(!cookiesArr[0x0]){if(III11I[iil11l(0x1c7,'&CSo')](III11I[iil11l(0x1ad,'M$4X')],iil11l(0x1f9,'YaUE')))IIlli[iil11l(0x150,'sjYe')](l1iil);else{$[iil11l(0x28d,'*T!A')]($[iil11l(0x330,'1Irx')],III11I[iil11l(0x145,'g55m')],iil11l(0x31f,'M$4X'),{'open-url':III11I[iil11l(0x1a2,'1%J6')]});return;}}for(let l1llll=0x0;III11I[iil11l(0xe6,'l[4Z')](l1llll,cookiesArr[iil11l(0x313,'[rX5')]);l1llll++){if(cookiesArr[l1llll]){if(III11I[iil11l(0x15f,'c1Zm')](iil11l(0x164,'M$4X'),iil11l(0x133,'&ZPE'))){cookie=cookiesArr[l1llll],$['UserName']=decodeURIComponent(cookie[iil11l(0xfd,'tvQL')](/pt_pin=([^; ]+)(?=;?)/)&&cookie[iil11l(0x34b,'#SqO')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$[iil11l(0x251,'8IM*')]=l1llll+0x1,$['isLogin']=!![],$['nickName']='',message='',console[iil11l(0xea,'@aAC')](iil11l(0x29f,'&NqQ')+$[iil11l(0x369,'rE9&')]+'】'+($[iil11l(0x36b,'AAz[')]||$[iil11l(0x2d7,'T&K@')])+iil11l(0xd6,'l[4Z'));if(!$[iil11l(0x2ea,'rAH#')]){$[iil11l(0x33e,'@aAC')]($['name'],'【提示】cookie已失效',iil11l(0x2c1,'@aAC')+$[iil11l(0x37c,')!y
|
|||
|
// 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
|