mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
15 lines
30 KiB
JavaScript
15 lines
30 KiB
JavaScript
|
/*
|
|||
|
临期京豆续命
|
|||
|
|
|||
|
定时请自行修改,建议手动运行。
|
|||
|
请勿频繁跑动,容易风控。
|
|||
|
|
|||
|
cron:1 1 1 1 * jd_Advent_exchange.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('临期京豆续命')
|
|||
|
var iil='jsjiami.com.v7';const lllili=iii1II;(function(IlIII,ilil1l,illlIi,I1lIii,IiI1I,illlIl,i11ill){return IlIII=IlIII>>0x8,illlIl='hs',i11ill='hs',function(IIIIIi,IIIIIl,I1lIil,IIIl1i,liiII1){const I1lIiI=iii1II;IIIl1i='tfi',illlIl=IIIl1i+illlIl,liiII1='up',i11ill+=liiII1,illlIl=I1lIil(illlIl),i11ill=I1lIil(i11ill),I1lIil=0x0;const IIIl1l=IIIIIi();while(!![]&&--I1lIii+IIIIIl){try{IIIl1i=-parseInt(I1lIiI(0x1e7,'Sl8Q'))/0x1*(parseInt(I1lIiI(0x293,'LrYf'))/0x2)+parseInt(I1lIiI(0x256,'x5*0'))/0x3+-parseInt(I1lIiI(0x2b1,'P4GH'))/0x4+parseInt(I1lIiI(0x21b,'kukm'))/0x5*(-parseInt(I1lIiI(0x29d,'dPqP'))/0x6)+-parseInt(I1lIiI(0x2aa,'P4GH'))/0x7*(parseInt(I1lIiI(0x2c7,'LrYf'))/0x8)+-parseInt(I1lIiI(0x230,'kRns'))/0x9*(-parseInt(I1lIiI(0x2d9,'QjX$'))/0xa)+parseInt(I1lIiI(0x2c4,'Deqk'))/0xb*(parseInt(I1lIiI(0x1e6,'qdF^'))/0xc);}catch(lllll){IIIl1i=I1lIil;}finally{liiII1=IIIl1l[illlIl]();if(IlIII<=I1lIii)I1lIil?IiI1I?IIIl1i=liiII1:IiI1I=liiII1:I1lIil=liiII1;else{if(I1lIil==IiI1I['replace'](/[ntQYVuygArbDRSdepWFB=]/g,'')){if(IIIl1i===IIIIIl){IIIl1l['un'+illlIl](liiII1);break;}IIIl1l[i11ill](liiII1);}}}}}(illlIi,ilil1l,function(i11ili,iil1l1,lllli,iiili1,ill11i,lllill,ill11l){return iil1l1='\x73\x70\x6c\x69\x74',i11ili=arguments[0x0],i11ili=i11ili[iil1l1](''),lllli='\x72\x65\x76\x65\x72\x73\x65',i11ili=i11ili[lllli]('\x76'),iiili1='\x6a\x6f\x69\x6e',(0x16172e,i11ili[iiili1](''));});}(0xc900,0x48e03,Iii11l,0xcb),Iii11l)&&(iil=Iii11l);const jdCookie=require(lllili(0x229,'!hBa')),notify=require('./utils/Rebels_sendJDNotify'),common=require(lllili(0x21a,'^2P5')),isNotify=process['env'][lllili(0x2e4,']#ys')]===lllili(0x274,'nkq]');let cookie='';function Iii11l(){const IlIlll=(function(){return[iil,'QjsuynjVDiratemidD.YAcropmW.ygbv7dVFQBSR==','B8oqW4bVWPm','msFdJ1C','W4/cOYRdP3O','WRuWWQtdNW','pCoEWPi','nY7cGmk7','W5eed8o+ovDEW63cTgOohmo/','WRxcMJ7dO8kDW71Uoa','xCo+ymkxfq','WQL0CSkqW7CdE8ou','6BQ06k2G5QYr5Q+W5P675As85yAq5O+D','uM3dOaldRG','BarRzCkEjq7cLCo0p0W','W5VcJmolm8kytG','DfhcMCk4W4/dIW3dOmofiCosW5pdRq','b8ogWPzbW6W','emkRW7XTca','W6RcMKZcGxP4WPCuFMNdUwe','iCo+W6BdU8onW5e','a8kvwG','W7dcGmkxW4D6','EmoXWQ3cNCokW6RcOmkmWQKHpG','5lU46lcC5yAL5O+Z','5lQJ5lMw6loV5Bgw5z6EWRlLP7hLHjJOVAlMNj865y6t5OIh6kck5yw/5O6f','WO3dQq/dPIS','pmkCiLCqzCkc','W6pcK8ohn8o0W6dcUCoZW6b4zKesiW','DSkHWRJcVCkoWPBdK8oKga','WOjDwCk+yXi','EGHPzCkcjWxcLSoS','wSkIWRVcRmoLW5m6xZq1nvO','WQGcD0NcGezcW4v7m8o0qmoXWPpdOmkDW6mTExNcOCkhW510nHFcUZTWWQldTCoHbWHwW47dPKJdRq','W54xW6q4A8oBW5CunCoNWPa','xwVdSIBdRCoGySkcASopWR9ucG','AEweT+ApJq','CmkLWRhcQmkqWOFdM8kxALJdKsXV','aCkHWQ3cOSoAqCkK','W5WDdSo6W4ZdR3m','W5hcLmkwW6FcMa','W48TW5uRua','lW/dGCoPWR/cNvVdPSo2m8oWW5pdRCkQ','WRFdGrO','WRVORj3MSOpLP4lOT41K4P2cW70','s8klW4a','u8kwW4z6A2L5WOe','gCk7W4JdRCoOdmobWORdHw5p','tCkaW7HvFhL5WP3cOmoXWQD6WRHpt8kSbuRcMHLAzSoOgwK','W77cG8kVWQdcGq','b8kQogmL','dXVdLYldJW','WQ7dQSkvW4FcUhRdUeanW5pdSa','Emo7WQ/cM8okW4lcSCko','W63cUSkkW5pcU3tcJCoCWOBcOSkztCoGuq','ymkQW4PCqG','6BMr6k2E5Q2M5Q2X5P625AAF5yAj5O+/','WRhcKtNdTCkBW6HQ','W5CaW7m','W6/cK8kXWPy','WRyqW7a3kCk1W6dcQW','pZlcN8oAWP0','W7xcRSkvW4Dg','bq7cQmkBW7u','5B+O5yII56w75yMxiW','bLyBW4FdVCosz8oc','WOjEWQWKCCo2W4yaea','g8kLWRFcPq','a8o4W63dMSk0','W6VcVmkd','WOPRhSk2WRS','tSkkW5nXF319WP8','W6hcI8ochmod','xXmbW63dUCoyrG','WO4cW60Gh8k3W6xcR8kpW6dcRG','umo1CvaGWPSp','bSoLW60','f8o5CeSiWOCFW6xdMmkEW4ylxCoGrJldM8oY','nhOHbSkLiG','5l+N55Mx56sl5yQY5lU05AsoW53cGSoY77+l5lUG5OMl6kof5ywS5O+Y','h8o/W77dTmkW','W4JcPYBdTgaxWOtcIW','WR/dGrpdKa','FSoOW5C','W5hcHfFcN2bIW7RLVytLP5RJGkpKUklKUlhOT5ZLJz4','W4ZcVSkVdSkw','oCknjvqcomoiDWqHptXKW4yWESohWPP0xtjzW73dNCkCWOtdMX3cOWz6vSkqW7FdTaq+W4Xfg8otW5j4qCoRxCo8jmkwW43dKCkT','6zsX6k2MW4u','mxe7bmk2oghdUq','imkmn0O0','gmoJW6NdU8kWWPao','Fc8xW5/dJW'].concat((function(){return['W4tcVmkkW4dcNh/cMmkFWPBcVSkDsq','cXddVe/cPW','uCoXw2e3','o0TshWddLCktWOfqC10','W79Am8kbdSoPWPfmwq','CCoMW6j1WPpdJa4','bCkQWRRcTmod','8lkPImkm','gmoZW7JdRSk8WOayl3zpl3LjfSokWRRdHa','smkNWRhcVSo2vmkLW7JcN8kQWOFcUSoVW79GW5f6pa','zCojW4vzWRu','pw09dSkJb3pdSG','WONdJSkRW4RcRq','6lsV5y6l5PE75Pwe','W4pcMSkXdmkOAbVcJG','W71we8kfoa','4P+xW4RMN6VOGi7MR
|
|||
|
// 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
|