KR/jd_opencardL343.js

27 lines
84 KiB
JavaScript
Raw Normal View History

2023-10-31 00:28:13 +08:00
/*
11.11时尚大牌云集 黑马新品聚惠 2
新增开卡脚本一次性脚本
变量
//export opencard_draw="3" //抽奖次数 3
入口[ 11.11时尚大牌云集 黑马新品聚惠 2]
请求太频繁会被黑ip
过10分钟再执行
cron:11 11 11 11 *
============Quantumultx===============
[task_local]
#11.11时尚大牌云集 黑马新品聚惠 2
11 11 11 11 * jd_opencardL343.js, tag=11.11时尚大牌云集 黑马新品聚惠 2, enabled=true
*/
const $ = new Env('11.11时尚大牌云集 黑马新品聚惠 2');
var version_='jsjiami.com.v7';const iIlii=iii1II;(function(liII1i,iIiIil,iIiIii,lI1i,i11,Ii1llI,i1I11i){return liII1i=liII1i>>0x6,Ii1llI='hs',i1I11i='hs',function(lI1l,li11Il,i1I11l,IIlIl1,liII1l){const lIiII1=iii1II;IIlIl1='tfi',Ii1llI=IIlIl1+Ii1llI,liII1l='up',i1I11i+=liII1l,Ii1llI=i1I11l(Ii1llI),i1I11i=i1I11l(i1I11i),i1I11l=0x0;const Ii1ll1=lI1l();while(!![]&&--lI1i+li11Il){try{IIlIl1=-parseInt(lIiII1(0x4bf,'7)rk'))/0x1+parseInt(lIiII1(0x417,'T)aS'))/0x2+-parseInt(lIiII1(0x234,'AcH)'))/0x3*(-parseInt(lIiII1(0x50c,'BbNJ'))/0x4)+parseInt(lIiII1(0x23f,'wbsJ'))/0x5+parseInt(lIiII1(0x22c,'*&89'))/0x6*(parseInt(lIiII1(0x22f,'Ki!Q'))/0x7)+-parseInt(lIiII1(0x316,'kcz)'))/0x8+-parseInt(lIiII1(0x345,'an)5'))/0x9*(parseInt(lIiII1(0x3ae,']UTL'))/0xa);}catch(IIlIlI){IIlIl1=i1I11l;}finally{liII1l=Ii1ll1[Ii1llI]();if(liII1i<=lI1i)i1I11l?i11?IIlIl1=liII1l:i11=liII1l:i1I11l=liII1l;else{if(i1I11l==i11['replace'](/[tISHAyFXlKLdOTMYhEg=]/g,'')){if(IIlIl1===li11Il){Ii1ll1['un'+Ii1llI](liII1l);break;}Ii1ll1[i1I11i](liII1l);}}}}}(iIiIii,iIiIil,function(I1III1,iIll1,l11li1,i1I,liII1I,iIiIiI,iIlil){return iIll1='\x73\x70\x6c\x69\x74',I1III1=arguments[0x0],I1III1=I1III1[iIll1](''),l11li1=`\x72\x65\x76\x65\x72\x73\x65`,I1III1=I1III1[l11li1]('\x76'),i1I=`\x6a\x6f\x69\x6e`,(0x145259,I1III1[i1I](''));});}(0x32c0,0x324f3,Iii11l,0xcd),Iii11l)&&(version_=iIlii(0x1f3,'mgdF'));const Ii1lIi=$[iIlii(0x346,'xYjY')]()?require(iIlii(0x470,'Z^S#')):'',li11il=$[iIlii(0x4d6,'5hNj')]()?require('./sendNotify'):'',ll1lII=require('./function/krgetToken'),Ii1lIl=require(iIlii(0x43c,'y(mL')),iIIIiI=require(iIlii(0x3c1,'AcH)')),li1iI=require(iIlii(0x392,'*&89'));let I1IIi1='https://lzdz1-isv.isvjcloud.com',ll1lI1=$['isNode']()?process[iIlii(0x36e,'XnQ(')]['opencard_draw']?process['env'][iIlii(0x557,'8b^@')]:'0':$[iIlii(0x3f7,']UTL')]('opencard_draw')?$[iIlii(0x4fa,'*&89')](iIlii(0x244,'jK0q')):'0',II1ll=[],liii11='';if($[iIlii(0x226,'BbNJ')]()){Object[iIlii(0x19b,'DT5Z')](Ii1lIi)[iIlii(0x54e,'8o5V')](lIi11l=>{II1ll['push'](Ii1lIi[lIi11l]);});if(process['env'][iIlii(0x350,'xYjY')]&&process[iIlii(0x26c,'&Ru]')][iIlii(0x407,'1yai')]===iIlii(0x357,'kcz)'))console[iIlii(0x4cf,'7Bzl')]=()=>{};}else II1ll=[$['getdata']('CookieJD'),$[iIlii(0x372,'Nt$l')](iIlii(0x18b,'GDJc')),...iliiiI($[iIlii(0x397,'xYjY')](iIlii(0x1a2,'jK0q'))||'[]')[iIlii(0x268,'5hNj')](i1IlI=>i1IlI[iIlii(0x2e3,'8b^@')])][iIlii(0x2ee,'#%y!')](lIl1Ii=>!!lIl1Ii);allMessage='',message='',$[iIlii(0x516,'pg4C')]=![],$[iIlii(0x1d7,'up#Q')]=![],$[iIlii(0x3cc,'fx51')]=![];let lIiIii='',i1Ill='',Il1I11={};!(async()=>{const lI1I=iIlii,lIl1Il={'iFAAX':lI1I(0x293,'xM@w'),'CQiQO':function(Ii1IlI,Il1I1I){return Ii1IlI(Il1I1I);},'ywWht':lI1I(0x320,'#%y!'),'Igpwh':function(ll1Il1,li11li){return ll1Il1===li11li;},'ihimp':lI1I(0x451,'kcz)'),'EDuXN':lI1I(0x209,'7)rk'),'XXJjM':function(iliiii,IIlIIi,iliiil){return iliiii(IIlIIi,iliiil);},'EuocX':lI1I(0x432,'DT5Z'),'crnyz':lI1I(0x1d6,'tM[s'),'Ngiwn':function(li11ll,i1Il1){return li11ll<i1Il1;},'pDzGd':function(li1l1,IIiI1l){return li1l1+IIiI1l;},'kNZpd':function(IIiI1i){return IIiI1i();},'CpYIF':function(ilIllI,I1IIli){return ilIllI!==I1IIli;},'GxOiO':'XoCqO','IQtSr':lI1I(0x47c,'xM@w')};if(!II1ll[0x0]){$['msg']($['name'],lI1I(0x36f,'#%y!'),lIl1Il[lI1I(0x261,'*&89')],{'open-url':lIl1Il[lI1I(0x55d,'Nt$l')]});return;}authorCodeList=await lIl1Il[lI1I(0x4df,'7)rk')](i1Iii,lIl1Il['ywWht']);if(authorCodeList)lIl1Il[lI1I(0x1a4,'kcz)')]('usuKI',lIl1Il['ihimp'])?(console[lI1I(0x35c,'&1B0')](lIl1Il[lI1I(0x47d,'Z^S#')]),$[lI1I(0x2ad,'8o5V')]=authorCodeList[lIl1Il[lI1I(0x366,'VPGw')](IIiI1I,0x0,authorCodeList[lI1I(0x511,'QFN$')])]):i1iIi1[lI1I(0x33e,'QFN$')]('空气');else{let lIilI1=[lIl1Il[lI1I(0x1b0,'T)aS')]];$[lI1I(0x543,'VPGw')]=lIilI1[IIiI1I(0x0,lIilI1['length'])],console['log'](lIl1Il[lI1I(0x2a2,'AcH)')]);}$[lI1I(0x3c6,'9[Sw')]=lI1I(0x19e,'4*Tj'),$[lI1I(0x4b5,'xYjY')]=$['authorCode'];for(let Il1I1l=0x0;lIl1Il['Ngiwn'](Il1I1l,II1ll[lI1I(0x1fd,'pg4C')]);Il1I1l++){liii11=II1ll[Il1I1l],originCookie=II1ll[Il1I1l];if(liii11){$['UserName']=lIl1Il[lI1I(0x2f0,'wbsJ')](decodeURIComponent,lii
// 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