faker3/jd_fzms_draw.js

11 lines
40 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
4.12-4.18 服装美饰抽奖
cron "1 1 1 1 *" script-path=jd_fzms_draw.js, tag=4.12-4.18 服装美饰抽奖
*/
const $ = new Env('4.12-4.18 服装美饰抽奖');
var il='jsjiami.com.v7';const Iiili1=iii1II;(function(lI1ll1,iIiI1,liil1I,i11ii1,IlIliI,l1iII1,iiill1){return lI1ll1=lI1ll1>>0x3,l1iII1='hs',iiill1='hs',function(lIli1i,IIIII1,I1lIlI,ii1ill,II1iI){const lI1lii=iii1II;ii1ill='tfi',l1iII1=ii1ill+l1iII1,II1iI='up',iiill1+=II1iI,l1iII1=I1lIlI(l1iII1),iiill1=I1lIlI(iiill1),I1lIlI=0x0;const llI1II=lIli1i();while(!![]&&--i11ii1+IIIII1){try{ii1ill=parseInt(lI1lii(0x1be,'oSq$'))/0x1*(-parseInt(lI1lii(0x1e1,'D*ob'))/0x2)+parseInt(lI1lii(0x22b,'zReF'))/0x3+parseInt(lI1lii(0x258,'1Kyh'))/0x4+-parseInt(lI1lii(0x2d4,'$E]J'))/0x5*(parseInt(lI1lii(0x2c5,'x6HC'))/0x6)+parseInt(lI1lii(0x174,'I0P3'))/0x7*(parseInt(lI1lii(0x2ae,'JSya'))/0x8)+-parseInt(lI1lii(0x280,'1Kyh'))/0x9+-parseInt(lI1lii(0x162,'FQZw'))/0xa;}catch(lIli1l){ii1ill=I1lIlI;}finally{II1iI=llI1II[l1iII1]();if(lI1ll1<=i11ii1)I1lIlI?IlIliI?ii1ill=II1iI:IlIliI=II1iI:I1lIlI=II1iI;else{if(I1lIlI==IlIliI['replace'](/[LUXdKARDfpwgFWMJklGbTr=]/g,'')){if(ii1ill===IIIII1){llI1II['un'+l1iII1](II1iI);break;}llI1II[iiill1](II1iI);}}}}}(liil1I,iIiI1,function(lillIi,illIi1,ii1ili,liil1i,lI1lil,i1l1iI,liil1l){return illIi1='\x73\x70\x6c\x69\x74',lillIi=arguments[0x0],lillIi=lillIi[illIi1](''),ii1ili=`\x72\x65\x76\x65\x72\x73\x65`,lillIi=lillIi[ii1ili]('\x76'),liil1i=`\x6a\x6f\x69\x6e`,(0x163b52,lillIi[liil1i](''));});}(0x658,0x54501,Iii11l,0xcd),Iii11l)&&(il=0xcd);const jdCookie=require(Iiili1(0x18a,'d]Y6')),notify=require('./utils/Rebels_sendJDNotify'),common=require('./utils/Rebels_jdCommon'),{H5st}=require(Iiili1(0x1c0,'4ufr')),isNotify=![];function iii1II(_0x1f2f77,_0x485bb0){const _0x150ae7=Iii11l();return iii1II=function(_0x58635a,_0x46f38d){_0x58635a=_0x58635a-0x154;let _0x242589=_0x150ae7[_0x58635a];if(iii1II['HzSbNp']===undefined){var _0x42c0f2=function(_0x24be8c){const _0x6a9be4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x518a57='',_0x842796='';for(let _0x1dd30f=0x0,_0x10f337,_0x1f80bb,_0x2e79e6=0x0;_0x1f80bb=_0x24be8c['charAt'](_0x2e79e6++);~_0x1f80bb&&(_0x10f337=_0x1dd30f%0x4?_0x10f337*0x40+_0x1f80bb:_0x1f80bb,_0x1dd30f++%0x4)?_0x518a57+=String['fromCharCode'](0xff&_0x10f337>>(-0x2*_0x1dd30f&0x6)):0x0){_0x1f80bb=_0x6a9be4['indexOf'](_0x1f80bb);}for(let _0x17522a=0x0,_0x5b1a7f=_0x518a57['length'];_0x17522a<_0x5b1a7f;_0x17522a++){_0x842796+='%'+('00'+_0x518a57['charCodeAt'](_0x17522a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x842796);};const _0x435507=function(_0x5560ff,_0x55299c){let _0x212f44=[],_0x1541ce=0x0,_0x1ff8fb,_0x1c6530='';_0x5560ff=_0x42c0f2(_0x5560ff);let _0x515701;for(_0x515701=0x0;_0x515701<0x100;_0x515701++){_0x212f44[_0x515701]=_0x515701;}for(_0x515701=0x0;_0x515701<0x100;_0x515701++){_0x1541ce=(_0x1541ce+_0x212f44[_0x515701]+_0x55299c['charCodeAt'](_0x515701%_0x55299c['length']))%0x100,_0x1ff8fb=_0x212f44[_0x515701],_0x212f44[_0x515701]=_0x212f44[_0x1541ce],_0x212f44[_0x1541ce]=_0x1ff8fb;}_0x515701=0x0,_0x1541ce=0x0;for(let _0x1123cf=0x0;_0x1123cf<_0x5560ff['length'];_0x1123cf++){_0x515701=(_0x515701+0x1)%0x100,_0x1541ce=(_0x1541ce+_0x212f44[_0x515701])%0x100,_0x1ff8fb=_0x212f44[_0x515701],_0x212f44[_0x515701]=_0x212f44[_0x1541ce],_0x212f44[_0x1541ce]=_0x1ff8fb,_0x1c6530+=String['fromCharCode'](_0x5560ff['charCodeAt'](_0x1123cf)^_0x212f44[(_0x212f44[_0x515701]+_0x212f44[_0x1541ce])%0x100]);}return _0x1c6530;};iii1II['FuhjEC']=_0x435507,_0x1f2f77=arguments,iii1II['HzSbNp']=!![];}const _0x21d537=_0x150ae7[0x0],_0x351198=_0x58635a+_0x21d537,_0x26629c=_0x1f2f77[_0x351198];return!_0x26629c?(iii1II['plnSkO']===undefined&&(iii1II['plnSkO']=!![]),_0x242589=iii1II['FuhjEC'](_0x242589,_0x46f38d),_0x1f2f77[_0x351198]=_0x242589):_0x242589=_0x26629c,_0x242589;},iii1II(_0x1f2f77,_0x485bb0);}let linkId=Iiili1(0x2c3,'#0dr'),cookie='';const cookiesArr=Object[Iiili1(0x160,'d9Lb')](jdCookie)['map'](iI1li1=>jdCookie[iI1li1])[Iiili1(0x199,'4ufr')](lllii1=>lllii1);!cookiesArr[0x0]&&($['msg']($[Iiili1(0x170,'48Y5')],Iiili1(0x238,'*xN@')),process[Iiili1(0x237,'I0P3')](0x1));function Iii11l(){const il1iIi=(function(){return[...[il,'XKwfjkRsdjdibbampbDiJT.McLolWGmK.gv7UrFA==',
// 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