jdpro/jd_opencard0805.js

7 lines
171 KiB
JavaScript
Raw Normal View History

2024-08-04 16:48:01 +00:00
/*
0 0 5 8 * jd_opencard0805.js
*/
const $ = new Env('8.5-8.12 畅快嗨一夏 大牌嘉年华');
var _0xodU='jsjiami.com.v7';const _0x3b2530=_0x550a;(function(_0x81ceb0,_0x5c4613,_0xa50f03,_0xeb23b7,_0x159bdd,_0x3ab8a5,_0x5794e2){return _0x81ceb0=_0x81ceb0>>0x2,_0x3ab8a5='hs',_0x5794e2='hs',function(_0x2f8d0d,_0x1dcf7e,_0x4efe0c,_0x225b31,_0x53c272){const _0x42e942=_0x550a;_0x225b31='tfi',_0x3ab8a5=_0x225b31+_0x3ab8a5,_0x53c272='up',_0x5794e2+=_0x53c272,_0x3ab8a5=_0x4efe0c(_0x3ab8a5),_0x5794e2=_0x4efe0c(_0x5794e2),_0x4efe0c=0x0;const _0x1af692=_0x2f8d0d();while(!![]&&--_0xeb23b7+_0x1dcf7e){try{_0x225b31=-parseInt(_0x42e942(0x955,'$*!p'))/0x1+parseInt(_0x42e942(0x89f,'o12t'))/0x2+parseInt(_0x42e942(0x1e4,'[nxr'))/0x3+-parseInt(_0x42e942(0x98c,'6r##'))/0x4+parseInt(_0x42e942(0x500,'7Hf%'))/0x5+parseInt(_0x42e942(0x23f,'6r##'))/0x6+parseInt(_0x42e942(0x96f,'2(hJ'))/0x7;}catch(_0x2e42df){_0x225b31=_0x4efe0c;}finally{_0x53c272=_0x1af692[_0x3ab8a5]();if(_0x81ceb0<=_0xeb23b7)_0x4efe0c?_0x159bdd?_0x225b31=_0x53c272:_0x159bdd=_0x53c272:_0x4efe0c=_0x53c272;else{if(_0x4efe0c==_0x159bdd['replace'](/[wrVIFYAGxUtKBhkDbW=]/g,'')){if(_0x225b31===_0x1dcf7e){_0x1af692['un'+_0x3ab8a5](_0x53c272);break;}_0x1af692[_0x5794e2](_0x53c272);}}}}}(_0xa50f03,_0x5c4613,function(_0x394be0,_0x571225,_0x8f3eb,_0x383c28,_0x26f1a3,_0x18026e,_0x2d03bd){return _0x571225='\x73\x70\x6c\x69\x74',_0x394be0=arguments[0x0],_0x394be0=_0x394be0[_0x571225](''),_0x8f3eb=`\x72\x65\x76\x65\x72\x73\x65`,_0x394be0=_0x394be0[_0x8f3eb]('\x76'),_0x383c28=`\x6a\x6f\x69\x6e`,(0x17c698,_0x394be0[_0x383c28](''));});}(0x304,0x30987,_0x1908,0xc3),_0x1908)&&(_0xodU=0x2774);const _0x249950=$[_0x3b2530(0x739,'(CPt')]()?require(_0x3b2530(0x910,'Z@xj')):'',_0x2179b3=$[_0x3b2530(0x98d,'Xu&w')]()?require(_0x3b2530(0x766,'I&13')):'',_0x474082=require(_0x3b2530(0x987,'v7Q^')),_0x5a305c=require(_0x3b2530(0x617,'qJLI')),_0x2171b2=require(_0x3b2530(0x555,'E%f0'));if(process[_0x3b2530(0x78f,'7F8*')][_0x3b2530(0x86a,'7Hf%')])try{require(_0x3b2530(0x6fa,'(MFm')),ccc=require(_0x3b2530(0xa26,'N4(U')),$[_0x3b2530(0x652,'fe0@')]=ccc[_0x3b2530(0x927,'W)V)')]($[_0x3b2530(0x998,'LG6K')][_0x3b2530(0x4f6,'I&13')]($)),$[_0x3b2530(0x42b,'K5]J')]=ccc[_0x3b2530(0x2c0,'Z@xj')]($[_0x3b2530(0x599,'W)V)')][_0x3b2530(0x9dc,'nb*5')]($));}catch{$[_0x3b2530(0x8b7,'^YIY')](_0x3b2530(0x928,'#wu1')),$[_0x3b2530(0x5f8,'QD^a')]=$[_0x3b2530(0x871,'^YIY')],$[_0x3b2530(0x634,'FpiB')]=$[_0x3b2530(0x25d,'K5]J')];}else $[_0x3b2530(0x783,'jTgT')]=$[_0x3b2530(0x71a,'Z@xj')],$[_0x3b2530(0x972,']zGE')]=$[_0x3b2530(0x9d3,'v7Q^')];let _0x3ff364=[],_0x1b7d80='',_0x5e60e7='',_0x2eca92='',_0x3537f9={},_0x214a53=0x0,_0x33620e=process[_0x3b2530(0x671,'QD^a')][_0x3b2530(0x985,'E%f0')]||'',_0x59a798=process[_0x3b2530(0x671,'QD^a')][_0x3b2530(0x755,'e^0Q')]||'',_0x116784=process[_0x3b2530(0x476,'GalJ')][_0x3b2530(0x369,'wCF(')+(__filename[_0x3b2530(0x6d0,'2(hJ')](/(\d+\w?).js/)?__filename[_0x3b2530(0x385,'Z@xj')](/(\d+\w?).js/)[0x1]:'')+_0x3b2530(0xa0b,'VAw*')]||'',_0x12e8c2=process[_0x3b2530(0x936,'Dw!y')][_0x3b2530(0x969,'hch&')]?process[_0x3b2530(0x690,'qJLI')][_0x3b2530(0x80b,'[nxr')]:'',_0x50cd37=process[_0x3b2530(0x70b,'9)S]')][_0x3b2530(0x1df,'8!@d')]?process[_0x3b2530(0x607,'cZ9@')][_0x3b2530(0x7c3,'08zx')]:'',_0xb2aff2=_0x3b2530(0x99f,'^YIY'),_0x365bd2=0x64,_0x4aa908=_0x3b2530(0x7e5,'08zx');$[_0x3b2530(0x947,'JEc8')]=_0x4aa908[_0x3b2530(0x8e3,'(MFm')](/activityId=(.*)&?/)[0x1],$[_0x3b2530(0x760,']zGE')]=_0x4aa908[_0x3b2530(0x6a6,'7F8*')](_0x3b2530(0x2e1,'E%f0'))[0x1]?_0x4aa908[_0x3b2530(0x1f1,'W)V)')](_0x3b2530(0x1eb,'fe0@'))[0x1]:_0x3b2530(0x1e2,'CDBr'),$[_0x3b2530(0x666,'FpiB')]=![],$[_0x3b2530(0x27b,'VAw*')]=![],$[_0x3b2530(0x327,'QD^a')]=![],$[_0x3b2530(0x1b4,'cZ9@')]=0x0,$[_0x3b2530(0x73b,'eBXH')]=0x0;if($[_0x3b2530(0x27e,'wCF(')]()){Object[_0x3b2530(0x5f0,'V!w3')](_0x249950)[_0x3b2530(0x9e1,'DRtr')](_0x1ee4a0=>{const _0x327dd8=_0x3b2530;_0x3ff364[_0x327dd8(0x2ba,'$*!p')](_0x249950[_0x1ee4a0]);});if(process[_0x3b2530(0x73e,'LG6K')][_0x3b2530(0xa13,'W)V)')]&&process[_0x3b2530(0x643,'[nxr')][_0x3b2530(0x603,'8!@d')]===_0x3b2530(0x3bc,'JEc8'))console[_0x3b2530(0x90e,'wHRj')]=()=>{};}else _0x3ff364=[$[_0x3b2530(0x488,'I&13
function Env(o,t){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((r,i)=>{s.call(this,t,(t,e,s)=>{t?i(t):r(e)})})}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.logLevels={debug:0,info:1,warn:2,error:3},this.logLevelPrefixs={debug:"[DEBUG] ",info:"[INFO] ",warn:"[WARN] ",error:"[ERROR] "},this.logLevel="info",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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null,...s){try{return JSON.stringify(t,...s)}catch{return e}}getjson(t,e){let s=e;if(this.getdata(t))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(r=>{this.get({url:t},(t,e,s)=>r(s))})}runScript(a,o){return new Promise(r=>{let t=this.getdata("@chavy_boxjs_userCfgs.httpapi");t=t&&t.replace(/\n/g,"").trim();var e=(e=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"))?+e:20,[s,i]=(e=o&&o.timeout?o.timeout:e,t.split("@"));this.post({url:`http://${i}/v1/scripting/evaluate`,body:{script_text:a,mock_type:"cron",timeout:e},headers:{"X-Key":s,Accept:"*/*"},timeout:e},(t,e,s)=>r(s))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};this.fs=this.fs||require("fs"),this.path=this.path||require("path");var t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),r=!s&&this.fs.existsSync(e);if(!s&&!r)return{};r=s?t:e;try{return JSON.parse(this.fs.readFileSync(r))}catch(t){return{}}}writedata(){var t,e,s,r,i;this.isNode()&&(this.fs=this.fs||require("fs"),this.path=this.path||require("path"),t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),r=!(s=this.fs.existsSync(t))&&this.fs.existsSync(e),i=JSON.stringify(this.data),!s&&r?this.fs.writeFileSync(e,i):this.fs.writeFileSync(t,i))}lodash_get(t,e,s){let r=t;for(const t of e.replace(/\[(\d+)\]/g,".$1").split("."))if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,r,e){return Object(t)===t&&((r=Array.isArray(r)?r:r.toString().match(/[^.[\]]+/g)||[]).slice(0,-1).reduce((t,e,s)=>Object(t[e])===t[e]?t[e]:t[e]=Math.abs(r[s+1])>>0==+r[s+1]?[]:{},t)[r[r.length-1]]=e),t}getdata(t){let e=this.getval(t);if(/^@/.test(t)){var[,s,r]=/^@(.*?)\.(.*?)$/.exec(t);if(s=s?this.getval(s):"")try{const t=JSON.parse(s);e=t?this.lodash_get(t,r,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){var[,r,i]=/^@(.*?)\.(.*?)$/.exec(e),a=this.getval(r),a=r?"null"===a?null:a||"{}":"{}";try{const e=JSON.parse(a);this.lodash_set(e,i,t),s=this.setval(JSON.stringify(e),r)}catch(e){this.lodash_set(a={},i,t),s=this.setval(JSON.stringify(a),r)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueF