KR/jd_opencardL334.js

27 lines
88 KiB
JavaScript
Raw Normal View History

2023-09-15 11:13:06 +08:00
/*
领潮初秋 品质焕新
新增开卡脚本一次性脚本
变量
//export opencard_draw="3" //抽奖次数 3
入口[ 领潮初秋 品质焕新]
请求太频繁会被黑ip
过10分钟再执行
cron:11 11 11 11 *
============Quantumultx===============
[task_local]
#领潮初秋 品质焕新
11 11 11 11 * jd_opencardL334.js, tag=领潮初秋 品质焕新, enabled=true
*/
const $ = new Env('领潮初秋 品质焕新');
var version_='jsjiami.com.v7';const i11liIIi=IIl1lII;(function(IiI1iI11,lllliil1,il1i1Ii1,iIiIiII,ii111i,l1I1l111,I1lI111){return IiI1iI11=IiI1iI11>>0x3,l1I1l111='hs',I1lI111='hs',function(IiiliiIi,i1III1i1,l1l1iill,ll1lIiil,ll1lIl1l){const li1iliil=IIl1lII;ll1lIiil='tfi',l1I1l111=ll1lIiil+l1I1l111,ll1lIl1l='up',I1lI111+=ll1lIl1l,l1I1l111=l1l1iill(l1I1l111),I1lI111=l1l1iill(I1lI111),l1l1iill=0x0;const IIIiilIi=IiiliiIi();while(!![]&&--iIiIiII+i1III1i1){try{ll1lIiil=parseInt(li1iliil(0x353,'RT#T'))/0x1+-parseInt(li1iliil(0x39e,'kS($'))/0x2+-parseInt(li1iliil(0x299,'XrIo'))/0x3*(-parseInt(li1iliil(0x1b5,'zMGy'))/0x4)+parseInt(li1iliil(0x4a2,'kS($'))/0x5*(parseInt(li1iliil(0x18f,'4bLZ'))/0x6)+-parseInt(li1iliil(0x25f,'E6rA'))/0x7*(-parseInt(li1iliil(0x3de,'s^zl'))/0x8)+parseInt(li1iliil(0x318,'(Pie'))/0x9*(-parseInt(li1iliil(0x287,']ugq'))/0xa)+parseInt(li1iliil(0x2d3,'HumH'))/0xb*(parseInt(li1iliil(0x420,'@URM'))/0xc);}catch(iii1Ilil){ll1lIiil=l1l1iill;}finally{ll1lIl1l=IIIiilIi[l1I1l111]();if(IiI1iI11<=iIiIiII)l1l1iill?ii111i?ll1lIiil=ll1lIl1l:ii111i=ll1lIl1l:l1l1iill=ll1lIl1l;else{if(l1l1iill==ii111i['replace'](/[UnwdHtBGAeJbqDpFuKE=]/g,'')){if(ll1lIiil===i1III1i1){IIIiilIi['un'+l1I1l111](ll1lIl1l);break;}IIIiilIi[I1lI111](ll1lIl1l);}}}}}(il1i1Ii1,lllliil1,function(i1iI1lll,iil1i1iI,il1ii1ll,I1iIIIil,l1IlI11l,IilIllII,l1111llI){return iil1i1iI='\x73\x70\x6c\x69\x74',i1iI1lll=arguments[0x0],i1iI1lll=i1iI1lll[iil1i1iI](''),il1ii1ll=`\x72\x65\x76\x65\x72\x73\x65`,i1iI1lll=i1iI1lll[il1ii1ll]('\x76'),I1iIIIil=`\x6a\x6f\x69\x6e`,(0x13e567,i1iI1lll[I1iIIIil](''));});}(0x5f0,0xbd1ad,IIill11l,0xc0),IIill11l)&&(version_=IIill11l);const ll1lI11i=$[i11liIIi(0x356,'R0DU')]()?require('./jdCookie.js'):'',Il11Il11=$[i11liIIi(0x1d4,'&Ds7')]()?require(i11liIIi(0x246,'G)#O')):'',IiilIIIi=require(i11liIIi(0x45c,'s^zl')),IIii111I=require(i11liIIi(0x2b2,'O9TI')),l1IiIili=require(i11liIIi(0x2a0,'V3G*')),iIiilIll=require('./function/krwxSavePrize');let I11l1ll=i11liIIi(0x406,']ugq'),llli1I=$[i11liIIi(0x1cf,'Ui1h')]()?process[i11liIIi(0x135,'BbwE')][i11liIIi(0x19f,'E6rA')]?process['env'][i11liIIi(0x2b9,'V#qS')]:'0':$[i11liIIi(0x221,'iBXJ')]('opencard_draw')?$['getdata'](i11liIIi(0x19f,'E6rA')):'0',l1iIIIl=[],iiIl11Il='';if($[i11liIIi(0x289,'nyf[')]()){Object[i11liIIi(0x1db,'mwt6')](ll1lI11i)[i11liIIi(0x409,']ugq')](II11li11=>{const Iiliil11=i11liIIi;l1iIIIl[Iiliil11(0x252,'mwt6')](ll1lI11i[II11li11]);});if(process['env']['JD_DEBUG']&&process[i11liIIi(0x492,'kS($')][i11liIIi(0x38e,'O9TI')]===i11liIIi(0x1d9,'V7&r'))console['log']=()=>{};}else l1iIIIl=[$['getdata'](i11liIIi(0x327,'O9TI')),$[i11liIIi(0x221,'iBXJ')]('CookieJD2'),...lIIi1IlI($[i11liIIi(0x1b0,'((9g')]('CookiesJD')||'[]')[i11liIIi(0x166,'BbwE')](lil1llII=>lil1llII[i11liIIi(0x45a,'V3G*')])][i11liIIi(0x29f,'#)mo')](I1l1iIl1=>!!I1l1iIl1);allMessage='',message='',$[i11liIIi(0x416,'H&Ik')]=![],$[i11liIIi(0x29c,'(Pie')]=![],$[i11liIIi(0x428,'FL5s')]=![];let i1IlIill='',lI11IilI='',iIIl1li1={};!(async()=>{const Iii1ili1=i11liIIi,lIIi11li={'aSPyP':Iii1ili1(0x41d,'S0n4'),'uAaDq':'此ip已被限制请过10分钟后再执行脚本\x0a','VkSSK':Iii1ili1(0x13d,'@TD5'),'NzGNJ':'http://code.kingran.cf/334.json','IhWzy':Iii1ili1(0x415,'NbMY'),'uWmNj':Iii1ili1(0x291,'E6rA'),'OifuA':Iii1ili1(0x418,'iQq3'),'gLgTf':function(I1I11ll1,Ii1Ii1i1,llli1IlI){return I1I11ll1(Ii1Ii1i1,llli1IlI);},'VfSPZ':function(iliIiiII,IiiIi1lI){return iliIiiII===IiiIi1lI;},'jBPfJ':'e99b1307ce9c495b9b2ad47d6b0251f0','TNYrj':function(il1li1Il,i11Ill1){return il1li1Il<i11Ill1;},'JfIyq':function(iilIll1I,i1Iil1Ii){return iilIll1I!==i1Iil1Ii;},'xfrHl':'asBKz','hrqmy':function(lil1IllI,iiIi11lI){return lil1IllI+iiIi11lI;},'tBgWh':function(IIIIlIIl){return IIIIlIIl();},'quVmS':function(I1I1lIll,ll111II){return I1I1lIll!==ll111II;},'JPVlH':'MSohx','sCebo':Iii1ili1(0x435,'s^zl'),'IEwjb':function(illIiIll,i1Ill1il){return illIiIll===i1Ill1il;},'ojBmy':'ZWqJE'};if(!l1iIIIl[0x0]){$[Iii1ili1(0x469,'H&Ik')]($['name'],lIIi11li[Iii1ili1(0x2ac,'RT#T')],'https://bean.m.jd.com/',{'open-url':Iii1ili1(0x1dd,']ugq')});return;}authorCodeList=awai
// 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