2024-08-06 15:46:44 +00:00
|
|
|
/*
|
2024-08-13 13:45:12 +00:00
|
|
|
25 0,16 * * * jd_global_task_.js
|
2024-08-06 15:46:44 +00:00
|
|
|
*/
|
|
|
|
const $ = new Env('京豆国际频道任务');
|
2024-08-20 00:50:21 +00:00
|
|
|
var _0xodC='jsjiami.com.v7';function _0x357b(_0x52fe3f,_0x2ae216){const _0x438632=_0x3319();return _0x357b=function(_0x417291,_0x277776){_0x417291=_0x417291-0x140;let _0x3319e1=_0x438632[_0x417291];if(_0x357b['XQrxtj']===undefined){var _0x357bce=function(_0x283407){const _0x1d6cb6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xa93cbf='',_0x411854='',_0x3c2288=_0xa93cbf+_0x357bce;for(let _0x2a52a0=0x0,_0x4c7abb,_0x23eb63,_0x13b8f9=0x0;_0x23eb63=_0x283407['charAt'](_0x13b8f9++);~_0x23eb63&&(_0x4c7abb=_0x2a52a0%0x4?_0x4c7abb*0x40+_0x23eb63:_0x23eb63,_0x2a52a0++%0x4)?_0xa93cbf+=_0x3c2288['charCodeAt'](_0x13b8f9+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x4c7abb>>(-0x2*_0x2a52a0&0x6)):_0x2a52a0:0x0){_0x23eb63=_0x1d6cb6['indexOf'](_0x23eb63);}for(let _0x1db3a2=0x0,_0x14783b=_0xa93cbf['length'];_0x1db3a2<_0x14783b;_0x1db3a2++){_0x411854+='%'+('00'+_0xa93cbf['charCodeAt'](_0x1db3a2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x411854);};const _0x5ace9a=function(_0x39438b,_0x58534e){let _0x5f16f9=[],_0x4a8ab1=0x0,_0x48b842,_0x5f4c01='';_0x39438b=_0x357bce(_0x39438b);let _0x28ccfc;for(_0x28ccfc=0x0;_0x28ccfc<0x100;_0x28ccfc++){_0x5f16f9[_0x28ccfc]=_0x28ccfc;}for(_0x28ccfc=0x0;_0x28ccfc<0x100;_0x28ccfc++){_0x4a8ab1=(_0x4a8ab1+_0x5f16f9[_0x28ccfc]+_0x58534e['charCodeAt'](_0x28ccfc%_0x58534e['length']))%0x100,_0x48b842=_0x5f16f9[_0x28ccfc],_0x5f16f9[_0x28ccfc]=_0x5f16f9[_0x4a8ab1],_0x5f16f9[_0x4a8ab1]=_0x48b842;}_0x28ccfc=0x0,_0x4a8ab1=0x0;for(let _0x4bbcdf=0x0;_0x4bbcdf<_0x39438b['length'];_0x4bbcdf++){_0x28ccfc=(_0x28ccfc+0x1)%0x100,_0x4a8ab1=(_0x4a8ab1+_0x5f16f9[_0x28ccfc])%0x100,_0x48b842=_0x5f16f9[_0x28ccfc],_0x5f16f9[_0x28ccfc]=_0x5f16f9[_0x4a8ab1],_0x5f16f9[_0x4a8ab1]=_0x48b842,_0x5f4c01+=String['fromCharCode'](_0x39438b['charCodeAt'](_0x4bbcdf)^_0x5f16f9[(_0x5f16f9[_0x28ccfc]+_0x5f16f9[_0x4a8ab1])%0x100]);}return _0x5f4c01;};_0x357b['CwqudM']=_0x5ace9a,_0x52fe3f=arguments,_0x357b['XQrxtj']=!![];}const _0x33db08=_0x438632[0x0],_0x1a8c74=_0x417291+_0x33db08,_0x812a9d=_0x52fe3f[_0x1a8c74];if(!_0x812a9d){if(_0x357b['cQCWkp']===undefined){const _0x2240c8=function(_0x228d8b){this['YZryNo']=_0x228d8b,this['VNfOeS']=[0x1,0x0,0x0],this['bvfSpc']=function(){return'newState';},this['nhQZfr']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['NYUteC']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x2240c8['prototype']['RhilAy']=function(){const _0x157245=new RegExp(this['nhQZfr']+this['NYUteC']),_0x3de553=_0x157245['test'](this['bvfSpc']['toString']())?--this['VNfOeS'][0x1]:--this['VNfOeS'][0x0];return this['TPpzKf'](_0x3de553);},_0x2240c8['prototype']['TPpzKf']=function(_0x1ea94d){if(!Boolean(~_0x1ea94d))return _0x1ea94d;return this['zCkDQd'](this['YZryNo']);},_0x2240c8['prototype']['zCkDQd']=function(_0x149bfe){for(let _0x2b6f1d=0x0,_0x9829ae=this['VNfOeS']['length'];_0x2b6f1d<_0x9829ae;_0x2b6f1d++){this['VNfOeS']['push'](Math['round'](Math['random']())),_0x9829ae=this['VNfOeS']['length'];}return _0x149bfe(this['VNfOeS'][0x0]);},new _0x2240c8(_0x357b)['RhilAy'](),_0x357b['cQCWkp']=!![];}_0x3319e1=_0x357b['CwqudM'](_0x3319e1,_0x277776),_0x52fe3f[_0x1a8c74]=_0x3319e1;}else _0x3319e1=_0x812a9d;return _0x3319e1;},_0x357b(_0x52fe3f,_0x2ae216);}function _0x3319(){const _0x35f403=(function(){return[...[_0xodC,'BgFjksMBjiJDaqmpTiV.yTJcBfoALkmJD.nrNvw7==','W50OW5O','W4xcGmk/WRu','WQxdK8kyC8oI','5P6p5AYf6kcvCvlcPX5oyZtcJCorW7pdPCkIxquUW73dMos8J+I1Go+8JEAwREAXO+wqHoEuVUs5GoEsPW','lmk4WRVcTa','yYddOSk1pG0pEq','fgxdI8otyG','W7FdOmoDCa','bSkVWPNcPMe','jxfhW6tcTq','wgBdJN8N','rCopW6dcOae','gmoaA8kTW6ZdRSkBW792ase','W7JcMSoEWRtcQW','5P+t5A2a6kovW57cHSk5mmopWONcLxedWPORFw5QW7zLW77KVzpOTQ/VV7ZMLllMSBpLKOtNLP7KU7ZNK5e','W69FWPFdS8o+WOWcWOtdOaW','sColW4SSW70goW','W5tcNCkJWRG6awpdKLG','W7f3y2JdMfjgWQRdRM/dVCksW5LljmoRDfTCzCoa','amkivW','WOpdPmkWD8oRl8kxcZi','ECkAWPPa','DNnMW4mW','CsqEW4BdHW','WQmQnG','W6fTW6NdMdrey2e','mmkPWQ7cLNK','W6q3W5nila','WQldNCkXxmom','deBcLCoE','W5DSvgRdKW','W5uAWPnNWOCWW7WYehVcJcbXpfddSSootf4','cmk1WRdcLeu','g39bW6lcGIRdIGddLq','W7NcOXNcQmoY','WPndWPzRWPW','WPHDWPrGWQGN','xq8pECoc','W4vSW4/dH
|
2024-08-06 15:46:44 +00:00
|
|
|
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); 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((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } 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.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.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) 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(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.d
|