KR/jd_yh.js

21 lines
128 KiB
JavaScript
Raw Normal View History

2023-08-20 19:04:47 +08:00
/*
洋河造梦空间站
任务本
集齐3张梦之蓝卡片 即可兑换 5 脚本默认兑换 5
cron:31 0 10-31 8 *
============Quantumultx===============
[task_local]
#洋河造梦空间站
31 0 10-31 8 * jd_yh.js, tag=洋河造梦空间站, enabled=true
*/
const $ = new Env('洋河造梦空间站');
2023-08-20 19:52:47 +08:00
var version_='jsjiami.com.v7';const _0x2d47f1=_0x4a09;(function(_0x242e34,_0x165d2a,_0x19f3cf,_0x32de01,_0x1dd627,_0x127820,_0x2be979){return _0x242e34=_0x242e34>>0x4,_0x127820='hs',_0x2be979='hs',function(_0x5c86be,_0x1b0736,_0x2d9f47,_0x1e4c25,_0x2c7d02){const _0x1316fb=_0x4a09;_0x1e4c25='tfi',_0x127820=_0x1e4c25+_0x127820,_0x2c7d02='up',_0x2be979+=_0x2c7d02,_0x127820=_0x2d9f47(_0x127820),_0x2be979=_0x2d9f47(_0x2be979),_0x2d9f47=0x0;const _0x529d56=_0x5c86be();while(!![]&&--_0x32de01+_0x1b0736){try{_0x1e4c25=parseInt(_0x1316fb(0x1f0,'3x67'))/0x1+-parseInt(_0x1316fb(0x687,']kek'))/0x2+parseInt(_0x1316fb(0x340,'7]tZ'))/0x3*(parseInt(_0x1316fb(0x60a,'rXXc'))/0x4)+parseInt(_0x1316fb(0x450,'YsOi'))/0x5*(-parseInt(_0x1316fb(0x34d,'dJ3g'))/0x6)+parseInt(_0x1316fb(0x227,'Q)AE'))/0x7+parseInt(_0x1316fb(0x668,'Q)AE'))/0x8+parseInt(_0x1316fb(0x2eb,'kkYQ'))/0x9*(-parseInt(_0x1316fb(0x3b1,'7]tZ'))/0xa);}catch(_0x2c3be4){_0x1e4c25=_0x2d9f47;}finally{_0x2c7d02=_0x529d56[_0x127820]();if(_0x242e34<=_0x32de01)_0x2d9f47?_0x1dd627?_0x1e4c25=_0x2c7d02:_0x1dd627=_0x2c7d02:_0x2d9f47=_0x2c7d02;else{if(_0x2d9f47==_0x1dd627['replace'](/[xHFeUAYXdWftIEpuCkDq=]/g,'')){if(_0x1e4c25===_0x1b0736){_0x529d56['un'+_0x127820](_0x2c7d02);break;}_0x529d56[_0x2be979](_0x2c7d02);}}}}}(_0x19f3cf,_0x165d2a,function(_0x49a4fb,_0x181d4e,_0xef83c3,_0x9f53eb,_0xc46d1d,_0x4a8fc4,_0x312f22){return _0x181d4e='\x73\x70\x6c\x69\x74',_0x49a4fb=arguments[0x0],_0x49a4fb=_0x49a4fb[_0x181d4e](''),_0xef83c3='\x72\x65\x76\x65\x72\x73\x65',_0x49a4fb=_0x49a4fb[_0xef83c3]('\x76'),_0x9f53eb='\x6a\x6f\x69\x6e',(0x13a3fc,_0x49a4fb[_0x9f53eb](''));});}(0xcc0,0x20599,_0x9919,0xce),_0x9919)&&(version_=_0x9919);const _0x10d291=$[_0x2d47f1(0x5e3,'ihrF')]()?require('./jdCookie.js'):'',_0x1d1694=$['isNode']()?require(_0x2d47f1(0x52f,'b2Dy')):'';CryptoJS=$['isNode']()?require('crypto-js'):CryptoJS;const _0x3c2d65=require(_0x2d47f1(0x206,'fGew')),_0x2c442e=require(_0x2d47f1(0x46e,'w%Lz')),_0x200ec0=require(_0x2d47f1(0x282,'[y&['));let _0x4f7be6=_0x2d47f1(0x5d8,'w%Lz'),_0x509f07=_0x2d47f1(0x25d,'rXXc'),_0x180720=[],_0x39c15e='';if($['isNode']()){Object[_0x2d47f1(0x418,'HuTJ')](_0x10d291)['forEach'](_0x5b1149=>{const _0x378629=_0x2d47f1;_0x180720[_0x378629(0x3c7,'hIZp')](_0x10d291[_0x5b1149]);});if(process['env'][_0x2d47f1(0x24b,'cN$$')]&&process['env'][_0x2d47f1(0x406,'pup(')]===_0x2d47f1(0x495,'3x67'))console[_0x2d47f1(0x698,'kKe@')]=()=>{};}else _0x180720=[$['getdata'](_0x2d47f1(0x4ee,'bcLT')),$[_0x2d47f1(0x1fb,'21My')](_0x2d47f1(0x265,'JRcT')),..._0x55481e($[_0x2d47f1(0x33e,'eHCh')](_0x2d47f1(0x4ea,'vCGQ'))||'[]')[_0x2d47f1(0x464,'21My')](_0x5eecf7=>_0x5eecf7['cookie'])][_0x2d47f1(0x6a6,'hPU%')](_0x446baf=>!!_0x446baf);_0x509f07=$['isNode']()?process[_0x2d47f1(0x5a6,'cOpc')][_0x2d47f1(0x42f,'mPGK')]?process['env'][_0x2d47f1(0x2ee,'&i*B')]:''+_0x509f07:$[_0x2d47f1(0x225,'hIZp')](_0x2d47f1(0x385,')]y3'))?$['getdata'](_0x2d47f1(0x3bd,'JRcT')):''+_0x509f07;let _0x5ed8fe=process[_0x2d47f1(0x2cf,'R1Ow')][_0x2d47f1(0x532,'21My')]?process[_0x2d47f1(0x615,'m4Lv')]['JD_YJSHUA']:_0x2d47f1(0x2c9,']kek');allMessage='',message='';let _0x58e1e8='';$[_0x2d47f1(0x45d,'kkVh')]=process[_0x2d47f1(0x5cc,'Q)AE')][_0x2d47f1(0x500,'hPU%')]?process[_0x2d47f1(0x2f5,'F9aj')][_0x2d47f1(0x51e,'hW0X')]:_0x2d47f1(0x558,'fJ%!'),$[_0x2d47f1(0x496,'uuXg')]=![],$[_0x2d47f1(0x540,'kkYQ')]=![],$[_0x2d47f1(0x1ba,')]y3')]=![];let _0x59b513='',_0x1d0e38='';function _0x9919(){const _0x42bc69=(function(){return[version_,'xIjHsDjCUiaxmi.EYDcXpoqmAuY.v7fkEteFdWAp==','xvhcNmoLha','b2BdOCk7W7ddRW','jKVdI2BdTXpdUW','BG8wCmkV','z8kpWOtcGaW','dmoNWQL4W6K','W4GqASkv','j8o5yqZcMG','smk4uCo/5yso5l+T6iYJ5B+F772f','grdcLIXGA0W6bSogCq','W7VdKSk4f8oE','WQWUWOFcRKi','oCoHWQzHW6NcMW','WRzJWRy','sh12WPmJ','W63dPWpcRWXLc8kNwHRcLmoDW5pcJCkvp8onzCkVsCoCWPKsWOXugmo9kxNcG8k0WR5opM19h8oOdXpcJ2ZdGmkFW57cKbVcRCkXjmkkWPvfnvFcVqNcICoGnGW','sCk8W53cSttcNtOiWPK','W5ZcJt06kSo4qwfpoSklk3ZdPHG','u2vgWPeM','W53dPmkxkCouW57dMmoT','WR8sW6m','gmoHFspcQmo5yGRdOW','vSkNW4G','lSopBLDvnCkT','FcuPB8kY','ySkyWPtcSIv9W5Pk','BsqYwmkv','o1xdHu3dUG','aCkVWQZcOCo0','WQXyWRN
2023-08-20 19:04:47 +08:00
// prettier-ignore
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