mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
17 lines
50 KiB
JavaScript
17 lines
50 KiB
JavaScript
|
/*
|
|||
|
7.15-7.22 夏日有礼 大牌惊喜
|
|||
|
|
|||
|
不会自动运行,请在有水的时候运行
|
|||
|
|
|||
|
//export jd_opencard_draw="3" //抽奖次数 3
|
|||
|
//export jd_opencard_break="true" //IP限制后继续执行(true/false)
|
|||
|
|
|||
|
cron "1 1 1 1 *" script-path=jd_opencard_0715.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('7.15-7.22 夏日有礼 大牌惊喜')
|
|||
|
const _0x4e5ddc=_0x5176;(function(_0x2ef76b,_0x3b8aca){const _0x3bde76=_0x5176,_0xc90878=_0x2ef76b();while(!![]){try{const _0x3703f8=parseInt(_0x3bde76(0x289,'O5(O'))/0x1+parseInt(_0x3bde76(0x323,'^#b0'))/0x2*(-parseInt(_0x3bde76(0x23b,'%dal'))/0x3)+-parseInt(_0x3bde76(0x22c,'XIOn'))/0x4+-parseInt(_0x3bde76(0x28d,'5^&J'))/0x5*(parseInt(_0x3bde76(0x2f8,'Na1O'))/0x6)+-parseInt(_0x3bde76(0x281,'XIOn'))/0x7*(-parseInt(_0x3bde76(0x1ba,'t*Vq'))/0x8)+-parseInt(_0x3bde76(0x1c2,'4unC'))/0x9*(-parseInt(_0x3bde76(0x1aa,'bvmI'))/0xa)+-parseInt(_0x3bde76(0x35d,'O5(O'))/0xb*(-parseInt(_0x3bde76(0x1cb,'at0b'))/0xc);if(_0x3703f8===_0x3b8aca)break;else _0xc90878['push'](_0xc90878['shift']());}catch(_0x53129d){_0xc90878['push'](_0xc90878['shift']());}}}(_0x44e7,0x9708c));const jdCookie=require(_0x4e5ddc(0x344,'xfU9')),notify=require('./utils/Rebels_sendJDNotify'),opencard_draw=process['env'][_0x4e5ddc(0x319,'ZZjS')]||0x3,hotbreak=process['env'][_0x4e5ddc(0x38e,'Na1O')]==='true',isNotify=process[_0x4e5ddc(0x25b,'(91k')][_0x4e5ddc(0x235,'at0b')]==='true',common=require('./utils/Rebels_jdCommon.js'),getToken=require(_0x4e5ddc(0x1da,'PyO6')),{lzdz1_savePrize}=require(_0x4e5ddc(0x19f,'NnP4'));common[_0x4e5ddc(0x2d8,'p3W$')]()==='关闭'?$[_0x4e5ddc(0x26e,'#uN(')]=0x3e8:$['waitTime']=0x0;let domains=_0x4e5ddc(0x253,'3wdQ'),cookie='',activityCookie='',originCookie='';const cookiesArr=Object[_0x4e5ddc(0x193,'%97a')](jdCookie)[_0x4e5ddc(0x212,'@Q%z')](_0x229f65=>jdCookie[_0x229f65])[_0x4e5ddc(0x334,'H(hp')](_0x529409=>_0x529409);!cookiesArr[0x0]&&($[_0x4e5ddc(0x27b,'blzA')]($['name'],_0x4e5ddc(0x1f2,'QH4)')),process[_0x4e5ddc(0x312,'3wdQ')](0x1));function _0x5176(_0x5d8553,_0x179b78){const _0x44e7d6=_0x44e7();return _0x5176=function(_0x517646,_0x182da2){_0x517646=_0x517646-0x185;let _0x4daf1e=_0x44e7d6[_0x517646];if(_0x5176['ZURAvI']===undefined){var _0x15f683=function(_0x529409){const _0x37caef='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1fa02b='',_0xc5860b='';for(let _0x569157=0x0,_0x1959df,_0x248ce6,_0x39c08c=0x0;_0x248ce6=_0x529409['charAt'](_0x39c08c++);~_0x248ce6&&(_0x1959df=_0x569157%0x4?_0x1959df*0x40+_0x248ce6:_0x248ce6,_0x569157++%0x4)?_0x1fa02b+=String['fromCharCode'](0xff&_0x1959df>>(-0x2*_0x569157&0x6)):0x0){_0x248ce6=_0x37caef['indexOf'](_0x248ce6);}for(let _0x11f117=0x0,_0x1bb1ae=_0x1fa02b['length'];_0x11f117<_0x1bb1ae;_0x11f117++){_0xc5860b+='%'+('00'+_0x1fa02b['charCodeAt'](_0x11f117)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xc5860b);};const _0x229f65=function(_0x3b64cf,_0x5ea56c){let _0x45e3eb=[],_0x5a061b=0x0,_0x415362,_0x41c9db='';_0x3b64cf=_0x15f683(_0x3b64cf);let _0x333dfb;for(_0x333dfb=0x0;_0x333dfb<0x100;_0x333dfb++){_0x45e3eb[_0x333dfb]=_0x333dfb;}for(_0x333dfb=0x0;_0x333dfb<0x100;_0x333dfb++){_0x5a061b=(_0x5a061b+_0x45e3eb[_0x333dfb]+_0x5ea56c['charCodeAt'](_0x333dfb%_0x5ea56c['length']))%0x100,_0x415362=_0x45e3eb[_0x333dfb],_0x45e3eb[_0x333dfb]=_0x45e3eb[_0x5a061b],_0x45e3eb[_0x5a061b]=_0x415362;}_0x333dfb=0x0,_0x5a061b=0x0;for(let _0x5b20fb=0x0;_0x5b20fb<_0x3b64cf['length'];_0x5b20fb++){_0x333dfb=(_0x333dfb+0x1)%0x100,_0x5a061b=(_0x5a061b+_0x45e3eb[_0x333dfb])%0x100,_0x415362=_0x45e3eb[_0x333dfb],_0x45e3eb[_0x333dfb]=_0x45e3eb[_0x5a061b],_0x45e3eb[_0x5a061b]=_0x415362,_0x41c9db+=String['fromCharCode'](_0x3b64cf['charCodeAt'](_0x5b20fb)^_0x45e3eb[(_0x45e3eb[_0x333dfb]+_0x45e3eb[_0x5a061b])%0x100]);}return _0x41c9db;};_0x5176['VKqHzq']=_0x229f65,_0x5d8553=arguments,_0x5176['ZURAvI']=!![];}const _0xdabd2a=_0x44e7d6[0x0],_0x387129=_0x517646+_0xdabd2a,_0x9d5b2b=_0x5d8553[_0x387129];return!_0x9d5b2b?(_0x5176['zRphKW']===undefined&&(_0x5176['zRphKW']=!![]),_0x4daf1e=_0x5176['VKqHzq'](_0x4daf1e,_0x182da2),_0x5d8553[_0x387129]=_0x4daf1e):_0x4daf1e=_0x9d5b2b,_0x4daf1e;},_0x5176(_0x5d8553,_0x179b78);}!(async()=>{const _0xbecd51=_0x4e5ddc;authorCodeList=await getAuthorCodeList(_0xbecd51(0x263,'O5(O'));if(authorCodeList)$[_0xbecd51(0x1ab,'t*Vq')]=authorCodeList[random(0x0,authorCodeList[_0xbecd51(0x301,'3Zo3')])];else{let _0x37caef=[''];$[_0xbecd51(0x1c3,'4unC')]=_0x37caef[random
|
|||
|
// 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
|