mirror of
https://github.com/6dylan6/jdpro.git
synced 2026-11-06 04:16:42 +08:00
1
This commit is contained in:
1 parent
0381fb645b
commit
7fb7cb4bdd
1 file changed
+7
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
cron: 6 8,16 * * *
|
||||
*/
|
||||
|
||||
const $ = new Env('互动游戏赚豆');
|
||||
var p8aPJMS,WSazKYn,gn8tH0,tmpVuRg,Kpyw2C,Id5uc0,IcXIUFs,vfVsdFt,YvAZeM,IbS_Ru1,hJ0T7Db,uYHGVF,rAoEYq;function sYg2Im(WSazKYn,gn8tH0,tmpVuRg){for(tmpVuRg=0x0;tmpVuRg<gn8tH0;tmpVuRg++)WSazKYn.push(WSazKYn.shift());return WSazKYn}const wEO67C=sYg2Im([0x9,0xffff,0x162,0x163,0x164,0x165,0x167,0x168,0x169,0x16a,0x16b,0x16c,0x17c,0x7530,0x28,0x19c,0x1a7,0x0,null,0x20,0x2,0x1,0x100,0x6,0x3,0x8,0x10,0x4,"undefined","LZString",0xff,0x7,0xd,0xe,0xf,0x58,0x5b,0x160,0x80,0x7f,0xdf,0x1f,0x3f,0xef,0xc,0x166,0x12,0x15c,0x1fff,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,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,!0x1,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,"UA",0xc9,0xca,0xcb,0xcc,0xcd,0xce," ",0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,"\u8D26\u53F7",0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,!0x0,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xa,0xfd,0x1f4,0x3e8,0xfe,0x101,0x102,0x103,0x104,0x105,0x106,0x107,0x108,0x109,0x10a,0x10b,"\u3010",0x10c,0x10d,0x10e,0x10f,0x9c4,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,0x153,0x154,0x155,0x156,0x157,0x158,0x159,0x15a,0x15b,0x15d,0x15e,0x200,0x15f,0x161,0x3ff,0x5,0x18,0x16,0xb,0x19,0x11,0x13,0x1c,0x22,0x27,0x29,0x3d,0x40],0x11);KdntUo(p8aPJMS=function(){var WSazKYn=String.fromCharCode,gn8tH0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",tmpVuRg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",Kpyw2C={},Id5uc0;function IcXIUFs(Id5uc0,IcXIUFs){if(!Kpyw2C[Id5uc0]){var vfVsdFt;Kpyw2C[Id5uc0]={};for(vfVsdFt=wEO67C[0x0];vfVsdFt<Id5uc0.length;vfVsdFt++)Kpyw2C[Id5uc0][Id5uc0.charAt(vfVsdFt)]=vfVsdFt}return Kpyw2C[Id5uc0][IcXIUFs]}Id5uc0={compressToBase64:function(Kpyw2C){var IcXIUFs;if(wEO67C[0x1]==Kpyw2C)return"";IcXIUFs=Id5uc0._compress(Kpyw2C,wEO67C[0x6],function(IcXIUFs){return gn8tH0.charAt(IcXIUFs)});switch(IcXIUFs.length%wEO67C[0xa]){default:case wEO67C[0x0]:return IcXIUFs;case wEO67C[0x4]:return IcXIUFs+"===";case wEO67C[0x3]:return IcXIUFs+"==";case wEO67C[0x7]:return IcXIUFs+"="}},decompressFromBase64:function(Kpyw2C){return wEO67C[0x1]==Kpyw2C?"":""==Kpyw2C?wEO67C[0x1]:Id5uc0._decompress(Kpyw2C.length,wEO67C[0x2],function(Id5uc0){return IcXIUFs(gn8tH0,Kpyw2C.charAt(Id5uc0))})},compressToUTF16:function(tmpVuRg){return wEO67C[0x1]==tmpVuRg?"":Id5uc0._compress(tmpVuRg,wEO67C[0x11],function(Kpyw2C){return WSazKYn(Kpyw2C+wEO67C[0x2])})+wEO67C[0x81]},decompressFromUTF16:function(tmpVuRg){return wEO67C[0x1]==tmpVuRg?"":""==tmpVuRg?wEO67C[0x1]:Id5uc0._decompress(tmpVuRg.length,0x4000,function(Kpyw2C){return tmpVuRg.charCodeAt(Kpyw2C)-wEO67C[0x2]})},compressToUint8Array:function(vfVsdFt){for(var YvAZeM=Id5uc0.compress(vfVsdFt),IbS_Ru1=new Uint8Array(wEO67C[0x3]*YvAZeM.length),hJ0T7Db=wEO67C[0x0],uYHGVF=YvAZeM.length;hJ0T7Db<uYHGVF;hJ0T7Db++){var rAoEYq=YvAZeM.charCodeAt(hJ0T7Db);KdntUo(IbS_Ru1[wEO67C[0x3]*hJ0T7Db]=rAoEYq>>>wEO67C[0x8],IbS_Ru1[wEO67C[0x3]*hJ0T7Db+wEO67C[0x4]]=rAoEYq%wEO67C[0x5])}return IbS_Ru1},decompressFromUint8Array:function(vfVsdFt){var YvAZeM;if(wEO67C[0x1]==vfVsdFt)return Id5uc0.decompress(vfVsdFt);for(var IbS_Ru1=new Array(vfVsdFt.length/wEO67C[0x3]),hJ0T7Db=wEO67C[0x0],uYHGVF=IbS_Ru1.length;hJ0T7Db<uYHGVF;hJ0T7Db++)IbS_Ru1[hJ0T7Db]=wEO67C[0x5]*vfVsdFt[wEO67C[0x3]*hJ0T7Db]+vfVsdFt[wEO67C[0x3]*hJ0T7Db+wEO67C[0x4]];YvAZeM=[];return IbS_Ru1.forEach(function(IbS_Ru1){YvAZeM.push(WSazKYn(IbS_Ru1))}),Id5uc0.decompress(YvAZeM.join(""))},compressToEncodedURIComponent:function(gn8tH0){return wEO67C[0x1]==gn8tH0?"":Id5uc0._compress(gn8tH0,wEO67C[0x6],function(Kpyw2C){return tmpVuRg.charAt(Kpyw2C)})},decompressFromEncodedURIComponent:function(Kpyw2C){return wEO67C[0x1]==Kpyw2C?"":""==Kpyw2C?wEO67C[0x1]:(Kpyw2C=Kpyw2C.replace(/ /g,"+"),Id5uc0._decompress(Kpyw2C.length,wEO67C[0x2],function(Id5uc0){return IcXIUFs(tmpVuRg,Kpyw2C.charAt(Id5uc0))}))},compress:function(tmpVuRg){return Id5uc0._compress(tmpVuRg,wEO67C[0x9],function(Kpyw2C){return WSazKYn(Kpyw2C)})},_compress:function(vfVsdFt,YvAZeM,IbS_Ru1){if(wEO67C[0x1]==vfVsdFt)return"";var hJ0T7Db,uYHGVF,rAoEYq,sYg2Im={},C1uX5Y={},FcRRpmp="",qiGs1v="",vWb_JXh="",olol_v9=wEO67C[0x3],mg6veq5=wEO67C[0x7],jVqiudl=wEO67C[0x3],heBg1sw=[],KPZsbqr=wEO67C[0x0],i3SceW=wEO67C[0x0];for(rAoEYq=wEO67C[0x0];rAoEYq<vfVsdFt.length;rAoEYq+=wEO67C[0x4]Line 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 || rLine truncated
|
||||
Reference in new issue
Block a user