mirror of https://github.com/6dylan6/jdpro.git
7 lines
99 KiB
JavaScript
7 lines
99 KiB
JavaScript
|
/*
|
||
|
0 0 23 7 * jd_opencard0723.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('7.23-7.31 盛夏热浪 尽享特惠');
|
||
|
var _0xodt='jsjiami.com.v7';const _0x574291=_0x97fc;(function(_0x45271f,_0x4c81f4,_0x40a44a,_0x302e03,_0x3c0d3f,_0x252b3a,_0x3bcdd8){return _0x45271f=_0x45271f>>0x2,_0x252b3a='hs',_0x3bcdd8='hs',function(_0x1049f3,_0x568d1b,_0x3fa669,_0x109995,_0x290140){const _0x1d0e52=_0x97fc;_0x109995='tfi',_0x252b3a=_0x109995+_0x252b3a,_0x290140='up',_0x3bcdd8+=_0x290140,_0x252b3a=_0x3fa669(_0x252b3a),_0x3bcdd8=_0x3fa669(_0x3bcdd8),_0x3fa669=0x0;const _0x18a581=_0x1049f3();while(!![]&&--_0x302e03+_0x568d1b){try{_0x109995=parseInt(_0x1d0e52(0x1a1,'Va9]'))/0x1+-parseInt(_0x1d0e52(0x556,'(vDv'))/0x2*(parseInt(_0x1d0e52(0x146,'YZTv'))/0x3)+parseInt(_0x1d0e52(0x46a,'#lPh'))/0x4+parseInt(_0x1d0e52(0x2ac,'wbkl'))/0x5+parseInt(_0x1d0e52(0x2c6,'@lMC'))/0x6+parseInt(_0x1d0e52(0x3a5,'$O#&'))/0x7+-parseInt(_0x1d0e52(0x36a,'#[QV'))/0x8;}catch(_0x33d44b){_0x109995=_0x3fa669;}finally{_0x290140=_0x18a581[_0x252b3a]();if(_0x45271f<=_0x302e03)_0x3fa669?_0x3c0d3f?_0x109995=_0x290140:_0x3c0d3f=_0x290140:_0x3fa669=_0x290140;else{if(_0x3fa669==_0x3c0d3f['replace'](/[XTbUMWQxKqSLwNIfgCh=]/g,'')){if(_0x109995===_0x568d1b){_0x18a581['un'+_0x252b3a](_0x290140);break;}_0x18a581[_0x3bcdd8](_0x290140);}}}}}(_0x40a44a,_0x4c81f4,function(_0x17833b,_0x1640b5,_0x2054b,_0x4c860a,_0xdd6f55,_0x3b1406,_0x5123a4){return _0x1640b5='\x73\x70\x6c\x69\x74',_0x17833b=arguments[0x0],_0x17833b=_0x17833b[_0x1640b5](''),_0x2054b=`\x72\x65\x76\x65\x72\x73\x65`,_0x17833b=_0x17833b[_0x2054b]('\x76'),_0x4c860a=`\x6a\x6f\x69\x6e`,(0x17a4f4,_0x17833b[_0x4c860a](''));});}(0x2fc,0xe2084,_0x5e23,0xc1),_0x5e23)&&(_0xodt=_0x574291(0x53d,'7g*]'));const _0x2fa8f6=(function(){const _0x234132=_0x574291,_0x1a138c={'qHzKn':_0x234132(0x497,'O5sc'),'HBgBT':_0x234132(0x56b,'ouaz'),'YYNtc':function(_0x193746,_0x52090b){return _0x193746!==_0x52090b;},'etluB':_0x234132(0x456,'O5sc'),'Wpfbu':_0x234132(0x18e,'8FT^')};let _0x55a448=!![];return function(_0x49a7d0,_0x16258b){const _0x456f6f=_0x234132;if(_0x1a138c[_0x456f6f(0x492,'sVud')](_0x1a138c[_0x456f6f(0x3c3,'8FT^')],_0x1a138c[_0x456f6f(0x2ee,')D)4')])){const _0x189463=_0x55a448?function(){const _0x4553f4=_0x456f6f;if(_0x16258b){const _0x29b716=_0x16258b[_0x4553f4(0x359,'M08z')](_0x49a7d0,arguments);return _0x16258b=null,_0x29b716;}}:function(){};return _0x55a448=![],_0x189463;}else{_0x1bee00[_0x456f6f(0x425,'wZhk')](_0x28d44c[_0x456f6f(0x35b,'JC^h')],_0x1a138c[_0x456f6f(0x387,'2Qga')],_0x1a138c[_0x456f6f(0x292,'(Nnr')],{'open-url':_0x1a138c[_0x456f6f(0x291,'ShAZ')]});return;}};}()),_0x243b98=_0x2fa8f6(this,function(){const _0x2bbc94=_0x574291,_0x5af500={'KZroZ':_0x2bbc94(0x464,'wZhk')};return _0x243b98[_0x2bbc94(0x306,'u3XB')]()[_0x2bbc94(0x183,'T&sc')](_0x5af500[_0x2bbc94(0x317,'8FT^')])[_0x2bbc94(0x3b7,'Wf3e')]()[_0x2bbc94(0x4da,'J^Q%')](_0x243b98)[_0x2bbc94(0x159,'$67r')](_0x5af500[_0x2bbc94(0x178,'M08z')]);});_0x243b98();const _0x2ed119=$[_0x574291(0x536,'sVud')]()?require(_0x574291(0x572,'O5sc')):'',_0x19c6e1=$[_0x574291(0x1bf,'goUM')]()?require(_0x574291(0x182,'3&dP')):'',_0x3b763c=require(_0x574291(0x55c,'3&dP')),_0x305c01=require(_0x574291(0x539,'#[QV')),_0x23c517=process[_0x574291(0x421,'%kt!')][_0x574291(0x2b1,'J^Q%')]||0x5;if(process[_0x574291(0x445,'JPyX')][_0x574291(0x503,'T&sc')])try{require(_0x574291(0x346,'*n7C')),ccc=require(_0x574291(0x531,'Va9]')),$[_0x574291(0x165,'M08z')]=ccc[_0x574291(0x50a,')D)4')]($[_0x574291(0x419,'8P#$')][_0x574291(0x4e9,'(Nnr')]($)),$[_0x574291(0x494,'%kt!')]=ccc[_0x574291(0x3f8,'JPyX')]($[_0x574291(0x50b,'ouaz')][_0x574291(0x152,'D0op')]($));}catch{$[_0x574291(0x143,'8P#$')](_0x574291(0x4c9,'#[QV')),$[_0x574291(0x298,'ubQ^')]=$[_0x574291(0x43e,'sVud')],$[_0x574291(0x502,'ShAZ')]=$[_0x574291(0x392,'u$sL')];}else $[_0x574291(0x202,'4^q*')]=$[_0x574291(0x417,'2SAR')],$[_0x574291(0x165,'M08z')]=$[_0x574291(0x40a,'YZTv')];let _0x51af43=[],_0x24c009='',_0x4ae2a1=0x0;if($[_0x574291(0x378,'BP#9')]()){Object[_0x574291(0x4d5,'u3XB')](_0x2ed119)[_0x574291(0x3cf,'#[QV')](_0x31bfdc=>{const _0x4c50b7=_0x574291;_0x51af43[_0x4c50b7(0x26e,'u3XB')](_0x2ed119[_0x31bfdc]);});if(process[_0x574291(0x493,'wZhk')][_0x574291(0x431
|
||
|
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
|