mirror of
https://github.com/6dylan6/jdpro.git
synced 2026-11-06 02:56:47 +08:00
1
This commit is contained in:
1 parent
a2ded32eac
commit
d4d0f4f78c
2 files changed
+2
-2
No files matched your search
@@ -2,5 +2,5 @@
|
||||
53 7,15 * * * jd_newfarmlottery.js
|
||||
*/
|
||||
const $ = new Env('新农场幸运转盘');
|
||||
var fFe1fty,zKlEtNr,Sm_bLF0,RZH0VA,znI9uiH,Xp6aao,uwCGVv,x1tBmJ,yjdQewU,rY_2jOH,V60N1u;function z5_kDt(fFe1fty,zKlEtNr,Sm_bLF0){for(Sm_bLF0=0x0;Sm_bLF0<zKlEtNr;Sm_bLF0++)fFe1fty.push(fFe1fty.shift());return fFe1fty}const eWCyRwr=["length",0x1,0x3,"b",0x0,"h",0xd9,"i",0x6,0x5,0x2b,"d",0x8,0xff,"undefined",0x3f,"fromCodePoint",0x7,0xc,"push",0xe0,"c","a","g",0x5b,0x38,0x1fff,0x58,0xd,0xe,0x2,0xa6,0x9,"f",0xcc,0x79,0x61,0xc7,0x7d,0x7e,0x7f,0x80,0x81,!0x1,null,!0x0,0x9c,0x10,0x200,0xf,0x4,0x3ff,0x1f,0x12,0x20,0x18,0xa,0x13,0x40,0xffff,0x67,0x94,0x6a,0xbb,0xbe,0xbd,0xc0,0xc1,"\n",0xb9,0xd5,0xdf,0xde,0xe2,0xdd,0xe1," ",0xef,0xf0,0xf4,"UA",0xf9,0x14,0x9e,"e",0x100,0x69,0x77,0x6d,"=",0x76,";",0xcf,0x86,0x3c,0x11b,0x25,0x121,0x12d,0x126,void 0x0,0xaf,0x96,0x35,0x7d0,0x123,0x11f,0x138,0x139,0xb4,0x144,0xd1,0x14b,0x14c,0x14d,0x14f,0x150,0x149,0x1f4,0x140,0x74,0x16a,0x16b,0x16c,0x16d,0x36,0x51,0x9a,0x53,0x178,0x17d,0x17e,0x17f,0x182,0x183,0x16e,0x190,0x191,0x192,0x193,0x197,0x198,"/","0",0x19c,":",0x168,0x1a7,0x1a8,0x1e,0xc8,0x1ab,0x1a9,0x1bc,0x1bd,",","-",0x1c3,"\u3010",0x59,0x1b8,0x1cd,0x1cb,0x1cc,0x1d0,0x1d1,0x1d2,0x3e8,0x1dc,0x1da,0x1df,"\u3010\u7B2C",0x1e2,0x1e7,0x1eb,0x1ed,0x1ee,0x1f2,0x1f3,0x1fd,0x1fe,0x21,0x60,0x1bb,0x202,0x205,0x208,0x20a,0x20c,0x20e,0x20f,0x209,0x1f7,0x1f8,0x1f9,0x1fa,0x221,0x201,0x22a,0x22b,0x234,0x23d,0x23f,0x240,0x241,0x237,0x238,0x239,0x23a,0x246,0x248,0x249,0x227,0x250,0x236,0x261,0x262,0xca,0x167,0x276,0x277,"3",0xc4,0xc6,0x284,"id","1","2",0x268,0x269,0x26b,0xb7,0x2a3,0x2a4,0x2a6,0x2a7,0x2a5,0x2a2,0x2710,0xba,0x2b3,".",0xbf,0x2b9,0x2bb,0x2bd,0x2be,0x2bf,"ua",0x2c0,0x2c7,0x2b2,0x2cc,0x2aa,0x2ac,0x2b0,0x2af,0x2ad,0x2b1,0x2dd,0x2d2,0x2d6,0x2d7,0x2d8,0x2d0,0x2d1,0x2da,0x2e5,0x2d4,0x7530,"?",0x2d3,0x2d9,0x2c1,0x2c2,0x2c3,0x2c4,0x2e1,0x2e2,0x2e3,0x2e4,0x2e6,0x2e7,0x2e8,0x2e9,0x2ea,0x2eb,0x2c9,0x2ca,0x2cb,0x2f0,0x2f8];pPpFk51(jlWE3f(PHKr5rw,eWCyRwr[0x2]),jlWE3f(IA2iBs));function jlWE3f(fFe1fty,zKlEtNr=eWCyRwr[0x1]){Object.defineProperty(fFe1fty,eWCyRwr[0x0],{value:zKlEtNr,configurable:eWCyRwr[0x2b]});return fFe1fty}function IA2iBs(...fFe1fty){pPpFk51(fFe1fty[eWCyRwr[0x0]]=eWCyRwr[0x1],fFe1fty[-eWCyRwr[0x6]]="F78&yb>@Oc_K5G[9|*f2\"l.Ha#:3?0JA,}P]vmB6+1(n{C!Qg;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s&GK[o.g&7iqq@)>s<7]p~:)Rqyk:/J;f,oW],f=Z<;KBOfgc\"%ssb20g7~Fvr*XqB^P8Ffbzju=::J;flioGK\"M<B;Y`6GhTHR1v_\")?1~7vDME*F=v3umHu],|nHq7)8z9WqP>y/c|nS0XTas)!;}vnJAljz5N*h)VyB:qC0xbjp`*)Ww,WTH$*:h~XnG?RTI_t?*6*},+`0wE*6og|HP~macw}jP~TOz(t?*{[E,VPVHgc.jw%m21Ta3_BUPR>QjoGFf7zjuzPVHgcF~|v3*iF","h4C@>vZ4JII]TGLv*iOcMNI!Jl","MmYzs~&#ET8cP#3HSP83<v^@q2BDz;2PxR+;|V`xQqJ30y","N[oxV6t7&/?@^vT0V\"L0[wm]\"G","YZBD(;kxf5hw^v$J(up0OTv58cel@euA:H&,/N_O;zoV3eM:b96;T!mVb","3c]0EVt0y/T#ULD1<zBAn^0)Uz|a!G\"?hTP00]211T(","}&McGN8oY*ZL~uvJ7;.}ihF","xCHcVXox=f","hA4qqE#@aG(","JLine truncated
|
||||
var OvEigh,SLknL4,dxrN7l,VOGVeHZ,BYMmici,dQpx3W,jRVPvzW,WQ6z9EW,co1P0g,b6PUAPS,ssLqeC,ayyLEug,zAs692;const AS8BNW=[0x0,null,0x20,0x2,0x1,0x100,0x6,0x3,0x8,0x10,0x4,"undefined","LZString",0xff,0x7,0xd,0xe,0xf,0x58,0x5b,0x27d,0x80,0x7f,0xdf,0x1f,0x3f,0xef,0xc,0x283,0x12,0x279,0x1fff,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,"=",0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,!0x1,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba," ",0xbb,0xbc,0xbd,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0xc4,"UA",0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf0,0x1f4,0x7d0,0xa,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0x101,0x102,0x103,0x104,0x105,0x106,0x107,0x108,0x109,0x10a,0x10b,0x10c,0x10d,0x10e,0x10f,0x110,0x111,0x112,0x113,0x114,0x115,0x116,0x117,0x118,0x119,0x11a,0x11b,0x11c,0x11d,0x11e,0x11f,0x120,0x121,0x122,0x123,0x124,0x125,0x126,0x127,0x128,0x129,0x12a,0x12b,0x12c,0x12d,0x12e,0x12f,0x130,0x131,0x132,0x133,0x134,0x135,0x136,0x137,0x138,0x139,0x13a,0x13b,0x13c,0x13d,0x13e,0x13f,0x140,0x141,0x142,0x143,0x144,0x145,0x146,0x147,0x148,0x149,0x14a,0x14b,0x14c,0x14d,0x14e,0x14f,0x150,0x151,0x152,"/","0",0x153,0x154,0x155,":",0x156,0x157,0x158,0x159,0x15a,0x15b,"\n",0x15c,0x15d,0x15e,0x15f,0x160,0x161,0x5,0x162,0x163,0x164,0x165,0x166,0x167,0x168,0x169,0x16a,0x16b,0x16c,0x16d,0x16e,0x16f,0x170,0x171,0x172,0x173,0x174,0x175,0x176,0x177,0x178,",",0x179,0x17a,0x17b,"-",0x17c,0x17d,0x17e,0x17f,"\u3010",0x180,0x181,0x182,0x183,0x184,0x185,0x186,0x187,0x188,0x189,0x18a,0x18b,0x18c,"f",0x18d,0x18e,0x18f,0x3c,0x190,0x191,0x192,0x200,0x193,0x194,0x195,0x196,0x3ff,0x18,0x16,0xb,0x19,0x11,0x13,0x1c,0x22,0x27,0x29,0x3d,0x40,0x9,0xffff,0x197,0x198,0x199,0x19a,0x19b,0x19c,0x19d,0x19e,0x19f,0x1a0,0x1a1,0x1a2,0x1a3,0x1a4,0x1a5,0x1a6,0x1a7,0x1a8,0x1a9,"\u3010\u7B2C",0x1aa,0x1ab,0x1ac,0x1ad,0x1ae,0x1af,0x1b0,0x1b1,0x1b2,0x1b3,0x1b4,0x1b5,0x1b6,0x1b7,0x1b8,0x1b9,0x1ba,0x1bb,0x1bc,0x1bd,0x1be,0x1bf,0x1c0,0x1c1,!0x0,0x1c2,0x1c3,0x1c4,0x1c5,0x1c6,0x1c7,0x1c8,0x1c9,0x1ca,0x1cb,0x1cc,0x1cd,0x1ce,0x1cf,0x1d0,0x1d1,0x1d2,0x1d3,0x1d4,0x1d5,0x1d6,0x1d7,0x1d8,0x1d9,0x1da,0x1db,0x1dc,0x1dd,0x1de,0x1df,0x1e0,0x1e1,0x1e2,0x1e3,0x1e4,0x1e5,0x1e6,0x1e7,0x1e8,0x1e9,0x1ea,0x1eb,0x1ec,0x1ed,0x1ee,0x1ef,0x1f0,0x1f1,0x1f2,0x1f3,0x1f5,0x1f6,0x1f7,0x1f8,0x1f9,0x1fa,0x1fb,0x1fc,0x1fd,0x1fe,0x1ff,0x201,0x202,0x203,0x204,0x205,0x206,0x207,0x208,0x209,0x20a,0x20b,0x20c,0x20d,0x20e,0x20f,0x210,0x211,0x212,0x213,0x214,0x215,0x216,0x217,0x218,0x219,0x21a,0x21b,0x21c,0x21d,0x21e,0x21f,0x220,0x221,0x222,0x223,0x224,0x225,0x226,0x227,0x228,0x229,0x22a,0x22b,0x22c,0x22d,0x22e,0x22f,0x230,0x231,0x232,0x233,0x234,0x235,0x236,0x237,0x238,0x239,0x23a,0x23b,0x23c,0x23d,0x23e,0x23f,0x240,0x241,0x242,0x243,0x244,0x245,0x246,0x247,0x248,0x249,0x24a,0x24b,0x24c,0x24d,0x24e,0x24f,0x250,0x251,0x252,0x253,0x64,0x1e,0x254,0x255,0x256,0x257,0x258,0x259,0x25a,".",0x25b,0x25c,0x25d,0x3e8,0x25e,0x25f,0x260,0x261,0x262,0x263,0x264,0x265,0x266,0x267,0x268,0x269,0x26a,0x26b,0x26c,0x26d,0x26e,0x26f,0x270,0x271,0x272,0x273,0x274,0x275,0x276,0x277,0x278,0x27a,0x27b,0x27c,0x27e,0x27f,0x280,0x281,0x282,0x284,0x285,0x286,0x287,0x288,"3",0x289,0x28c,"id","1","2",0x2ad,0x2ae,0x2b0,0x2b1,0x2af,0x2ac,0x2bb,0x2710,0x2cd,0x36363636,0x5c5c5c5c,0xd800,0xdbff,0xdc00,0xdfff,0x10000,0x7ff,0x1fffff,0x428a2f98,0x71374491,0x4a3f0431,0x164a245b,0x3956c25b,0x59f111f1,0x6dc07d5c,0x54e3a12b,0x27f85568,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x7f214e02,0x6423f959,0x3e640e8c,0x1b64963f,0x1041b87a,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x67c1aeae,0x57ce3993,0x4ffcd838,0x40a68039,0x391ff40d,0x2a586eb9,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x7e3d36d2,0x6d8dd37b,0x5d40175f,0x57e599b5,0x3db47490,0x3893ae5d,0x2e6d17e7,0x2966f9dc,0xbf1ca7b,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x7b3787ec,0x7338fdf8,0x6f410006,0x5baf9315,0x41065c09,0x398e870e,0x6a09e667,0x4498517b,0x3c6ef372,0x5ab00ac6,0x510e527f,0x64fa9774,0x1f83d9ab,0x5be0cd19,void 0x0,0x2e2,0x2cc,0x2ea,0x2c2,0x2c4,0x2c8,0x2c7,0x2c5,0x2c9,0x2d7,0x2fa,0x2ef,0x2f3,0x2f4,0x2f5,0x2ed,0x2ee,0x2f7,0x302,0x2f1,0x7530,"?",0x2f0,0x2f6,0x2b2,0x2cf,0x2d0,0x2d1,0x2d3,0x2d4,";",0x2d5,0x2d6,"ua",0x2e4,0x2d8,0x2fe,0x2ff,0x300,0x301,0x303,0x304,0x305,0x306,0x307,0x308,0x2e6,0x2e8,0x2e9,0x30e,0x315];OFYde4(OvEigh=function(){var SLknL4=String.fromCharCode,dxrN7l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",VOGVeHZ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",BYMmici={},dQpx3WLine truncated
|
||||
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.setValueForKey(t,e);case"Node.js":return this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0;default:return this.data&&this.data[e]||null}}initGotEnv(t){this.got=this.got||require("got"),this.cktough=this.cktough||require("tough-cookie"),this.ckjar=this.ckjar||new this.cktough.CookieJar,t&&(t.headers=t.headers||{},t)&&(t.headers=t.headers||{},void 0===t.headers.cookie)&&void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar)}tmout(){return new Promise((t,e)=>{this.tmoutId=setTimeout(()=>{this.prms.cancel(),e({message:"timemout",response:""})},5e4)})}get(t,a=()=>{}){switch(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"],delete t.headers["content-type"],delete t.headers["content-length"]),t.params&&(t.url+="?"+this.queryStr(t.params)),void 0===t.followRedirect||t.followRedirect||((this.isSurge()||this.isLoon())&&(t["auto-redirect"]=!1),this.isQLine truncated
|
||||
+1
-1
@@ -4,5 +4,5 @@
|
||||
|
||||
*/
|
||||
const $ = new Env('新农场浇水');
|
||||
var k7fmS4G,BA7k8IX,pY4WXBJ,Sg_1Ao,WtJZU3,ji1fRDw,KkeqVN,sh959gB,K7PksM,CoTTqRs,mervrJv;function rqKA6Tn(k7fmS4G,BA7k8IX,pY4WXBJ){for(pY4WXBJ=0x0;pY4WXBJ<BA7k8IX;pY4WXBJ++)k7fmS4G.push(k7fmS4G.shift());return k7fmS4G}const V5wJr4=[0x0,0x1,0x8,0xff,"length","undefined",0x3f,0x6,"fromCodePoint",0x7,0xc,"push",0x5b,0x1fff,0x58,0xd,0xe,"b",0xf2,0xc1,"a",0x9,0x1d,0x9a,0xe6,0x3ff,0x3,0x10000,0xc3,0xa,0xd800,0xdc00,0x80,0x6b,0x1f,0xf,0x12,0xc0,"h","i",0x98,"f",0x4,void 0x0,!0x1,0xe0,"c",0xf0,0xbe,"e",0x6a,0x6e,0x6f,0x9d,0x2c,0xf9,"d",0x74,0x16,0xe3,0x95,0x5,0x7f,0x29,"g",0x59,0x85,0x2000000,0x4000000,0x2,!0x0,0x8d,0x9b,0x9c,0x9e,0x81,0x73,0x65,0xda,0xa5,0xa8,0xa7,0xa2,0x1e,"\n",0x2a,0xab,0xad,0xa1,0x22,0x93,0x50,0xc8,0x5c,0xb1,0xd8,0xdf,0x64,0xbc,0xa9,null,0xeb,0xec,0xef,0xf8,0xed,0xea,0xee," ",0x109,"UA",0x10d,0x121,0x123,0xb0,0x90,0x127,0xd1,0x5f,0xd3,0x55,"\u3011",0x92,0x2b,0xa4,0xdb,0x69,0x3c,0x3e8,0xb4,0x42,0x18,"=",";",0x2d,"j","Q",".",0x159,0x15d,0x15f,0x160,0x32,0x15c,0x171,0x172,0x173,0x16f,0x16d,0x16e,0x62,0xdbff,0xfc00,0xffff,0xdfff,0x10,0xffffff80,0xfffff800,0xffff0000,0xffe00000,0xcb,0x17b,0x17c,0x800,0x10ffff,0x16c,0x75,0x163,0x165,0x18a,0x87,0x70,0x34,"\u6B21",0x190,"\u6D47\u6C34",0x192,0x193,0x196,0xf6,0xae,0x4e,0x194,0x82,0x76,0x47,0x31,0x1f4,0x158,0xbd,"1",0xc6,0x1c5,0x1c6,0xd2,0xa6,0x78,0x1b,0xc7,0x1d6,0x1db,0x117,0x1e2,0x1e3,0xc4,0xca,0x1ee,0x1ef,0xbf,0x1f2,0x1f3,0x1f6,0x1fe,0x116,0x204,0x1f9,0x210,0x20c,0x1f5,0x20b,0x206,0x208,0xd5,0x11c,0x220,0x214,0x215,0x22a,0x21a,0x21b,"fn",0x21c,0x21d,0x222,0x223,"ua",0x230,0x232,0x231,0x4f,0x4a,0x23c,"2",0x20a,"fg",0x24a,0x234,0x235,0x236,0x237,0x238,0x229,0x272,0x273,0x264,0x265,0x266,0x267,0x26e,0x26a,0x271,0x274,0x7530,0x27a,0x27b,0x27c,0x27d,0x268,0x269,0x26b,0x287,0x27e,0x27f,0x26c,0x295,0x28e,0x28f,0x2710];function erXFQw(k7fmS4G,BA7k8IX=V5wJr4[0x1]){Object.defineProperty(k7fmS4G,V5wJr4[0x4],{value:BA7k8IX,configurable:V5wJr4[0x2c]});return k7fmS4G}function R4j7Cu(k7fmS4G){var BA7k8IX="1KdHSYoLrNbPQhAeZVs./<|g\"u3qpU?]9nT^}#`OcB,&{0(![)J7:kCX2D4vl$_IG%86+fa@5twRWjmExyz~i*FM>;=",pY4WXBJ,Sg_1Ao,WtJZU3,ji1fRDw,KkeqVN,sh959gB,K7PksM;I01M9rT(pY4WXBJ=""+(k7fmS4G||""),Sg_1Ao=pY4WXBJ.length,WtJZU3=[],ji1fRDw=V5wJr4[0x0],KkeqVN=V5wJr4[0x0],sh959gB=-V5wJr4[0x1]);for(K7PksM=V5wJr4[0x0];K7PksM<Sg_1Ao;K7PksM++){var CoTTqRs=BA7k8IX.indexOf(pY4WXBJ[K7PksM]);if(CoTTqRs===-V5wJr4[0x1])continue;if(sh959gB<V5wJr4[0x0]){sh959gB=CoTTqRs}else{I01M9rT(sh959gB+=CoTTqRs*V5wJr4[0xc],ji1fRDw|=sh959gB<<KkeqVN,KkeqVN+=(sh959gB&V5wJr4[0xd])>V5wJr4[0xe]?V5wJr4[0xf]:V5wJr4[0x10]);do{I01M9rT(WtJZU3.push(ji1fRDw&V5wJr4[0x3]),ji1fRDw>>=V5wJr4[0x2],KkeqVN-=V5wJr4[0x2])}while(KkeqVN>V5wJr4[0x9]);sh959gB=-V5wJr4[0x1]}}if(sh959gB>-V5wJr4[0x1]){WtJZU3.push((ji1fRDw|sh959gB<<KkeqVN)&V5wJr4[0x3])}return CmkEbV(WtJZU3)}function rrGN6ee(pY4WXBJ){if(typeof k7fmS4G[pY4WXBJ]===V5wJr4[0x5]){return k7fmS4G[pY4WXBJ]=R4j7Cu(BA7k8IX[pY4WXBJ])}return k7fmS4G[pY4WXBJ]}I01M9rT(k7fmS4G={},BA7k8IX=rqKA6Tn(["|e~rM]vf[sI:K","#D<bVy$*3rFa#5^`4pWk+fkR]kK!a)$Z(N69u~2F1CaeCu%V}wZm=D[G(2/48yZcWvn5&xLyZs`8Q5p^D+LSEy~fo","#D<bVy$*3rFa#5^`4pWk+fkRo","#3xNU@^.L","N(hb0x1","#D<bVy$*qkM([qG,L#r)2ayVCGC","#D<bVy$*qkM([qG,L#r)2ayVCGG81","[D79vj\"d","+{v`nrjC|5<CXi%x/\"TtIi(sEcaq98s4]YWP*{C#V@YkV_Gx|5cgP,b)+?D4ep5y5<c/vsk59RF/|rgJLZlDHaWFyI2:K",")@wYCj5QRvZz($*B@CF@|@Mgt/{8yxTV1c)C3WnR|G8v&zr3XHd","{w?SD7=c[8Gr($dV6t)qqcLMtV[Vau~q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]yX9FyeHTK","\"lfpbWtIdl6xb33BrIlLx~+41<wK5e^}&T1N","hcMN]@EL1D(XB5<c@+kp9:=(seb5BSsp:[O?+5HR54/h,#8#AlcCA`g.^.#","LCf:J40Lo","0cq5FJ(c;V:^`udV_Amp%kiw\"4>(/~q,z[uq]mPf98ftsAZ/mt+kO*nLYCl","8p>o.~Z(Ze4^Ra4}A(W3g@q!Y","$+V?$54wKN?Vh}.B\"+_)&t|waGQgD5iTX/CLeww?:NtS/vM^w2ECvTUkp_ufK","v[uo5_V!0vEaX~DU>H_pJ#S,H","]+1NKy#^4/EKnZ)Ow%wk#*^y%ID","Mpm]E}Qs]e~j~eo.+,no1(3ra4dC()^?&%wUjyyURvAVN}R.","?T~Yd5MK:N&L&3^s>7d57(euZ8(t{ZNuS@<w^!}?o","]Qjwsfb?!8wa2qmckQFS","v/OpKORI,_~2{!7T","L@bU3tRhzN2aWvjO>[u7!$s}1eb+,#Jcyu$XRy4?{V?5@3eLine truncated
|
||||
var H4w5Jo,gOsc6B_,qVqhqB,S584Ur,Qx2mlxE,nt0QMC,LmY2wyv,uLINPiP,NId6z0,rC3oPk,OhSBJc,MPugWIb,RvXOOx;function WyoRIiD(gOsc6B_,qVqhqB,S584Ur){for(S584Ur=0x0;S584Ur<qVqhqB;S584Ur++)gOsc6B_.push(gOsc6B_.shift());return gOsc6B_}const sYAKTDU=WyoRIiD([0x289,0x27e,0x27f,0x280,0x281,0x284,0x7530,0xd800,0xdbff,0xdc00,0x10000,0xdfff,0x2b9,0x2ba,0x2b5,0x299,0x29a,0x29b,0x29c,0x282,0x283,0x29d,0x29e,0x2d9,0x2cb,0x2710,0x0,null,0x20,0x2,0x1,0x100,0x6,0x3,0x8,0x10,0x4,"undefined","LZString",0xff,0x7,0xd,0xe,0xf,0x58,0x5b,0x256,0x80,0x7f,0xdf,0x1f,0x3f,0xef,0xc,0x25c,0x12,0x252,0x70,0x71,0x1fff,0x72,0x73,0x74,0x75,0x76,!0x1,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0xc8,0x94,0x95,0x96,0x97,!0x0,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb," ",0xec,0xed,0xee,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,"UA",0xfb,0xfc,0xfd,0xfe,0xa,0x101,0x102,0x103,0x104,0x105,0x106,0x107,0x108,0x109,0x10a,0x10b,0x10c,0x10d,0x10e,0x10f,0x110,0x5,0x111,0x112,0x113,0x114,0x115,0x116,0x117,0x118,0x119,0x11a,"\u3011",0x11b,0x11c,0x11d,0x11e,0x11f,0x120,0x121,0x122,0x123,0x124,0x125,0x126,0x127,0x128,0x129,"\n",0x12a,0x12b,0x12c,0x12d,0x12e,0x12f,0x130,0x131,0x132,0x133,0x134,0x135,0x136,0x137,0x138,0x139,0x13a,0x13b,0x13c,0x13d,0x13e,0x13f,0x140,0x141,0x64,0x142,0x143,0x144,0x145,0x146,0x147,0x148,0x149,0x14a,0x14b,0x14c,0x14d,0x14e,0x14f,0x150,0x151,0x152,0x153,0x154,0x155,0x156,0x157,0x158,0x159,0x15a,0x15b,0x15c,0x15d,0x15e,0x15f,0x160,0x161,"\u6B21",0x162,0x163,0x164,"\u6D47\u6C34",0x165,0x166,0x167,0x168,0x169,0x16a,0x16b,0x16c,0x16d,0x16e,0x16f,0x170,0x171,0x172,0x173,0x174,0x175,0x176,0x177,0x178,0x179,0x1f4,0x17a,0x17b,0x17c,0x17d,0x17e,0x17f,0x180,0x181,0x182,0x183,0x184,0x185,0x186,0x187,0x188,0x189,0x18a,0x18,0x3c,0x3e8,0x18b,"=",0x18c,0x18d,0x18e,0x18f,0x190,0x191,0x192,0x193,"1",0x194,0x195,0x196,0x197,0x198,0x199,0x19a,0x19b,0x19c,0x19d,0x19e,0x19f,0x1a0,0x1a1,0x1a2,0x1a3,0x1a4,0x1a5,0x1a6,0x1a7,0x1a8,0x1a9,0x1aa,0x1ab,0x1ac,0x1ad,0x1ae,0x1af,0x1b0,0x1b1,0x1b2,0x1b3,0x1b4,0x1b5,0x1b6,0x1b7,0x1b8,0x1b9,0x1e,0x1ba,0x1bb,0x1bc,0x1bd,0x1be,0x1bf,0x1c0,0x1c1,0x1c2,0x1c3,0x1c4,0x1c5,0x1c6,0x1c7,0x1c8,0x1c9,0x1ca,0x1cb,0x1cc,0x1cd,0x1ce,0x1cf,0x1d0,0x1d1,0x1d2,0x1d3,0x1d4,0x1d5,0x1d6,0x1d7,0x1d8,0x1d9,0x1da,0x1db,0x1dc,0x1dd,0x1de,0x1df,0x1e0,0x1e1,0x1e2,0x1e3,0x1e4,0x1e5,0x1e6,0x1e7,0x1e8,0x1e9,0x1ea,0x1eb,0x1ec,0x1ed,0x1ee,0x1ef,0x1f0,0x1f1,0x1f2,0x1f3,0x1f5,0x1f6,0x1f7,0x1f8,0x1f9,0x1fa,0x1fb,0x1fc,0x1fd,0x1fe,0x1ff,0x200,0x201,0x202,0x203,0x204,0x205,0x206,0x207,0x208,0x209,0x20a,0x20b,0x20c,0x20d,0x20e,0x20f,0x210,0x211,0x212,0x213,0x214,0x215,0x216,0x217,0x218,0x219,0x21a,0x21b,0x21c,0x21d,0x21e,0x21f,0x220,";",0x221,0x222,0x223,0x224,0x225,0x226,0x227,0x228,0x229,0x22a,0x22b,0x22c,0x22d,0x22e,0x22f,0x230,0x231,0x232,0x233,0x234,0x235,0x236,0x237,0x238,0x239,0x23a,0x3ff,0x16,0xb,0x19,0x11,0x13,0x1c,0x22,0x27,0x29,0x3d,0x40,0x9,0xffff,0x23b,0x23c,0x23d,0x23e,0x23f,0x240,0x241,0x242,0x243,0x244,0x245,0x246,0x247,0x248,"ua",0x249,0x24a,0x24b,0x24c,0x24d,0x24e,0x24f,0x250,0x251,0x253,0x254,0x255,0x257,"2",0x258,0x259,0x25a,0x25b,0x25d,0x25e,0x25f,0x260,0x261,0x262,"fn","fg",0x26d,0x263,0x10001],0x1a);dOmVA3X(H4w5Jo=function(){var gOsc6B_=String.fromCharCode,qVqhqB="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",S584Ur="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",Qx2mlxE={},nt0QMC;function LmY2wyv(nt0QMC,LmY2wyv){if(!Qx2mlxE[nt0QMC]){var uLINPiP;Qx2mlxE[nt0QMC]={};for(uLINPiP=sYAKTDU[0x0];uLINPiP<nt0QMC.length;uLINPiP++)Qx2mlxE[nt0QMC][nt0QMC.charAt(uLINPiP)]=uLINPiP}return Qx2mlxE[nt0QMC][LmY2wyv]}nt0QMC={compressToBase64:function(Qx2mlxE){var LmY2wyv;if(sYAKTDU[0x1]==Qx2mlxE)return"";LmY2wyv=nt0QMC._compress(Qx2mlxE,sYAKTDU[0x6],function(LmY2wyv){return qVqhqB.charAt(LmY2wyv)});switch(LmY2wyv.length%sYAKTDU[0xa]){default:case sYAKTDU[0x0]:return LmY2wyv;case sYAKTDU[0x4]:return LmY2wyv+"===";case sYAKTDU[0x3]:return LmY2wyv+"==";case sYAKTDU[0x7]:return LmY2wyv+sYAKTDU[0x145]}},decompressFromBase64:function(Qx2mlxE){return sYAKTDU[0x1]==Qx2mlxE?"":""==Qx2mlxE?sYAKTDU[0x1]:nt0QMC._decompress(Qx2mlxE.length,sYAKTDU[0x2],function(nt0QMC){return LmY2wyv(qVqhqB,Qx2mlxE.charAt(nt0QMC))})},compressToUTF16:function(S584Ur){return sYAKTDU[0x1]==S584Ur?"":nt0QMC._compress(S584Ur,sYAKTDU[0x11],function(Qx2mlxE){return gOsc6B_(Qx2mlxE+sYAKTDU[0x2])})+sYAKTDU[0x9b]},decompressFromUTF16:function(S584Ur){return sYAKTDU[0x1]==S584Ur?"":""==S584Ur?sYAKTDU[0x1]:nt0QMC._decompress(S584Ur.length,0x4000,function(Qx2mlxE){return S584Ur.charCodeAt(Qx2mlxLine truncated
|
||||
function Env(o, e) { class s { constructor(e) { this.env = e } send(e, t = "GET") { e = "string" == typeof e ? { url: e } : e; let s = this.get; return "POST" === t && (s = this.post), new Promise((i, r) => { s.call(this, e, (e, t, s) => { e ? r(e) : i(t) }) }) } get(e) { return this.send.call(this.env, e) } post(e) { return this.send.call(this.env, e, "POST") } } return new class { constructor(e, t) { 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 = e, 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, t), 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(e, t = null) { try { return JSON.parse(e) } catch { return t } } toStr(e, t = null, ...s) { try { return JSON.stringify(e, ...s) } catch { return t } } getjson(e, t) { let s = t; if (this.getdata(e)) try { s = JSON.parse(this.getdata(e)) } catch { } return s } setjson(e, t) { try { return this.setdata(JSON.stringify(e), t) } catch { return !1 } } getScript(e) { return new Promise(i => { this.get({ url: e }, (e, t, s) => i(s)) }) } runScript(a, o) { return new Promise(i => { let e = this.getdata("@chavy_boxjs_userCfgs.httpapi"); e = e && e.replace(/\n/g, "").trim(); var t = (t = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +t : 20, [s, r] = (t = o && o.timeout ? o.timeout : t, e.split("@")); this.post({ url: `http://${r}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: t }, headers: { "X-Key": s, Accept: "*/*" }, timeout: t }, (e, t, s) => i(s)) }).catch(e => this.logErr(e)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var e = this.path.resolve(this.dataFile), t = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(e), i = !s && this.fs.existsSync(t); if (!s && !i) return {}; i = s ? e : t; try { return JSON.parse(this.fs.readFileSync(i)) } catch (e) { return {} } } writedata() { var e, t, s, i, r; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), e = this.path.resolve(this.dataFile), t = this.path.resolve(process.cwd(), this.dataFile), i = !(s = this.fs.existsSync(e)) && this.fs.existsSync(t), r = JSON.stringify(this.data), !s && i ? this.fs.writeFileSync(t, r) : this.fs.writeFileSync(e, r)) } lodash_get(e, t, s) { let i = e; for (const e of t.replace(/\[(\d+)\]/g, ".$1").split(".")) if (i = Object(i)[e], void 0 === i) return s; return i } lodash_set(e, i, t) { return Object(e) === e && ((i = Array.isArray(i) ? i : i.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((e, t, s) => Object(e[t]) === e[t] ? e[t] : e[t] = Math.abs(i[s + 1]) >> 0 == +i[s + 1] ? [] : {}, e)[i[i.length - 1]] = t), e } getdata(e) { let t = this.getval(e); if (/^@/.test(e)) { var [, s, i] = /^@(.*?)\.(.*?)$/.exec(e), s = s ? this.getval(s) : ""; if (s) try { const e = JSON.parse(s); t = e ? this.lodash_get(e, i, "") : t } catch (e) { t = "" } } return t } setdata(e, t) { let s = !1; if (/^@/.test(t)) { var [, i, r] = /^@(.*?)\.(.*?)$/.exec(t), a = this.getval(i), a = i ? "null" === a ? null : a || "{}" : "{}"; try { const t = JSON.parse(a); this.lodash_set(t, r, e), s = this.setval(JSON.stringify(t), i) } catch (t) { a = {}; this.lodash_set(a, r, e), s = this.setval(JSON.stringify(a), i) } } else s = this.setval(e, t); return s } getval(e) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": return $persistentStore.read(e); case "Quantumult X": return $prefs.valueForKey(e); case "Node.js": return this.data = this.loaddata(), this.data[e]; default: return this.data && this.data[e] || null } } setval(e, t) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": return $persistentStore.write(e, t); case "Quantumult X": return $prefs.setValueForKey(e, t); case "Node.js": return this.data = this.loaddata(), this.data[t] = e, this.writedata(), !0; default: return this.data && this.data[t] || null } } initGotEnv(e) { this.got = this.goLine truncated
|
||||
Reference in new issue
Block a user