jdpro/jd_lxing_draw.js

7 lines
102 KiB
JavaScript
Raw Normal View History

2024-11-16 12:13:00 +00:00
/*
31 0 * * * jd_lxing_draw.js
*/
const $ = new Env('旅行抽奖');
function ME_RPek(){}var oSBye7=Object['defineProperty'],bB5olfg,hp4ER8E,FjRkMoC,k6Aud9,dhgjjvU,ijJWiE,wecqscr,Id9uYT,fU7Exyv,w5cvyqc,Ja8Evfx,nZB8GSJ,H24tWN5,OPFtMo1,EnGbIHi,oF7aNU3,K9Zcw_M;function koAoHRf(ME_RPek){return bB5olfg[ME_RPek>0x12e?ME_RPek-0x22:ME_RPek>0x27?ME_RPek<0x12e?ME_RPek<0x27?ME_RPek+0x50:ME_RPek-0x28:ME_RPek-0x3b:ME_RPek-0x42]}bB5olfg=uvjF8SE();function uIjMzKl(ME_RPek,oSBye7){hp4ER8E(ME_RPek,koAoHRf(0x44),{value:oSBye7,configurable:!0x0});return ME_RPek}ME_RPek(hp4ER8E=Object.defineProperty,FjRkMoC=uIjMzKl(e38uOy((...oSBye7)=>{ME_RPek(oSBye7.length=0x2,oSBye7[0xb8]=koAoHRf(0x114));return oSBye7[0xb8]>0xd1?oSBye7[-0x5f]:oSBye7[0x1](oSBye7[koAoHRf(0x4a)]())}),0x2)(dJ2g2Hs,KnsS6B));var ercodeG=[],gZKmgxt=[pX_isc(0x0),pX_isc(koAoHRf(0x48)),pX_isc(koAoHRf(0x49)),pX_isc(koAoHRf(0x45)),pX_isc(koAoHRf(0x46)),pX_isc(0x5),pX_isc(0x6),pX_isc(koAoHRf(0x59)),'*|l_&',pX_isc(koAoHRf(0x28)),pX_isc(0x9),pX_isc(koAoHRf(0x70)),pX_isc(koAoHRf(0x34)),pX_isc(0xc),pX_isc(0xd),pX_isc(0xe),pX_isc(koAoHRf(0x42)),pX_isc(koAoHRf(0x72)),pX_isc(koAoHRf(0x76)),pX_isc(0x12),pX_isc(koAoHRf(0x6d)),pX_isc(0x14),pX_isc(koAoHRf(0x28)),pX_isc(0x15),pX_isc(koAoHRf(0x65)),pX_isc(koAoHRf(0x63)),pX_isc(0x18),pX_isc(0x19),pX_isc(0x1a),'Ev=kmRkp|U&^_>',pX_isc(0x1b),pX_isc(0x16),pX_isc(0x19),pX_isc(koAoHRf(0x7e)),pX_isc(koAoHRf(0x30)),pX_isc(0x1b),pX_isc(0x18),pX_isc(0x16),pX_isc(koAoHRf(0x43)),pX_isc(0x1c),pX_isc(koAoHRf(0x58)),pX_isc(koAoHRf(0x87)),pX_isc(0x1f),pX_isc(0x20),pX_isc(0xb),pX_isc(koAoHRf(0x29)),pX_isc(koAoHRf(0x2d)),pX_isc(koAoHRf(0x92)),pX_isc(0x24),pX_isc(koAoHRf(0x91)),pX_isc(0x26),pX_isc(0x27),koAoHRf(0x2a),pX_isc(koAoHRf(0x2c)),pX_isc(0x28),pX_isc(koAoHRf(0x52)),pX_isc(koAoHRf(0x94)),pX_isc(0x2b),pX_isc(0x2c),pX_isc(koAoHRf(0x85)),pX_isc(0x2e),pX_isc(0x2f),pX_isc(koAoHRf(0x37)),pX_isc(0x31),pX_isc(0x32),pX_isc(0x33),pX_isc(koAoHRf(0x95)),pX_isc(koAoHRf(0x9d)),'}RB_?84J&275hEXi:vQt4MmDv:h+r/6u7u4&8N?%HU|Gz.lzTL=>Jo;0QKyEJ)@rdrCZ88ElT|*p+5|TEv0r4{ec!Ud:F',pX_isc(koAoHRf(0x122)),pX_isc(0x37),pX_isc(0x38),pX_isc(koAoHRf(0x29)),pX_isc(0x22),pX_isc(0x39),pX_isc(koAoHRf(0x9b)),koAoHRf(0x2a),pX_isc(0x3b),pX_isc(koAoHRf(0xa0)),pX_isc(0x3d),'EV|O"Bq~M#*','2x|k.Ep8E+8n;EL','2x|k@X|e',pX_isc(0x3e),pX_isc(koAoHRf(0x2b)),pX_isc(0x40),pX_isc(0x41),'EV|O"B|gXS',pX_isc(0x42),pX_isc(0x43),pX_isc(koAoHRf(0x2f)),'2x|kb%#HgY5*8||i)F','2x|k_g7)g+/s1>',pX_isc(koAoHRf(0x4d)),pX_isc(0x3f),pX_isc(0x46),pX_isc(koAoHRf(0x2b)),pX_isc(0x47),pX_isc(0x48),'3DpKkq>x"lZ.9|s',pX_isc(0x49),pX_isc(koAoHRf(0x86)),pX_isc(0x47),pX_isc(koAoHRf(0x9e)),pX_isc(0x40),pX_isc(0x48),pX_isc(koAoHRf(0x9c)),pX_isc(0x22),pX_isc(koAoHRf(0x4c)),pX_isc(koAoHRf(0x2c)),pX_isc(koAoHRf(0x2d)),pX_isc(0x4c),pX_isc(0x4d),'|0!L"6y+',pX_isc(0x4e),pX_isc(0x4f),pX_isc(koAoHRf(0xa7)),'Y|Kkk8f7OfPIF',pX_isc(koAoHRf(0xa6)),pX_isc(koAoHRf(0x32)),pX_isc(0x53),pX_isc(0x54),pX_isc(0x55),pX_isc(0x56),pX_isc(0x57),pX_isc(0x58),pX_isc(koAoHRf(0x2e)),pX_isc(0x5a),pX_isc(koAoHRf(0x8d)),pX_isc(0x5c),pX_isc(koAoHRf(0xaa)),'9R|7',pX_isc(0x5e),pX_isc(0x5f),pX_isc(0x60),pX_isc(0x61),pX_isc(koAoHRf(0xac)),pX_isc(koAoHRf(0xae)),'9R|7',pX_isc(koAoHRf(0xaf)),pX_isc(koAoHRf(0x31)),pX_isc(0x66),pX_isc(koAoHRf(0xb0)),pX_isc(0x68),pX_isc(0x69),pX_isc(koAoHRf(0x78)),'a%S|','9R|7','xh|7',pX_isc(0x6b),koAoHRf(0x3d),pX_isc(koAoHRf(0xe1)),pX_isc(0x6d),pX_isc(koAoHRf(0xa4)),pX_isc(0x6e),'Y|Kkk8f7OfPIF','r|i(#DyjL:_H#xL9)`P',pX_isc(0x52),pX_isc(0x6f),pX_isc(0x54),pX_isc(koAoHRf(0xb5)),pX_isc(koAoHRf(0xb7)),pX_isc(0x72),pX_isc(0x73),pX_isc(koAoHRf(0x2e)),pX_isc(0x74),pX_isc(koAoHRf(0x2f)),pX_isc(0x75),pX_isc(koAoHRf(0x30)),pX_isc(koAoHRf(0x2c)),pX_isc(koAoHRf(0x31)),pX_isc(koAoHRf(0x33)),pX_isc(0x76),pX_isc(koAoHRf(0xb8)),pX_isc(0x78),pX_isc(0x79),pX_isc(0xc),pX_isc(0x7a),pX_isc(koAoHRf(0x7a)),pX_isc(koAoHRf(0x40)),pX_isc(koAoHRf(0x32)),pX_isc(koAoHRf(0x3e)),pX_isc(0x7e),pX_isc(0x7f),pX_isc(koAoHRf(0x54)),pX_isc(0x81),pX_isc(0x82),pX_isc(0x83),pX_isc(0x84),pX_isc(koAoHRf(0x41)),pX_isc(0x86),pX_isc(0xf),pX_isc(0x18),pX_isc(0xc),pX_isc(0x65),pX_isc(koAoHRf(0x33)),pX_isc(koAoHRf(0x35)),pX_isc(0x44),pX_isc(koAoHRf(0x34)),pX
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