mirror of https://github.com/6dylan6/jdpro.git
7 lines
102 KiB
JavaScript
7 lines
102 KiB
JavaScript
|
/*
|
||
|
30 19 * * * jd_wyw_y1y.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('玩一玩-摇一摇');
|
||
|
var _0xodj='jsjiami.com.v7';const _0x3fa137=_0x5e74;(function(_0x3e606b,_0x2b4e29,_0x2c63ad,_0x3ab361,_0x553b26,_0x5e0439,_0x138fe7){return _0x3e606b=_0x3e606b>>0x6,_0x5e0439='hs',_0x138fe7='hs',function(_0x15add5,_0xc0ba94,_0xbdd0ca,_0x410ea9,_0x1e2a90){const _0x1f3132=_0x5e74;_0x410ea9='tfi',_0x5e0439=_0x410ea9+_0x5e0439,_0x1e2a90='up',_0x138fe7+=_0x1e2a90,_0x5e0439=_0xbdd0ca(_0x5e0439),_0x138fe7=_0xbdd0ca(_0x138fe7),_0xbdd0ca=0x0;const _0x1a6d86=_0x15add5();while(!![]&&--_0x3ab361+_0xc0ba94){try{_0x410ea9=-parseInt(_0x1f3132(0x29f,'RKby'))/0x1*(parseInt(_0x1f3132(0x37a,'mzy!'))/0x2)+parseInt(_0x1f3132(0x3c9,'8Ym)'))/0x3+parseInt(_0x1f3132(0x1a7,'hn8g'))/0x4*(parseInt(_0x1f3132(0x520,'1bed'))/0x5)+parseInt(_0x1f3132(0x3d6,'iOW('))/0x6+parseInt(_0x1f3132(0x4fb,'RKby'))/0x7*(-parseInt(_0x1f3132(0x29a,'CW@h'))/0x8)+-parseInt(_0x1f3132(0x17e,'I0Mw'))/0x9*(parseInt(_0x1f3132(0x233,'%dy*'))/0xa)+parseInt(_0x1f3132(0x5b5,'&n%F'))/0xb;}catch(_0x26b914){_0x410ea9=_0xbdd0ca;}finally{_0x1e2a90=_0x1a6d86[_0x5e0439]();if(_0x3e606b<=_0x3ab361)_0xbdd0ca?_0x553b26?_0x410ea9=_0x1e2a90:_0x553b26=_0x1e2a90:_0xbdd0ca=_0x1e2a90;else{if(_0xbdd0ca==_0x553b26['replace'](/[kyPGYLeUXQtNOuxgh=]/g,'')){if(_0x410ea9===_0xc0ba94){_0x1a6d86['un'+_0x5e0439](_0x1e2a90);break;}_0x1a6d86[_0x138fe7](_0x1e2a90);}}}}}(_0x2c63ad,_0x2b4e29,function(_0x230fd5,_0x36f6f9,_0x5848ca,_0x46fa92,_0x53428,_0x3d1d5b,_0x4f0d81){return _0x36f6f9='\x73\x70\x6c\x69\x74',_0x230fd5=arguments[0x0],_0x230fd5=_0x230fd5[_0x36f6f9](''),_0x5848ca=`\x72\x65\x76\x65\x72\x73\x65`,_0x230fd5=_0x230fd5[_0x5848ca]('\x76'),_0x46fa92=`\x6a\x6f\x69\x6e`,(0x178e49,_0x230fd5[_0x46fa92](''));});}(0x3300,0x92ed4,_0x26d2,0xce),_0x26d2)&&(_0xodj=_0x3fa137(0x1f1,'ixtb'));const _0x5a6c47=(function(){let _0x55f41a=!![];return function(_0x59873c,_0x1b7861){const _0x21a3ff=_0x55f41a?function(){const _0x17c0a5=_0x5e74;if(_0x1b7861){const _0x2a4cf4=_0x1b7861[_0x17c0a5(0x27a,'eE5J')](_0x59873c,arguments);return _0x1b7861=null,_0x2a4cf4;}}:function(){};return _0x55f41a=![],_0x21a3ff;};}()),_0x364dd5=_0x5a6c47(this,function(){const _0xa520a7=_0x3fa137,_0x4672dc={'MjbXc':_0xa520a7(0x445,'JjbZ')};return _0x364dd5[_0xa520a7(0x527,'JjbZ')]()[_0xa520a7(0x2f0,'YfRR')](_0x4672dc[_0xa520a7(0x31d,'CW@h')])[_0xa520a7(0x363,'ySX7')]()[_0xa520a7(0x246,'zEqE')](_0x364dd5)[_0xa520a7(0x147,'&n%F')](_0x4672dc[_0xa520a7(0x26a,'lrtB')]);});_0x364dd5();const _0x3b474d=$[_0x3fa137(0x4f7,'Kzk#')]()?require(_0x3fa137(0x2de,'U(Wc')):'',_0x54329f=$[_0x3fa137(0x5da,'&n%F')]()?require(_0x3fa137(0x484,'Kzk#')):'',_0x4a7fa7=require(_0x3fa137(0x3d0,'#*H$')),_0x474611=require(_0x3fa137(0x44b,'5Z%(')),_0x4b114d=process[_0x3fa137(0x2d1,'J)NB')][_0x3fa137(0x442,'5Z%(')]?process[_0x3fa137(0x26b,'CW@h')][_0x3fa137(0x57f,'![h$')]:'10';let _0x5eef21=_0x3fa137(0x46e,'qiXf');if(process[_0x3fa137(0x52a,'ORNJ')][_0x3fa137(0x576,'WC!o')])try{require(_0x3fa137(0x1a5,'5Z%(')),ccc=require(_0x3fa137(0x43e,'#*H$')),$[_0x3fa137(0x2d0,'8Ym)')]=ccc[_0x3fa137(0x602,'YfRR')]($[_0x3fa137(0x5a9,'!]m*')][_0x3fa137(0x53a,'%TW)')]($)),$[_0x3fa137(0x327,'HTnz')]=ccc[_0x3fa137(0x1e7,'E6ki')]($[_0x3fa137(0x25b,'dk]L')][_0x3fa137(0x33d,'HTnz')]($));}catch{$[_0x3fa137(0x53c,'WyVn')](_0x3fa137(0x562,'WC!o')),$[_0x3fa137(0x33a,'HTnz')]=$[_0x3fa137(0x184,'buCy')],$[_0x3fa137(0x135,']w@R')]=$[_0x3fa137(0x5fb,'%TW)')];}else $[_0x3fa137(0x1c7,'qiXf')]=$[_0x3fa137(0x1ae,'J)NB')],$[_0x3fa137(0x1fa,'%dy*')]=$[_0x3fa137(0x5a0,'U(Wc')];let _0x388793=[],_0x5002b0='',_0x5a11b2=0x0;if($[_0x3fa137(0x50a,'E6ki')]()){var _0x42f785=new Buffer[(_0x3fa137(0x30c,'D(id'))](_0x3fa137(0x5ab,'5V*e'),_0x3fa137(0x2d7,'ORNJ'))[_0x3fa137(0x25e,']UQ7')](_0x3fa137(0x472,'WyVn'));Object[_0x3fa137(0x35f,'YfRR')](_0x3b474d)[_0x3fa137(0x15c,'EQ%T')](_0x48ddb1=>{const _0x51736f=_0x3fa137;_0x388793[_0x51736f(0x270,'Kzk#')](_0x3b474d[_0x48ddb1]);});if(process[_0x3fa137(0x3d2,'^ddI')][_0x3fa137(0x338,'O#6M')]&&process[_0x3fa137(0x1c1,'buCy')][_0x3fa137(0x1eb,'iOW(')]===_0x3fa137(0x2be,'W4II'))console[_0x3fa137(0x55c,'5V*e')]=()=>{};}else _0x388793=[$[_0x3fa137(0x2a3,'iOW(')](_0x3fa137(0x2bf,'ySX7')),$[_
|
||
|
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 || "{}" : "{}"; tr
|