mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
22 lines
36 KiB
JavaScript
22 lines
36 KiB
JavaScript
|
/*
|
|||
|
#京东赚赚兑换
|
|||
|
|
|||
|
说明:每天只能兑换一次面额,每种面额每月仅可兑换一次。
|
|||
|
|
|||
|
比如:不足50,3月兑换面额10,面额5,面额2,4月兑换面额10,面额5,面额2。以此类推。
|
|||
|
|
|||
|
不清楚后续还有无库存,尽早兑换。
|
|||
|
|
|||
|
兑换的红包有效期 5 天
|
|||
|
|
|||
|
cron:11 11 11 11 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#京东赚赚兑换
|
|||
|
11 11 11 11 * jd_jdzz_dh.js, tag=京东赚赚兑换, enabled=true
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('京东赚赚兑换');
|
|||
|
var version_='jsjiami.com.v7';const D=b;(function(c,d,e,f,g,h,i){return c=c>>0x8,h='hs',i='hs',function(j,k,l,m,n){const C=b;m='tfi',h=m+h,n='up',i+=n,h=l(h),i=l(i),l=0x0;const o=j();while(!![]&&--f+k){try{m=-parseInt(C(0x351,'JxqZ'))/0x1*(-parseInt(C(0x164,'6fp)'))/0x2)+-parseInt(C(0x274,'rg3S'))/0x3+parseInt(C(0x287,'iecE'))/0x4*(parseInt(C(0x30a,'4lIA'))/0x5)+parseInt(C(0x24f,'!gyo'))/0x6+parseInt(C(0x2f6,')@JF'))/0x7*(parseInt(C(0x196,'!gyo'))/0x8)+-parseInt(C(0x1a2,'!gyo'))/0x9*(parseInt(C(0x1a3,'dW^5'))/0xa)+parseInt(C(0x2fc,'iecE'))/0xb*(-parseInt(C(0x1b9,'6fp)'))/0xc);}catch(p){m=l;}finally{n=o[h]();if(c<=f)l?g?m=n:g=n:l=n;else{if(l==g['replace'](/[VPgyrHAUNMITeKQdWRlO=]/g,'')){if(m===k){o['un'+h](n);break;}o[i](n);}}}}}(e,d,function(j,k,l,m,n,o,p){return k='\x73\x70\x6c\x69\x74',j=arguments[0x0],j=j[k](''),l=`\x72\x65\x76\x65\x72\x73\x65`,j=j[l]('\x76'),m=`\x6a\x6f\x69\x6e`,(0x123323,j[m](''));});}(0xc800,0x6eca3,a,0xca),a)&&(version_=a);const notify=$[D(0x19f,']idf')]()?require(D(0x344,'Yk6r')):'',jdCookieNode=$[D(0x29a,'OPo@')]()?require(D(0x2c4,'6fp)')):'';let cookiesArr=[],cookie='',message='',allMessage='';if($[D(0x248,'P[l6')]()){Object[D(0x21d,'OdyD')](jdCookieNode)[D(0x347,'@(n^')](c=>{const E=D;cookiesArr[E(0x1b7,'HeLb')](jdCookieNode[c]);});if(process[D(0x183,'(]9x')][D(0x246,'m#hT')]&&process[D(0x279,'O[xq')][D(0x278,'nRKh')]===D(0x26e,'AvFO'))console[D(0x1fc,'WM^w')]=()=>{};}else cookiesArr=[$[D(0x1ed,'pL9$')](D(0x1da,'5vy]')),$[D(0x1be,'^S(P')](D(0x1de,'cI%V')),...jsonParse($[D(0x254,')@JF')](D(0x2d8,'6fp)'))||'[]')[D(0x22d,'HeLb')](c=>c[D(0x30e,'(]9x')])][D(0x2bb,'0MZB')](c=>!!c);function b(c,d){const e=a();return b=function(f,g){f=f-0x15f;let h=e[f];if(b['AvHItp']===undefined){var i=function(n){const o='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let p='',q='';for(let r=0x0,s,t,u=0x0;t=n['charAt'](u++);~t&&(s=r%0x4?s*0x40+t:t,r++%0x4)?p+=String['fromCharCode'](0xff&s>>(-0x2*r&0x6)):0x0){t=o['indexOf'](t);}for(let v=0x0,w=p['length'];v<w;v++){q+='%'+('00'+p['charCodeAt'](v)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(q);};const m=function(n,o){let p=[],q=0x0,r,t='';n=i(n);let u;for(u=0x0;u<0x100;u++){p[u]=u;}for(u=0x0;u<0x100;u++){q=(q+p[u]+o['charCodeAt'](u%o['length']))%0x100,r=p[u],p[u]=p[q],p[q]=r;}u=0x0,q=0x0;for(let v=0x0;v<n['length'];v++){u=(u+0x1)%0x100,q=(q+p[u])%0x100,r=p[u],p[u]=p[q],p[q]=r,t+=String['fromCharCode'](n['charCodeAt'](v)^p[(p[u]+p[q])%0x100]);}return t;};b['SGRUUJ']=m,c=arguments,b['AvHItp']=!![];}const j=e[0x0],k=f+j,l=c[k];return!l?(b['pECfPs']===undefined&&(b['pECfPs']=!![]),h=b['SGRUUJ'](h,g),c[k]=h):h=l,h;},b(c,d);}const JD_API_HOST=D(0x2f0,'6fp)');let nowTimes=new Date(new Date()[D(0x231,'vB8G')]()+new Date()[D(0x27a,'HeLb')]()*0x3c*0x3e8+0x8*0x3c*0x3c*0x3e8);function a(){const a2=(function(){return[...[version_,'PNKjWTMsNHjUieQIamAi.ecIdoRgm.VOv7VyTglr==','f8kDWOFcHCoW','c0BdMMK7','i8oSWRP1W6C','vSkkwNXl','umkXAbu','W5qgWPFcJSka','WR7cLSocW5a','W4xdHmk6WOjk','wCkuFtPg','eNPgn3RcISoSW5TX','tr/cNCoTyq','WPJcO8oGW7JdSW','WRNdTtpdMfD2tmogo33dKq','y8kOW7hdKxzZqCojlWNcVsldQHJdQYmM','5lMw6kwe5z+RWQddTrldLmot5OIP5yQL5AwJ5yMb57k76ls+5l2Y5PE3W47cHSodChTJ','WOFcOWpcJmkK','WPZcKrdcJSkzxSkgW5lcRmkzWR4','W5eslCooW6lcVCoz','ccrfW6C/pa','WPpcIKbS6k6Y5RgD5Aso6lA777+d6k2c5Qcm5P6C57YF6lwQ6ywJ6k6m','W7pcHMNcVNNcVCkLxrldMCkDCSoYW6jdvHucobRcKH3cQCo9W6eYWPFdGmk9W6dcTW','je8cv13cKW','c2zlkgC','WRe5WQf6oKxcHCkgWPazjNi','WRRdSZldNvWGemoAngVdSu1o','vqFcQIddTCkmeaS','WQRcGSofW5K','FsVdJ8oBCHRdG0q','W4RdMCoVW43cImkEWRldVMlcGM0','5lIY5lQr5PYH5yM35zIa6k2p6zAi5Pww5O2/5lIW56Ix77+V6kYA5QgP5PYm6iwm6lU16k+R5AA5576h57Mx5Oop5yEm','W5hdLxKMwW','W5SjWP9KW4S','tmkcAwPF','W5ldSCo1WRxcKCoxhCoMt8oaW4VcUmkggCkpW4rHbSoHoSo0WPpcNd3cNJpcO8oQWQ1sW7TVmZqtWO7dIgJdICo0W4NdOwO5WPpdNr1pWQ9UWP1oq8oguCodBMbLEwvipSoqWOtcKLZcHH7cR8otz8kPix3cMmkgW4tdVmoeWPzNW6GVW7HWWRdcUqJdQLGOW6ldUIDXamkGoNxcGY/cO8oIW4tdJCkSfmoLcMtdPXKgk8owbCoYg3zKhCkjvvBdNSkJt03cOxTSW5RcJ8oidwBcLxOsW7ZdHLyGzYi2amo2qSoTfSkkW592W4xdNCobfN4','W68bWRJcOCkr','5lUv5lIo6lAy5y+T','ggldJNyvW6ivW5FdGW9On13cKra9','WPhMSkFMNyx
|
|||
|
// prettier-ignore
|
|||
|
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) :
|