faker2/jd_opencard_0724.js

17 lines
50 KiB
JavaScript
Raw Normal View History

2024-07-25 03:12:11 +00:00
/*
7.24-7.31 为热爱助威 赢惊喜好礼
不会自动运行请在有水的时候运行
//export jd_opencard_draw="3" //抽奖次数 3
//export jd_opencard_break="true" //IP限制后继续执行true/false
cron "1 1 1 1 *" script-path=jd_opencard_0724.js
*/
const $ = new Env('7.24-7.31 为热爱助威 赢惊喜好礼')
const _0x5a586b=_0x2bf3;(function(_0x5acf27,_0x3c10a7){const _0x11daaa=_0x2bf3,_0x2f2378=_0x5acf27();while(!![]){try{const _0x54153a=-parseInt(_0x11daaa(0x24e,'uAxN'))/0x1*(-parseInt(_0x11daaa(0x3f8,'[V5f'))/0x2)+-parseInt(_0x11daaa(0x249,'USCu'))/0x3+-parseInt(_0x11daaa(0x354,'Wm)j'))/0x4+parseInt(_0x11daaa(0x240,'5BBN'))/0x5*(parseInt(_0x11daaa(0x391,'LXNl'))/0x6)+parseInt(_0x11daaa(0x373,'3O3D'))/0x7*(-parseInt(_0x11daaa(0x28c,'$4(V'))/0x8)+-parseInt(_0x11daaa(0x20b,'AZKQ'))/0x9*(parseInt(_0x11daaa(0x35b,'K]Ya'))/0xa)+parseInt(_0x11daaa(0x290,'mGqH'))/0xb;if(_0x54153a===_0x3c10a7)break;else _0x2f2378['push'](_0x2f2378['shift']());}catch(_0x35a72e){_0x2f2378['push'](_0x2f2378['shift']());}}}(_0x244c,0x55418));const jdCookie=require(_0x5a586b(0x238,'(lFC')),notify=require(_0x5a586b(0x347,'7pz8')),opencard_draw=process[_0x5a586b(0x2e1,'GKJ*')][_0x5a586b(0x2c6,'E[qQ')]||0x3,hotbreak=process[_0x5a586b(0x38a,'dV*a')][_0x5a586b(0x299,'8u9a')]===_0x5a586b(0x227,'dV*a'),isNotify=process[_0x5a586b(0x291,'psx*')][_0x5a586b(0x1f1,'8u9a')]==='true',common=require('./utils/Rebels_jdCommon.js'),getToken=require(_0x5a586b(0x2c9,'O!Fk')),{lzdz1_savePrize}=require(_0x5a586b(0x1dc,'lm$o'));common[_0x5a586b(0x1fd,'[V5f')]()==='关闭'?$[_0x5a586b(0x221,'lm$o')]=0x3e8:$[_0x5a586b(0x3a4,'&bSw')]=0x0;let domains=_0x5a586b(0x262,'USCu'),cookie='',activityCookie='',originCookie='';const cookiesArr=Object['keys'](jdCookie)['map'](_0x2321d9=>jdCookie[_0x2321d9])['filter'](_0x54e2cc=>_0x54e2cc);!cookiesArr[0x0]&&($[_0x5a586b(0x343,'$e]K')]($[_0x5a586b(0x224,'8u9a')],'【提示】请先获取Cookie'),process['exit'](0x1));function _0x2bf3(_0x4744ff,_0x4b4710){const _0x244c40=_0x244c();return _0x2bf3=function(_0x2bf359,_0x1794be){_0x2bf359=_0x2bf359-0x1d9;let _0x30df9f=_0x244c40[_0x2bf359];if(_0x2bf3['XlsfaR']===undefined){var _0x444393=function(_0x54e2cc){const _0x17ec6e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5fd9da='',_0x1da7d0='';for(let _0x54eded=0x0,_0x4526e6,_0x1b09c9,_0x1f938b=0x0;_0x1b09c9=_0x54e2cc['charAt'](_0x1f938b++);~_0x1b09c9&&(_0x4526e6=_0x54eded%0x4?_0x4526e6*0x40+_0x1b09c9:_0x1b09c9,_0x54eded++%0x4)?_0x5fd9da+=String['fromCharCode'](0xff&_0x4526e6>>(-0x2*_0x54eded&0x6)):0x0){_0x1b09c9=_0x17ec6e['indexOf'](_0x1b09c9);}for(let _0x57ed9f=0x0,_0x3e2bc1=_0x5fd9da['length'];_0x57ed9f<_0x3e2bc1;_0x57ed9f++){_0x1da7d0+='%'+('00'+_0x5fd9da['charCodeAt'](_0x57ed9f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1da7d0);};const _0x2321d9=function(_0x59fb14,_0x26cf2a){let _0x10dc87=[],_0x5ade15=0x0,_0x4c4923,_0x403ad7='';_0x59fb14=_0x444393(_0x59fb14);let _0x40eb2d;for(_0x40eb2d=0x0;_0x40eb2d<0x100;_0x40eb2d++){_0x10dc87[_0x40eb2d]=_0x40eb2d;}for(_0x40eb2d=0x0;_0x40eb2d<0x100;_0x40eb2d++){_0x5ade15=(_0x5ade15+_0x10dc87[_0x40eb2d]+_0x26cf2a['charCodeAt'](_0x40eb2d%_0x26cf2a['length']))%0x100,_0x4c4923=_0x10dc87[_0x40eb2d],_0x10dc87[_0x40eb2d]=_0x10dc87[_0x5ade15],_0x10dc87[_0x5ade15]=_0x4c4923;}_0x40eb2d=0x0,_0x5ade15=0x0;for(let _0x41aeba=0x0;_0x41aeba<_0x59fb14['length'];_0x41aeba++){_0x40eb2d=(_0x40eb2d+0x1)%0x100,_0x5ade15=(_0x5ade15+_0x10dc87[_0x40eb2d])%0x100,_0x4c4923=_0x10dc87[_0x40eb2d],_0x10dc87[_0x40eb2d]=_0x10dc87[_0x5ade15],_0x10dc87[_0x5ade15]=_0x4c4923,_0x403ad7+=String['fromCharCode'](_0x59fb14['charCodeAt'](_0x41aeba)^_0x10dc87[(_0x10dc87[_0x40eb2d]+_0x10dc87[_0x5ade15])%0x100]);}return _0x403ad7;};_0x2bf3['ChIftG']=_0x2321d9,_0x4744ff=arguments,_0x2bf3['XlsfaR']=!![];}const _0x17d2e=_0x244c40[0x0],_0xc8a443=_0x2bf359+_0x17d2e,_0x4d4fa2=_0x4744ff[_0xc8a443];return!_0x4d4fa2?(_0x2bf3['KYkvVO']===undefined&&(_0x2bf3['KYkvVO']=!![]),_0x30df9f=_0x2bf3['ChIftG'](_0x30df9f,_0x1794be),_0x4744ff[_0xc8a443]=_0x30df9f):_0x30df9f=_0x4d4fa2,_0x30df9f;},_0x2bf3(_0x4744ff,_0x4b4710);}!(async()=>{const _0x7bf086=_0x5a586b;authorCodeList=await getAuthorCodeList('http://code.257999.xyz/jd_joinCommon_opencard530.json');if(authorCodeList)$[_0x7bf086(0x2dd,'3O3D')]=authorCodeList[random(0x0,authorCodeList[_0x7bf086(0x217,'mGqH')])];else{let _0x17ec6e=[''];$[_0x7bf086(0x308,'*^Zs')]=_0x17ec6e[
// 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