KR/jd_zqybhd.js

23 lines
92 KiB
JavaScript
Raw Normal View History

2023-09-17 13:41:57 +08:00
/*
9.15-9.29 中秋月饼勋章会员互动
任务本抽奖看脸
变量:
export jd_zqyb_exchangeid="兑换ID"
export jd_mpdz_draw="3" //次数 抽奖 没有多少就选择抽奖,很多小豆子
cron:31 16 17-29 9 *
============Quantumultx===============
[task_local]
#9.15-9.29 中秋月饼勋章会员互动
31 16 17-29 9 * jd_zqybhd.js, tag=9.15-9.29 中秋月饼勋章会员互动, enabled=true
*/
const $ = new Env('9.15-9.29 中秋月饼勋章会员互动');
var version_='jsjiami.com.v7';const IiI11lii=iilIlI1I;(function(IiiilI1,iIIiiII,IiilIii1,llI1l1iI,i1i11IiI,IlI1l1I,lIiilii1){return IiiilI1=IiiilI1>>0x9,IlI1l1I='hs',lIiilii1='hs',function(i1lilIiI,l1IIlIli,lI1ii1ii,Il11I1I1,l1I1i1I1){const lliiI111=iilIlI1I;Il11I1I1='tfi',IlI1l1I=Il11I1I1+IlI1l1I,l1I1i1I1='up',lIiilii1+=l1I1i1I1,IlI1l1I=lI1ii1ii(IlI1l1I),lIiilii1=lI1ii1ii(lIiilii1),lI1ii1ii=0x0;const lilIIIIl=i1lilIiI();while(!![]&&--llI1l1iI+l1IIlIli){try{Il11I1I1=parseInt(lliiI111(0x1f6,'7LL)'))/0x1*(-parseInt(lliiI111(0x362,'86d7'))/0x2)+parseInt(lliiI111(0x304,'bb*Y'))/0x3*(-parseInt(lliiI111(0x3e2,'qNE['))/0x4)+-parseInt(lliiI111(0x32a,'8%%t'))/0x5+parseInt(lliiI111(0x3d4,'RJvg'))/0x6+parseInt(lliiI111(0x3af,'eyq%'))/0x7*(-parseInt(lliiI111(0x298,'86d7'))/0x8)+parseInt(lliiI111(0x3a4,'ZvDv'))/0x9+parseInt(lliiI111(0x295,'Q&e%'))/0xa*(parseInt(lliiI111(0x373,'e(J5'))/0xb);}catch(ii1I1lll){Il11I1I1=lI1ii1ii;}finally{l1I1i1I1=lilIIIIl[IlI1l1I]();if(IiiilI1<=llI1l1iI)lI1ii1ii?i1i11IiI?Il11I1I1=l1I1i1I1:i1i11IiI=l1I1i1I1:lI1ii1ii=l1I1i1I1;else{if(lI1ii1ii==i1i11IiI['replace'](/[CYtPrKxTehVLBJQSNEF=]/g,'')){if(Il11I1I1===l1IIlIli){lilIIIIl['un'+IlI1l1I](l1I1i1I1);break;}lilIIIIl[lIiilii1](l1I1i1I1);}}}}}(IiilIii1,iIIiiII,function(l1i1i1ii,i1IliII,i1IllliI,l1iliIll,l1IiiIII,l1I1llIl,l1I1IIII){return i1IliII='\x73\x70\x6c\x69\x74',l1i1i1ii=arguments[0x0],l1i1i1ii=l1i1i1ii[i1IliII](''),i1IllliI=`\x72\x65\x76\x65\x72\x73\x65`,l1i1i1ii=l1i1i1ii[i1IllliI]('\x76'),l1iliIll=`\x6a\x6f\x69\x6e`,(0x13ea2c,l1i1i1ii[l1iliIll](''));});}(0x19400,0x4deb0,iI1lIil1,0xcc),iI1lIil1)&&(version_=iI1lIil1);const iIl11IIl=$[IiI11lii(0x2ef,'Q&e%')]()?require(IiI11lii(0x275,'eyq%')):'',illlII11=$[IiI11lii(0x1a6,'eyq%')]()?require('./sendNotify'):'';CryptoJS=$[IiI11lii(0x2ef,'Q&e%')]()?require(IiI11lii(0x49f,'l$gG')):CryptoJS;const I1lI1iI=require('./function/krgetToken'),ilIIili1=require(IiI11lii(0x44d,'eRL6')),iI1iiii=require(IiI11lii(0x490,'lDYB'));let iii1I1Il=IiI11lii(0x292,'Ekl^'),I1lIilIi=IiI11lii(0x458,'8%%t'),IllIlIiI=[],l11i1ii1='';if($[IiI11lii(0x263,'7[FW')]()){Object[IiI11lii(0x19f,'Ge#o')](iIl11IIl)[IiI11lii(0x34a,'!L*)')](lll1i1iI=>{IllIlIiI['push'](iIl11IIl[lll1i1iI]);});if(process['env'][IiI11lii(0x26d,'bb*Y')]&&process['env'][IiI11lii(0x215,'MS[[')]===IiI11lii(0x443,'UmS!'))console[IiI11lii(0x30c,'9o$t')]=()=>{};}else IllIlIiI=[$['getdata'](IiI11lii(0x4f7,'dBA)')),$[IiI11lii(0x488,'86d7')]('CookieJD2'),...liIi11Il($['getdata'](IiI11lii(0x308,'5[Aj'))||'[]')[IiI11lii(0x468,'1kBe')](i1IIIiI1=>i1IIIiI1[IiI11lii(0x2cf,'86d7')])]['filter'](il1l1iI=>!!il1l1iI);I1lIilIi=$[IiI11lii(0x1a9,'Ekl^')]()?process[IiI11lii(0x3f0,'1kBe')][IiI11lii(0x2be,'xt)j')]?process[IiI11lii(0x256,'ZvDv')]['opencard_toShop']:''+I1lIilIi:$['getdata'](IiI11lii(0x462,'pd!C'))?$[IiI11lii(0x260,'pd!C')](IiI11lii(0x497,'wBjk')):''+I1lIilIi,$[IiI11lii(0x42f,'lDYB')]=process['env'][IiI11lii(0x479,'pd!C')]?process['env'][IiI11lii(0x382,'bb*Y')]:IiI11lii(0x4af,'1Gbn');let ill111I1='30';ill111I1=$['isNode']()?process['env'][IiI11lii(0x4a0,'jRwv')]?process[IiI11lii(0x4ae,'Ge#o')]['retrynum']:ill111I1:$[IiI11lii(0x45b,'9o$t')](IiI11lii(0x4f0,'dw^P'))?$[IiI11lii(0x3e5,'%4*C')]('retrynum'):ill111I1;const liI111i1=process[IiI11lii(0x48d,'dBA)')][IiI11lii(0x426,'Ge#o')],IIliI1I1=process['env']['MPDZ_WAIT']||'2';let Iliil11I='0';Iliil11I=$[IiI11lii(0x1a6,'eyq%')]()?process['env'][IiI11lii(0x316,'e(J5')]?process[IiI11lii(0x1bd,'VUFN')][IiI11lii(0x32e,'%4*C')]:Iliil11I:$['getdata'](IiI11lii(0x303,'!L*)'))?$[IiI11lii(0x157,'7[FW')](IiI11lii(0x32e,'%4*C')):Iliil11I;function iI1lIil1(){const li1I1ll1=(function(){return[...[version_,'NQCtjBsxhjBLiPYaSVxmKVKiF.JCEcKoTemL.rv7==','kslcPSkIWRG','W7yZuq5HdhyMaSo0lq','W6pdQfRcIrxcTqO','B8kUa8kJba','bCkTW7xcRSkC','WQZdR8oeWQZdLq','ltrE','WP3cOGxdHGOP','W7ZdPWNcTSoX','W4dcTmovWRX9W7ye','umk+ACogW70','pmklW4NcRSkP','WQpdPdNdQSkX','nmkTf8ks','W7yZusT4aKS7','lqztBq','gc/dHCkpmG','l3GWW4qW','mSk8vCodla','ySkUpCoVW4y','WRuqcmktqCkouMFcRKHm','u23dOmoy','dIpdV8k9aW','WRxdL8oSWRddTNK','lN4eW5ukWQy','W5xdRqpcVSoj','nSkGWR/dKSkH','smksWRz+W5a','WOtd
// 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