jdpro/jd_opencard0916.js

7 lines
171 KiB
JavaScript
Raw Normal View History

2024-09-16 14:33:45 +00:00
/*
0 0 16 9 * jd_opencard0916.js
*/
const $ = new Env('9.16-9.26 无惧换季 安稳过秋');
function _0x7B099E(){}var _0x00DA30D=Object['defineProperty'],_0x1FE2CC,_0xE007DA8,_0x3344C8D,_0xEFE213,_0xB8F40F8,_0x9BFFEF,_0x9CAADC,_0xDB13E0C,_0x892149,_0x18CD5B7,_0xDF3CC90,_0x189711F,_0x37CF1E,_0xCFAD83,_0x5854E2,_0x9302E1,_0x03FD0AB,_0x759DED9,_0xF0D6B2,_0xE58AD0,_0x6970901,_0xA9AAC6;function _0xB12FB29(_0x7B099E){return _0x1FE2CC[_0x7B099E<-0x46?_0x7B099E-0xe:_0x7B099E<0x167?_0x7B099E+0x45:_0x7B099E+0x4c]}_0x1FE2CC=_0x6E0E28();function _0x15A9FB5(_0x7B099E,_0x00DA30D){_0xE007DA8(_0x7B099E,_0xB12FB29(-0x3),{value:_0x00DA30D,configurable:!0x0});return _0x7B099E}_0x7B099E(_0xE007DA8=Object.defineProperty,_0x3344C8D=_0x931AE04((_0x7B099E,_0x00DA30D)=>{return _0x00DA30D(_0x7B099E())},0x2)(_0xFA3A67,_0x403413));var _0xDF18D4=[],_0x092C262=[_0x45C78E(_0xB12FB29(-0x19)),_0x45C78E(0x1),_0x45C78E(_0xB12FB29(-0x1b)),_0x45C78E(_0xB12FB29(-0x1c)),_0x45C78E(_0xB12FB29(-0x1d)),_0x45C78E(_0xB12FB29(-0x1e)),_0x45C78E(0x6),_0x45C78E(_0xB12FB29(-0x14)),_0x45C78E(_0xB12FB29(-0x5)),_0x45C78E(_0xB12FB29(-0x2)),_0x45C78E(0xa),_0x45C78E(_0xB12FB29(0x1d)),_0x45C78E(_0xB12FB29(0x17)),_0x45C78E(0xd),_0x45C78E(_0xB12FB29(-0x7)),_0x45C78E(0xf),_0x45C78E(0x10),_0x45C78E(0x11),_0x45C78E(_0xB12FB29(0x34)),_0x45C78E(_0xB12FB29(0x35)),_0x45C78E(0x14),_0x45C78E(0x15),_0x45C78E(0x16),_0x45C78E(_0xB12FB29(-0x45)),_0x45C78E(0x18),_0x45C78E(0x19),_0x45C78E(0x1a),_0x45C78E(0x15),_0x45C78E(_0xB12FB29(-0x44)),_0x45C78E(_0xB12FB29(-0x45)),_0x45C78E(0x1b),_0x45C78E(0x1c),_0x45C78E(0x1d),_0x45C78E(_0xB12FB29(-0x41)),_0x45C78E(_0xB12FB29(-0x43)),'uw8174H@Zj9y$fUT#1&og[nqRq*L(.>m6<[_?1A0D|ko]JdwC]pk)|ouhS,X0><fPI',_0x45C78E(_0xB12FB29(-0x36)),_0x45C78E(0x17),_0x45C78E(0x19),_0x45C78E(_0xB12FB29(0x3)),_0x45C78E(_0xB12FB29(-0xe)),_0x45C78E(_0xB12FB29(0x69)),'PGY^?k,|Q.A>%j1q`I',_0x45C78E(_0xB12FB29(0x93)),_0x45C78E(0x24),_0x45C78E(_0xB12FB29(0x36)),_0x45C78E(_0xB12FB29(-0x44)),_0x45C78E(0x15),_0x45C78E(0x17),_0x45C78E(0x25),_0x45C78E(_0xB12FB29(0x3a)),_0x45C78E(0x27),_0x45C78E(_0xB12FB29(-0xf)),_0x45C78E(0x29),_0x45C78E(0x2a),_0x45C78E(0x1f),_0x45C78E(0x2b),_0x45C78E(0x2c),_0x45C78E(_0xB12FB29(0x4f)),_0x45C78E(0x2e),_0x45C78E(0x2f),_0x45C78E(0x30),_0x45C78E(0x31),_0x45C78E(_0xB12FB29(0x44)),_0x45C78E(_0xB12FB29(0x53)),_0x45C78E(_0xB12FB29(0x84)),_0x45C78E(_0xB12FB29(0x54)),_0x45C78E(_0xB12FB29(0x55)),_0x45C78E(_0xB12FB29(0x83)),_0x45C78E(0x38),_0x45C78E(_0xB12FB29(0xa)),_0x45C78E(_0xB12FB29(0x29)),_0x45C78E(0x3b),_0x45C78E(_0xB12FB29(0x5c)),'8c^Gp$}s9vlf?p.wGN%s9Ma?n;4,G}^^__lpBjN1*>_[CKb8iPv;rzxhG>9jE;DhYX|X%VP6}D^alV|w<rd^)/Hf}5}AhAr@mb+a@.?!d',_0x45C78E(_0xB12FB29(0x5a)),_0x45C78E(0x3e),_0x45C78E(_0xB12FB29(-0x15)),_0x45C78E(0x40),_0x45C78E(0x41),_0x45C78E(0x42),_0x45C78E(0x43),_0x45C78E(_0xB12FB29(0x43)),_0x45C78E(0x45),_0x45C78E(0x46),_0x45C78E(_0xB12FB29(0x0)),_0x45C78E(0x48),_0x45C78E(_0xB12FB29(-0x42)),_0x45C78E(_0xB12FB29(0x6a)),_0x45C78E(0x4b),_0x45C78E(0x4c),_0x45C78E(0x4d),_0x45C78E(0x4e),_0x45C78E(0x4f),_0x45C78E(0x50),_0x45C78E(_0xB12FB29(0x74)),_0x45C78E(_0xB12FB29(-0x23)),_0x45C78E(0x3c),_0x45C78E(_0xB12FB29(0x2b)),_0x45C78E(0x53),_0x45C78E(_0xB12FB29(-0xd)),_0x45C78E(_0xB12FB29(0x19)),_0x45C78E(0x56),_0x45C78E(0x57),_0x45C78E(0x58),'*Po/|aQc',_0x45C78E(0x59),_0x45C78E(_0xB12FB29(0x2)),_0x45C78E(_0xB12FB29(0x32)),_0x45C78E(_0xB12FB29(-0x3e)),'|Pnoh}ec',_0x45C78E(_0xB12FB29(-0x43)),_0x45C78E(_0xB12FB29(0x7d)),_0x45C78E(_0xB12FB29(0x2a)),_0x45C78E(0x5f),_0x45C78E(_0xB12FB29(0x1b)),_0x45C78E(0x1f),_0x45C78E(0x60),_0x45C78E(_0xB12FB29(-0x43)),_0x45C78E(_0xB12FB29(0x7c)),_0x45C78E(0x62),_0x45C78E(0x63),_0x45C78E(_0xB12FB29(0x3e)),'Qd"4n?zb|N+^1C',_0x45C78E(0x1f),_0x45C78E(0x65),_0x45C78E(_0xB12FB29(-0x39)),_0x45C78E(0x1f),_0x45C78E(_0xB12FB29(0x70)),_0x45C78E(0x68),_0x45C78E(0x69),_0x45C78E(_0xB12FB29(-0x43)),_0x45C78E(0x6a),_0x45C78E(0x6b),_0x45C78E(0x6c),_0x45C78E(0x6d),'|Pno.~9a~:aOF@r',_0x45C78E(_0xB12FB29(-0x12)),_0x45C78E(_0xB12FB29(-0x42)),_0x45C78E(0x6f),_0xB12FB29(-0x37),_0x45C78E(0x70),_0x45C78E(0x71),_0x45C78E(0x72),_0x45C78E(0x73),_0x45C78E(0x70),'^xT3{cu4D|{BxtV6aUd^NC98/;cqPvl',_0x45C78E(_0xB12FB29(-0x40)),_0x45C78E(0x72),'|PV/T{sc',_0
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