mirror of https://github.com/6dylan6/jdpro.git
7 lines
166 KiB
JavaScript
7 lines
166 KiB
JavaScript
|
/*
|
||
|
0 0 15 7 * jd_opencard715.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('7.15-7.22 夏日有礼 大牌惊喜');
|
||
|
var _0xodC='jsjiami.com.v7';const _0x4913d3=_0x9ea8;(function(_0x34a152,_0x2522ae,_0x1c93c2,_0xe4ee4a,_0x103ebe,_0x4f8478,_0x537822){return _0x34a152=_0x34a152>>0x6,_0x4f8478='hs',_0x537822='hs',function(_0x292045,_0x381efa,_0xfa5251,_0x270975,_0x1f5bbd){const _0x5f1505=_0x9ea8;_0x270975='tfi',_0x4f8478=_0x270975+_0x4f8478,_0x1f5bbd='up',_0x537822+=_0x1f5bbd,_0x4f8478=_0xfa5251(_0x4f8478),_0x537822=_0xfa5251(_0x537822),_0xfa5251=0x0;const _0x3c25db=_0x292045();while(!![]&&--_0xe4ee4a+_0x381efa){try{_0x270975=parseInt(_0x5f1505(0x8f9,'pP&Y'))/0x1*(parseInt(_0x5f1505(0x5eb,'F#)a'))/0x2)+parseInt(_0x5f1505(0x200,'n%Lg'))/0x3+parseInt(_0x5f1505(0x76d,'@%WL'))/0x4+parseInt(_0x5f1505(0x9d3,'Dpf!'))/0x5+-parseInt(_0x5f1505(0x94c,'GO^*'))/0x6+-parseInt(_0x5f1505(0x24b,'@%WL'))/0x7+-parseInt(_0x5f1505(0x62f,'hqu$'))/0x8;}catch(_0x39bbe5){_0x270975=_0xfa5251;}finally{_0x1f5bbd=_0x3c25db[_0x4f8478]();if(_0x34a152<=_0xe4ee4a)_0xfa5251?_0x103ebe?_0x270975=_0x1f5bbd:_0x103ebe=_0x1f5bbd:_0xfa5251=_0x1f5bbd;else{if(_0xfa5251==_0x103ebe['replace'](/[FPYSqMOlgweRyEuUHV=]/g,'')){if(_0x270975===_0x381efa){_0x3c25db['un'+_0x4f8478](_0x1f5bbd);break;}_0x3c25db[_0x537822](_0x1f5bbd);}}}}}(_0x1c93c2,_0x2522ae,function(_0x41a57e,_0x1d06bd,_0x2e6b47,_0x43c311,_0x49f15a,_0x3d5c86,_0x41df67){return _0x1d06bd='\x73\x70\x6c\x69\x74',_0x41a57e=arguments[0x0],_0x41a57e=_0x41a57e[_0x1d06bd](''),_0x2e6b47=`\x72\x65\x76\x65\x72\x73\x65`,_0x41a57e=_0x41a57e[_0x2e6b47]('\x76'),_0x43c311=`\x6a\x6f\x69\x6e`,(0x178c14,_0x41a57e[_0x43c311](''));});}(0x30c0,0x4121c,_0x41f4,0xc5),_0x41f4)&&(_0xodC=0x24a);const _0x5c8a92=$[_0x4913d3(0x217,'$kLM')]()?require(_0x4913d3(0x78a,'KfkP')):'',_0x364bae=$[_0x4913d3(0x767,'m(yi')]()?require(_0x4913d3(0x7f8,'Q!K%')):'',_0x575be0=require(_0x4913d3(0x448,'HQ%P')),_0x426a79=require(_0x4913d3(0x98f,'O@tm')),_0x446dca=require(_0x4913d3(0x7e3,'CjEP'));if(process[_0x4913d3(0x279,'y7*$')][_0x4913d3(0x49f,'F#)a')])try{require(_0x4913d3(0x932,'n%Lg')),ccc=require(_0x4913d3(0x92b,'5gP#')),$[_0x4913d3(0x188,'fbrL')]=ccc[_0x4913d3(0x99a,'iUnL')]($[_0x4913d3(0x2f2,'pP&Y')][_0x4913d3(0x3da,'*Xqj')]($)),$[_0x4913d3(0x55a,'0yKy')]=ccc[_0x4913d3(0x227,'HQ%P')]($[_0x4913d3(0x65e,'b&iv')][_0x4913d3(0x416,'y7*$')]($));}catch{$[_0x4913d3(0x34d,'$kLM')](_0x4913d3(0x655,'Sm1w')),$[_0x4913d3(0x4b9,'Dpf!')]=$[_0x4913d3(0x1d0,'XXjU')],$[_0x4913d3(0x594,'zwUk')]=$[_0x4913d3(0x790,'KfkP')];}else $[_0x4913d3(0x880,'OHrm')]=$[_0x4913d3(0x97c,'xxzD')],$[_0x4913d3(0x240,'[PbA')]=$[_0x4913d3(0x510,'GO^*')];let _0x28c30d=[],_0x49df74='',_0x1b252a='',_0xc47eb8='',_0x4a7e8e={},_0x249d30=0x0,_0x4e2ee4=process[_0x4913d3(0x71d,'hTUt')][_0x4913d3(0x2b2,'GO^*')]||'',_0x32d0fc=process[_0x4913d3(0x68e,'[PbA')][_0x4913d3(0x171,'2#!B')]||'',_0x2c3a46=process[_0x4913d3(0x1b8,'mU]5')][_0x4913d3(0x1db,'b&iv')+(__filename[_0x4913d3(0x917,'iUnL')](/(\d+\w?).js/)?__filename[_0x4913d3(0x695,'zwUk')](/(\d+\w?).js/)[0x1]:'')+_0x4913d3(0x5c5,'b&iv')]||'',_0x4876b4=process[_0x4913d3(0x203,'zwUk')][_0x4913d3(0x265,'@$)c')]?process[_0x4913d3(0x591,')5VT')][_0x4913d3(0x8c5,'J(q2')]:'',_0x480a94=process[_0x4913d3(0x194,'xxzD')][_0x4913d3(0x4f6,'hqu$')]?process[_0x4913d3(0x1a4,'@$)c')][_0x4913d3(0x6c6,'%#N9')]:'',_0x27d996=_0x4913d3(0x7eb,'U7qp'),_0x177c6c=0x64,_0x14195b=_0x4913d3(0x577,'!hoC');$[_0x4913d3(0x756,'0yKy')]=_0x14195b[_0x4913d3(0x9d8,'m(yi')](/activityId=(.*)&?/)[0x1],$[_0x4913d3(0x1cf,'xGy1')]=_0x14195b[_0x4913d3(0x5c3,'0yKy')](_0x4913d3(0x6ea,'pP&Y'))[0x1]?_0x14195b[_0x4913d3(0x914,'*Xqj')](_0x4913d3(0x584,'LKi$'))[0x1]:_0x4913d3(0x630,'IhzH'),$[_0x4913d3(0x24e,'xxzD')]=![],$[_0x4913d3(0x4c8,'F#)a')]=![],$[_0x4913d3(0x9cd,'Sm1w')]=![],$[_0x4913d3(0x45c,'xxzD')]=0x0,$[_0x4913d3(0x266,'%puA')]=0x0;function _0x9ea8(_0xe7307c,_0x4dd6ab){const _0x2bbbd7=_0x41f4();return _0x9ea8=function(_0x2d7046,_0x19bbf1){_0x2d7046=_0x2d7046-0x170;let _0x41f487=_0x2bbbd7[_0x2d7046];if(_0x9ea8['pAVkTr']===undefined){var _0x9ea815=function(_0x4019a9){const _0xa6144a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3f1535='',_0x24c030='',_0x2bb1ce=_0x3f1535+_0x9ea815
|
||
|
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
|