faker3/jd_opencard_0621.js

17 lines
67 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
6.21-6.28 大牌低价 酷爽一夏
不会自动运行请在有水的时候运行
//export jd_opencard_draw="3" //抽奖次数 3
//export jd_opencard_break="true" //IP限制后继续执行true/false
cron "1 1 1 1 *" script-path=jd_opencard_0621.js
*/
const $ = new Env('6.21-6.28 大牌低价 酷爽一夏')
var il='jsjiami.com.v7';function iii1II(_0x395633,_0x21bcda){const _0x2e835d=Iii11l();return iii1II=function(_0x38eb57,_0x25853e){_0x38eb57=_0x38eb57-0x94;let _0x44e3d2=_0x2e835d[_0x38eb57];if(iii1II['uoqXDJ']===undefined){var _0x101c60=function(_0x17585b){const _0x51071a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x20a956='',_0x5866f1='';for(let _0x571bea=0x0,_0x3ca690,_0x1bd4c4,_0x25003f=0x0;_0x1bd4c4=_0x17585b['charAt'](_0x25003f++);~_0x1bd4c4&&(_0x3ca690=_0x571bea%0x4?_0x3ca690*0x40+_0x1bd4c4:_0x1bd4c4,_0x571bea++%0x4)?_0x20a956+=String['fromCharCode'](0xff&_0x3ca690>>(-0x2*_0x571bea&0x6)):0x0){_0x1bd4c4=_0x51071a['indexOf'](_0x1bd4c4);}for(let _0x444bca=0x0,_0x36d516=_0x20a956['length'];_0x444bca<_0x36d516;_0x444bca++){_0x5866f1+='%'+('00'+_0x20a956['charCodeAt'](_0x444bca)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5866f1);};const _0x50fa34=function(_0x194fb1,_0x448603){let _0x5f5326=[],_0x5d3ee1=0x0,_0x45a973,_0x2fc77d='';_0x194fb1=_0x101c60(_0x194fb1);let _0x19989b;for(_0x19989b=0x0;_0x19989b<0x100;_0x19989b++){_0x5f5326[_0x19989b]=_0x19989b;}for(_0x19989b=0x0;_0x19989b<0x100;_0x19989b++){_0x5d3ee1=(_0x5d3ee1+_0x5f5326[_0x19989b]+_0x448603['charCodeAt'](_0x19989b%_0x448603['length']))%0x100,_0x45a973=_0x5f5326[_0x19989b],_0x5f5326[_0x19989b]=_0x5f5326[_0x5d3ee1],_0x5f5326[_0x5d3ee1]=_0x45a973;}_0x19989b=0x0,_0x5d3ee1=0x0;for(let _0x565e14=0x0;_0x565e14<_0x194fb1['length'];_0x565e14++){_0x19989b=(_0x19989b+0x1)%0x100,_0x5d3ee1=(_0x5d3ee1+_0x5f5326[_0x19989b])%0x100,_0x45a973=_0x5f5326[_0x19989b],_0x5f5326[_0x19989b]=_0x5f5326[_0x5d3ee1],_0x5f5326[_0x5d3ee1]=_0x45a973,_0x2fc77d+=String['fromCharCode'](_0x194fb1['charCodeAt'](_0x565e14)^_0x5f5326[(_0x5f5326[_0x19989b]+_0x5f5326[_0x5d3ee1])%0x100]);}return _0x2fc77d;};iii1II['rcGKpA']=_0x50fa34,_0x395633=arguments,iii1II['uoqXDJ']=!![];}const _0x395df2=_0x2e835d[0x0],_0x36a02f=_0x38eb57+_0x395df2,_0xd47de9=_0x395633[_0x36a02f];return!_0xd47de9?(iii1II['cJjfrg']===undefined&&(iii1II['cJjfrg']=!![]),_0x44e3d2=iii1II['rcGKpA'](_0x44e3d2,_0x25853e),_0x395633[_0x36a02f]=_0x44e3d2):_0x44e3d2=_0xd47de9,_0x44e3d2;},iii1II(_0x395633,_0x21bcda);}const III1I1=iii1II;if(function(Ii1l1I,iilII1,iiiI11,l1lilI,i1Iil1,liI1Ii,l1lil1){return Ii1l1I=Ii1l1I>>0x1,liI1Ii='hs',l1lil1='hs',function(i1lil,I1iIl,IilII,ili1l,i1lii){const i1IilI=iii1II;ili1l='tfi',liI1Ii=ili1l+liI1Ii,i1lii='up',l1lil1+=i1lii,liI1Ii=IilII(liI1Ii),l1lil1=IilII(l1lil1),IilII=0x0;const iilIII=i1lil();while(!![]&&--l1lilI+I1iIl){try{ili1l=parseInt(i1IilI(0x155,'7hMb'))/0x1*(-parseInt(i1IilI(0x2dc,'I&#k'))/0x2)+parseInt(i1IilI(0x36e,'2ueT'))/0x3+parseInt(i1IilI(0x95,'heqF'))/0x4*(parseInt(i1IilI(0x25c,'CkaI'))/0x5)+parseInt(i1IilI(0x1ad,'xZdM'))/0x6*(-parseInt(i1IilI(0x1a9,'GSG1'))/0x7)+parseInt(i1IilI(0x255,'p9pZ'))/0x8*(-parseInt(i1IilI(0x14a,'*$fP'))/0x9)+-parseInt(i1IilI(0x12b,'jCdu'))/0xa*(-parseInt(i1IilI(0x378,'yu5I'))/0xb)+-parseInt(i1IilI(0x2b7,'%rid'))/0xc*(parseInt(i1IilI(0x2b8,'eDe7'))/0xd);}catch(liI1Il){ili1l=IilII;}finally{i1lii=iilIII[liI1Ii]();if(Ii1l1I<=l1lilI)IilII?i1Iil1?ili1l=i1lii:i1Iil1=i1lii:IilII=i1lii;else{if(IilII==i1Iil1['replace'](/[qTnWCtQNlpMubDXHxAdY=]/g,'')){if(ili1l===I1iIl){iilIII['un'+liI1Ii](i1lii);break;}iilIII[l1lil1](i1lii);}}}}}(iiiI11,iilII1,function(I1iIi,iiiI1I,lilI11,Ili1II,ili1i,IiIi1,l1Ii1){return iiiI1I='\x73\x70\x6c\x69\x74',I1iIi=arguments[0x0],I1iIi=I1iIi[iiiI1I](''),lilI11=`\x72\x65\x76\x65\x72\x73\x65`,I1iIi=I1iIi[lilI11]('\x76'),Ili1II=`\x6a\x6f\x69\x6e`,(0x173466,I1iIi[Ili1II](''));});}(0x196,0xe51b1,Iii11l,0xcd),Iii11l){}const jdCookie=require(III1I1(0x30d,'2ueT')),notify=require(III1I1(0x357,'wXa&')),opencard_draw=process[III1I1(0x19f,'wXa&')][III1I1(0xc0,'5951')]||0x3,hotbreak=process[III1I1(0x388,'h%pG')][III1I1(0x17e,'*$fP')]===III1I1(0x1b2,'!IRY'),isNotify=process['env']['jd_opencard_notify']==='true';console[III1I1(0xd0,'!IRY')](''),console['log'](III1I1(0x145,'IoO1')+$[III1I1(0x160,'%rid')]+III1I1(0x101,'o909')),console['log'](III1I1(0x1fe,'FQGM')),console[III1I1(0x32a,'h%pG')](III1I1(0x390,'TPRb')),co
// 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