mirror of https://github.com/6dylan6/jdpro.git
6 lines
78 KiB
JavaScript
6 lines
78 KiB
JavaScript
|
/*
|
||
|
15 0,15 * * * jd_global_task_.js
|
||
|
*/
|
||
|
const $ = new Env('京豆国际频道任务');
|
||
|
var _0xodH='jsjiami.com.v7';const _0x3a6f3b=_0x5a4d;(function(_0x5aeb76,_0x25cf83,_0x34d69d,_0x174dd4,_0x4d7c94,_0x1e9b5c,_0x125341){return _0x5aeb76=_0x5aeb76>>0x9,_0x1e9b5c='hs',_0x125341='hs',function(_0x1070c7,_0x4934ef,_0x43b2c0,_0x5348e4,_0x192783){const _0x5911ed=_0x5a4d;_0x5348e4='tfi',_0x1e9b5c=_0x5348e4+_0x1e9b5c,_0x192783='up',_0x125341+=_0x192783,_0x1e9b5c=_0x43b2c0(_0x1e9b5c),_0x125341=_0x43b2c0(_0x125341),_0x43b2c0=0x0;const _0x2391fb=_0x1070c7();while(!![]&&--_0x174dd4+_0x4934ef){try{_0x5348e4=-parseInt(_0x5911ed(0x427,'sfTb'))/0x1+-parseInt(_0x5911ed(0x210,'4eed'))/0x2+-parseInt(_0x5911ed(0x4bb,'^#dR'))/0x3*(-parseInt(_0x5911ed(0x518,'0U7$'))/0x4)+-parseInt(_0x5911ed(0x3e2,'Cywx'))/0x5+parseInt(_0x5911ed(0x35a,'0U7$'))/0x6+-parseInt(_0x5911ed(0x23b,'1BVA'))/0x7+parseInt(_0x5911ed(0x283,'b&[&'))/0x8;}catch(_0x3174d7){_0x5348e4=_0x43b2c0;}finally{_0x192783=_0x2391fb[_0x1e9b5c]();if(_0x5aeb76<=_0x174dd4)_0x43b2c0?_0x4d7c94?_0x5348e4=_0x192783:_0x4d7c94=_0x192783:_0x43b2c0=_0x192783;else{if(_0x43b2c0==_0x4d7c94['replace'](/[dXNRVnDBWSYUEJMfI=]/g,'')){if(_0x5348e4===_0x4934ef){_0x2391fb['un'+_0x1e9b5c](_0x192783);break;}_0x2391fb[_0x125341](_0x192783);}}}}}(_0x34d69d,_0x25cf83,function(_0x259ae7,_0x32b611,_0x236b6f,_0xd27148,_0x14f3f5,_0x748a43,_0x2bd137){return _0x32b611='\x73\x70\x6c\x69\x74',_0x259ae7=arguments[0x0],_0x259ae7=_0x259ae7[_0x32b611](''),_0x236b6f=`\x72\x65\x76\x65\x72\x73\x65`,_0x259ae7=_0x259ae7[_0x236b6f]('\x76'),_0xd27148=`\x6a\x6f\x69\x6e`,(0x17cba2,_0x259ae7[_0xd27148](''));});}(0x17800,0x4f7bc,_0xa5db,0xbe),_0xa5db)&&(_0xodH=0x296);function _0xa5db(){const _0xa939d3=(function(){return[...[_0xodH,'XWMjRsdNfjiSSaRJmiU.cVnJomID.EYv7BIRDVMJ==','WRekW5ldUIVcMG','iH44tmo4hCoF','WRuxW7KRW4lcM8o6Fc8+','WQ4rW4FdLJFcJ1ZcLmoh','vSoEeSoJEq','W4KtW7hcHmklW6tcNCkxkHtcTSoqW7X+kKSpWPOQjSkRmuNcQLJcKCouggldRwyAhfRdG0xdVCkNsY/cVCoXbhmihCknySobASkYW6WFW69ExJvBW7ldPG','bCkzySkmWO3cH3TQW7BdG1pcTmkpEG','wCoQsSoz','yfq4smoz','W63cJ8ogWPu','WQicW7G8W7G','W7ddHHddSwq','W6/cKmosWPLcWRSBW7yPW6L9CJBdPripmCoAmgNdNmo/W6RcV8k4WP5ns8kjzmoBW5xdVmkEW7VcM8kaWPeczSoFwZddMJVcISkDWQbbFmkmvSorvhVcH2j3yHBcVh1wW6uUW7vAWPKtaX1HDY/dQenbW7NcPCkBWRblm8oZhCofwCkKW6/cOmoCWPfcW5hcRrSbWRSGW5mEhLeO','W5ZcPCoWWRDJW5u','u2uODmos','W7aKW5SNxe7cTsTwdSoYW6NdOCorWRFdQmoRWPqxvu7dMmkfWRFcS8o8WR0zW5b1WQzTamoqWQDTWQtdV8o/kqbYWPFdIMtcIHhdPa','W4LWgSomWOTe','WPfQW4avCmow','WOj8W48dE8oYWPS','lmkesqes','WPavW6pdSXe','W5hcP8kWjCkNpG','WRrEW40BDq','rmo7lSoZ','WP9muW','pXO5tmo8','WQLEjmkcW6O','gZOyDmogpmo2rNRcRa','W4P0cConWO0','W4v3a8ouCmoDW5ZcJ8k2kCk3','WOtcO8oZWPnHW4LK','W5W7W7Knuq','WQddLCo6W43cLmoMveGKx8o6WQHQW5jbW7RdHmoCWQigmSo9W6dcJdSRoZW0p0vQdW','W73cRdDhoa','nhFdV0KB','WPNcH8oeW4RcIq','WRdcLWWMDmowymksWOq','W4rXa8od','dCkQW4BdNmoEESo4WO4ln8kqW5hcUtpcVsdcSq','c1tdLvy+a8oB','WQ7cStG+uG','g8orrCk2Dq','WQD+W7S/Ca','WOeLWQq','dmkcyYO','CXBdNSkKuq','WOaxWO4rW5O','WPSlW7BdQrG','g8o+y8kxDG','WQVcQ0FcOY7cUttcMmoqW6C','WO0cex8','uCosomoREW','WPziuunsF8kfWP3cP8kgW7eJgaa','bSkIBCk3dCk/WOZcQSoNWObRlvy','W77cTqPooq','W7Lsn8o8WOy','WRFdSfOybmoUcCoQ','W4L5eSoDWO0','rmoejCob','v8ojvtL8','dKJdVG','W6FcVISC6k+05RoN5AsM6lEa77+76k6h5Qgw5P21572w6lE96yEo6kYG','WPOFg0XC','WRhcRepcOrlcSWxcJG','WRVdVb9DuW','WPLKW4iPEG','WP9mu05uASkq','W4iaW6ZcOSkS','W4xcRSkSp8k5aZu','W7JcNSkyW7q','bwvwW5JcOrpdHG','wKqts8os','W5dcLbnaWQj/jXHV','WQhdJu1xW6G8','W4P3cSoIDSoD','W6NcJ8kZW4fP','W6/cKmosWPXpW6unW6P1WQbWmsFcRqSmemksjhxdH8o9WQNdT8o7W5Wyc8oAlCozW4xdTSogWQ/cKCkhWP45CCkhwgZdOr3cQCoEW6W','WQBdGmo+W4pcKSoHta','odfUj8ow','W7zDp8oQtCo7W7BcRCksdW','ftOgBmoH','zfq5umo1W6q','WPLhq1HAD8kvWOBcRCklW4qRcqbOx1n4WQL0WP1OvSoZ','umojst56','hmoWrSkzEG','cCkXW5u','W5tcH8kwimkH','mSkhwau4','qmoebCobW4/dMIC5','uCoIsa','W5/cLCkfW451','WRvNcSknW7ZdQa','DwxcHCoqW5a','m3GVWPZdVqn6eG','W5xcJmkzW7Dw','WPhdM0rjW6a','AuZcJmo2W78','eJ19iSonWQGnW7ZdQIWZW4FcKCoQFJ4wWPtdO8k+W5ldSCkEW7dcQCkMWRrZuxf9W6BdR8kXB0BcP8kyWP0vbmkv','fSo/zSkADq','W7ZcHCorWOvkW7i','WR42W43dRZm','W50GW6VcQmoE','WOGJs8koW5OzrJZcMCoFWRvqnG','CKFcM8oMW6VcRG','5lUe5lIO5P645yIQ5zQk6k6n6zw25PEE5O+N5lUS56M+77Yx6k2R5QoX5P2F6isb6lM26k6I5AwP576A57Ii5Ok
|
||
|
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
|