jdpro/jd_opencard1025.js

7 lines
156 KiB
JavaScript
Raw Normal View History

2024-10-25 06:03:42 +00:00
/*
0 0 25 10 * jd_opencard1025.js
*/
const $ = new Env('10.25-11.2 开门迎礼 放肆嗨购');
function NQYWMW(){}var xzra1l=Object['defineProperty'],SjuPRV5,SokJI_t,TMU2L2r,mft1Lt,LcAVzs,XVr0ytT,GpsvMd,M2zyzq,K2NmhXu,qVCfOY,dgrA5KB,xOY69_7,gyvexZX,v7IHIo,JKaMInH,MxLpY4v,lj06nT,kuL5Oqh,SwaXtul;function sVdKaBn(NQYWMW){return SjuPRV5[NQYWMW>0x175?NQYWMW+0x38:NQYWMW<-0x36?NQYWMW+0x3c:NQYWMW>-0x36?NQYWMW>0x175?NQYWMW-0x16:NQYWMW+0x35:NQYWMW-0x34]}SjuPRV5=amXLF9P();function pwbXvXG(NQYWMW,xzra1l){return SokJI_t.call(sVdKaBn(0x1a),NQYWMW,sVdKaBn(0x2),{value:xzra1l,configurable:!0x0})}NQYWMW(SokJI_t=Object.defineProperty,TMU2L2r=uGl0fM((NQYWMW,xzra1l)=>{return xzra1l(NQYWMW())},0x2)(CGMpOt,rSCeOs));var Urxp0UJ=[],s0v3eW=[dsCmUG(sVdKaBn(-0x4)),dsCmUG(0x1),dsCmUG(0x2),dsCmUG(sVdKaBn(-0x6)),dsCmUG(0x4),dsCmUG(0x5),dsCmUG(0x6),dsCmUG(0x7),dsCmUG(0x8),dsCmUG(0x9),dsCmUG(0xa),dsCmUG(0xb),dsCmUG(sVdKaBn(-0x34)),dsCmUG(sVdKaBn(0x14)),'|cb21x,MDnL!|O(Z<H',dsCmUG(0xe),dsCmUG(0xf),dsCmUG(0x10),dsCmUG(0x11),dsCmUG(0x12),dsCmUG(sVdKaBn(0x27)),dsCmUG(0x10),dsCmUG(sVdKaBn(-0x35)),dsCmUG(sVdKaBn(-0x35)),dsCmUG(0xf),'p.Vo+;cF:@s}Lq{I6o7[5?jJiJf&`PwZ1(?NxoG|3Wh[Be9.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G(0x67),dsCmUG(0x6c),dsCmUG(0x6d),dsCmUG(sVdKaBn(-0x29)),dsCmUG(0x6f),dsCmUG(sVdKaBn(-0x28)),dsCmUG(0x71),dsCmUG(sVdKaBn(-0x31)),dsCmUG(sVdKaBn(-0x1)),dsCmUG(0x51),dsCmUG(0x73),dsCmUG(sVdKaBn(-0x32)),dsCmUG(0x74),dsCmUG(0x51),dsCmUG(0x75),dsCmUG(sVdKaBn(0x20)),dsCmUG(0x15),dsCmUG(sVdKaBn(0x5d)),dsCmUG(0x78),dsCmUG(0x79),'[6bNW|3OvIfxwaB[',dsCmUG(0x7a),dsCmUG(0x7b),dsCmUG(sVdKaBn(-0x12)),dsCmUG(sVdKaBn(-0x10)),dsCmUG(sVdKaBn(0x84)),dsCmUG(sVdKaBn(-0x2f)),dsCmUG(0x75),dsCmUG(0x80),dsCmUG(0x81),dsCmUG(0x82),dsCmUG(0x83),dsCmUG(0x84),dsCmUG(0x85),dsCmUG(0x51),dsCmUG(sVdKaBn(-0x30)),dsCmUG(0x86),dsCmUG(sVdKaBn(-0x1f)),dsCmUG(0x88),'E:lg9f|MM','Tv(o~e|MM','[6[+x|4xD4Z]Aql7D:r6',dsCmUG(0x89),dsCmUG(0x8a),dsCmUG(0x51),dsCmUG(sVdKaBn(-0x30)),'[6[+x|4xD4Z]dn~]U!lV',dsCmUG(0x51),dsCmUG(sVdKaBn(
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