jdpro/jx_niuniu_merge.js

7 lines
159 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
7 7 7 7 * https://raw.githubusercontent.com/6dylan6/jdpro/main/jx_niuniu_merge.js
跑会黑一周后解循环
*/
const $ = new Env('牛牛乐园合成');
2024-11-26 13:31:12 +00:00
function W6o8Q4(){}var EFN8Il=Object['defineProperty'],bLRlrks,ehO0TO,i3ymqi6,UxOFZTg,tpftIU,Z6DAXY,gosj39e,IIGgnS,i_lKfQ,p7RMOC,PootuV,NY7v1GW,GvHn18W,px3QGS,wTNHJh,t0OUMdT,njitLv,WMunyz,QcKryKL,xSio1Gg;function ZslNUkD(W6o8Q4){return bLRlrks[W6o8Q4>0x39?W6o8Q4>0x39?W6o8Q4>0x135?W6o8Q4-0x16:W6o8Q4-0x3a:W6o8Q4-0x57:W6o8Q4+0x1c]}bLRlrks=Vl0CwA();function xYz5eOS(W6o8Q4,EFN8Il){return ehO0TO(W6o8Q4,'length',{value:EFN8Il,configurable:!0x0})}W6o8Q4(ehO0TO=Object.defineProperty,i3ymqi6=pIN6A_((W6o8Q4,EFN8Il)=>{return EFN8Il(W6o8Q4())},0x2)(mYsACO,C1f3cv));var SVzZx2D=[],yAKsDN=[D279P8u(0x0),D279P8u(0x1),D279P8u(ZslNUkD(0x61)),D279P8u(0x3),D279P8u(ZslNUkD(0x5e)),D279P8u(0x5),D279P8u(ZslNUkD(0x63)),D279P8u(0x7),D279P8u(0x8),D279P8u(0x9),D279P8u(0xa),D279P8u(0xb),D279P8u(ZslNUkD(0x6e)),D279P8u(ZslNUkD(0x6b)),D279P8u(ZslNUkD(0x7a)),D279P8u(0xf),D279P8u(0x10),D279P8u(0x11),D279P8u(0x12),D279P8u(0x13),D279P8u(ZslNUkD(0x81)),D279P8u(0x15),D279P8u(0x14),D279P8u(ZslNUkD(0x84)),D279P8u(0x17),D279P8u(ZslNUkD(0x7d)),D279P8u(ZslNUkD(0x3a)),D279P8u(0x1a),D279P8u(0x1b),D279P8u(0x1c),D279P8u(ZslNUkD(0x64)),D279P8u(0x1e),D279P8u(0x1f),D279P8u(ZslNUkD(0x114)),D279P8u(0x21),D279P8u(0x22),D279P8u(ZslNUkD(0x12d)),D279P8u(0x24),D279P8u(ZslNUkD(0x3a)),D279P8u(0x25),D279P8u(0x26),D279P8u(0x27),D279P8u(ZslNUkD(0x5a)),D279P8u(0x29),D279P8u(0x2a),D279P8u(0x2b),'|$)ak&,(',D279P8u(0x2c),D279P8u(0x2d),D279P8u(0x2e),D279P8u(0x2f),D279P8u(0x30),D279P8u(ZslNUkD(0x3e)),'sI?UM}x8`Np~]3|%RU_+e9Zz6zATkKu$yH9P4U!nDY,+=fJI#=<,wY+scC"qnuH3@:',D279P8u(0x2b),D279P8u(0x31),D279P8u(0x32),D279P8u(ZslNUkD(0x3b)),D279P8u(ZslNUkD(0x40)),D279P8u(0x33),D279P8u(0x34),D279P8u(0x35),D279P8u(0x36),D279P8u(0x7),D279P8u(0x30),D279P8u(0x2f),'|$)ak&,(',D279P8u(0x2c),D279P8u(0x2e),D279P8u(ZslNUkD(0x5b)),'|$)ak&aBi/2^70',D279P8u(0x37),D279P8u(0xe),D279P8u(ZslNUkD(0x6f)),D279P8u(ZslNUkD(0x3c)),D279P8u(0x14),D279P8u(0x38),D279P8u(ZslNUkD(0xa8)),D279P8u(0x3a),D279P8u(0x3b),D279P8u(0x1c),'sI?UM}x8`Np~]3|%',D279P8u(ZslNUkD(0xf1)),D279P8u(0x3d),'&=>.a*a1!2O+S!v.K@Y,|V4vKV',D279P8u(0x2b),D279P8u(0x2d),D279P8u(0x2f),D279P8u(0x30),D279P8u(0x2f),D279P8u(ZslNUkD(0x3b)),D279P8u(0x2b),D279P8u(0x2d),D279P8u(0x2f),D279P8u(0x30),D279P8u(0x2b),D279P8u(ZslNUkD(0x3c)),D279P8u(0x3e),D279P8u(ZslNUkD(0x58)),D279P8u(0x40),D279P8u(0x41),D279P8u(0x42),D279P8u(ZslNUkD(0x3d)),D279P8u(0x44),D279P8u(0x45),D279P8u(0x46),D279P8u(0x47),D279P8u(0x48),D279P8u(0x49),D279P8u(0x4a),D279P8u(0x1c),D279P8u(ZslNUkD(0xa0)),D279P8u(ZslNUkD(0x76)),D279P8u(ZslNUkD(0xa5)),D279P8u(0x4e),D279P8u(0x7),D279P8u(0x4f),D279P8u(ZslNUkD(0x46)),D279P8u(0x51),'|$O{=q6',D279P8u(0x52),D279P8u(0x53),':#+Tb9|D;!{/70',D279P8u(0x54),D279P8u(0x55),D279P8u(ZslNUkD(0x3d)),D279P8u(0x44),D279P8u(0x49),D279P8u(0x56),D279P8u(0x57),'a,D}LaOOSF=de|BU,:','OS!JXTHb|oQ.:',D279P8u(0x58),D279P8u(0x59),D279P8u(0x5a),D279P8u(0x5b),D279P8u(0x5c),D279P8u(0x5d),D279P8u(0x5e),D279P8u(0x5f),D279P8u(ZslNUkD(0x3f)),D279P8u(0x61),D279P8u(0x62),D279P8u(0x63),D279P8u(0x64),D279P8u(0x65),D279P8u(0x66),D279P8u(0x67),'d@;aO;Bz4X0+y|(U8&x',':W"2?_|l',D279P8u(0x68),D279P8u(0x69),D279P8u(0x6a),D279P8u(ZslNUkD(0x56)),D279P8u(ZslNUkD(0xc0)),D279P8u(0x6c),D279P8u(0x6d),D279P8u(0x2f),D279P8u(ZslNUkD(0x3e)),D279P8u(0x6e),D279P8u(0x6f),D279P8u(0x70),D279P8u(0x14),D279P8u(0x1c),D279P8u(0x71),D279P8u(0x72),D279P8u(0x73),D279P8u(0x74),D279P8u(0x75),D279P8u(0x76),D279P8u(0x44),'|$O{=q6',D279P8u(0x53),D279P8u(0x50),D279P8u(0x54),D279P8u(ZslNUkD(0xb0)),D279P8u(ZslNUkD(0x3f)),D279P8u(0x78),D279P8u(0x79),D279P8u(0x61),D279P8u(0x1c),D279P8u(0x7a),D279P8u(0x7b),D279P8u(0x7c),D279P8u(0x71),D279P8u(0x69),D279P8u(0x7b),D279P8u(0x7c),D279P8u(ZslNUkD(0x40)),D279P8u(0x7d),D279P8u(0x7e),D279P8u(0x7),D279P8u(0x7f),D279P8u(0x80),D279P8u(0x22),D279P8u(0x72),D279P8u(0x72),D279P8u(ZslNUkD(0x3e)),D279P8u(0x81),D279P8u(0x82),D279P8u(ZslNUkD(0xab)),D279P8u(0x66),D279P8u(0x60),D279P8u(0x61),D279P8u(ZslNUkD(0x45)),D279P8u(0x85),D279P8u(0x86),'d@;aO;Bz4X0+y|(U8&x',D279P8u(0x87),D279P8u(0x88),D279P8u(0x89),D279P8u(0x7),'nxtTb9|D;!Z/:',D279P8u(ZslNUkD(0x93)),D279P8u(0x8b),D279P8u(0x67),D279P8u(ZslNUkD(0x3f)),D2
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