jdpro/jd_dygetbeans.js

7 lines
49 KiB
JavaScript
Raw Normal View History

2024-01-02 12:59:48 +00:00
/*
23 1 * * * jd_dygetbeans.js
*/
const $ = new Env('每日抽豆');
var _0xodL='jsjiami.com.v7';const _0x43d149=_0x42a1;if(function(_0x5e6e01,_0x5cd3d9,_0x2e4eeb,_0x43a70e,_0x3108a4,_0x264c81,_0x22846d){return _0x5e6e01=_0x5e6e01>>0x7,_0x264c81='hs',_0x22846d='hs',function(_0x423ff2,_0xe1796c,_0x14a8ef,_0x454a80,_0x56149f){const _0x231844=_0x42a1;_0x454a80='tfi',_0x264c81=_0x454a80+_0x264c81,_0x56149f='up',_0x22846d+=_0x56149f,_0x264c81=_0x14a8ef(_0x264c81),_0x22846d=_0x14a8ef(_0x22846d),_0x14a8ef=0x0;const _0x4203fa=_0x423ff2();while(!![]&&--_0x43a70e+_0xe1796c){try{_0x454a80=-parseInt(_0x231844(0x338,'NPx5'))/0x1*(-parseInt(_0x231844(0x1d9,'gj@N'))/0x2)+-parseInt(_0x231844(0x2fd,'%xb['))/0x3*(-parseInt(_0x231844(0x1ed,')%so'))/0x4)+-parseInt(_0x231844(0x1a4,')%so'))/0x5*(parseInt(_0x231844(0x265,'i5f2'))/0x6)+parseInt(_0x231844(0x358,'(psm'))/0x7+-parseInt(_0x231844(0x1c6,'cQrc'))/0x8*(-parseInt(_0x231844(0x37e,'gj@N'))/0x9)+-parseInt(_0x231844(0x241,'ps6w'))/0xa+parseInt(_0x231844(0x2fe,'Y^Y^'))/0xb;}catch(_0x1a0aee){_0x454a80=_0x14a8ef;}finally{_0x56149f=_0x4203fa[_0x264c81]();if(_0x5e6e01<=_0x43a70e)_0x14a8ef?_0x3108a4?_0x454a80=_0x56149f:_0x3108a4=_0x56149f:_0x14a8ef=_0x56149f;else{if(_0x14a8ef==_0x3108a4['replace'](/[gUSVOMAGYNWpHhCqIuRJ=]/g,'')){if(_0x454a80===_0xe1796c){_0x4203fa['un'+_0x264c81](_0x56149f);break;}_0x4203fa[_0x22846d](_0x56149f);}}}}}(_0x2e4eeb,_0x5cd3d9,function(_0x14f845,_0x11c12b,_0x2e9b3b,_0x6782ff,_0x48b734,_0xdd346a,_0x3cff9f){return _0x11c12b='\x73\x70\x6c\x69\x74',_0x14f845=arguments[0x0],_0x14f845=_0x14f845[_0x11c12b](''),_0x2e9b3b=`\x72\x65\x76\x65\x72\x73\x65`,_0x14f845=_0x14f845[_0x2e9b3b]('\x76'),_0x6782ff=`\x6a\x6f\x69\x6e`,(0x14b59a,_0x14f845[_0x6782ff](''));});}(0x6500,0x6f155,_0x3166,0xcc),_0x3166){}const _0xe7b845=$[_0x43d149(0x1a1,'7wQp')]()?require(_0x43d149(0x373,'ps6w')):'',_0x547173=$[_0x43d149(0x2e6,'lLQA')]()?require(_0x43d149(0x37c,'KQTv')):'',_0x40efd1=require(_0x43d149(0x347,'ps6w'));let _0x36859d=!![],_0x1a202e=[],_0x39a2a1='',_0x45f7d2='';if($[_0x43d149(0x363,'hxYY')]()){Object[_0x43d149(0x35b,'TmJ]')](_0x547173)[_0x43d149(0x334,'dO(q')](_0x51ed4a=>{const _0x55b594=_0x43d149;_0x1a202e[_0x55b594(0x218,'NIE5')](_0x547173[_0x51ed4a]);});if(process[_0x43d149(0x2f1,'sz4^')][_0x43d149(0x243,'7wQp')]&&process[_0x43d149(0x1e6,'$fv5')][_0x43d149(0x1cd,'q4n*')]===_0x43d149(0x304,'ni^!'))console[_0x43d149(0x1e5,'%xb[')]=()=>{};}else _0x1a202e=[$[_0x43d149(0x2d8,'t]Q1')](_0x43d149(0x274,')%so')),$[_0x43d149(0x19f,'xaaI')](_0x43d149(0x2a1,'ft1$')),..._0x580d94($[_0x43d149(0x301,'dO(q')](_0x43d149(0x2ef,'ARbP'))||'[]')[_0x43d149(0x249,'%xb[')](_0x4773a1=>_0x4773a1[_0x43d149(0x2ff,'ARbP')])][_0x43d149(0x264,'w!Bn')](_0xe518f7=>!!_0xe518f7);!(async()=>{const _0x1401e1=_0x43d149,_0x29bb87={'bsSgZ':function(_0x1a5da9,_0xe2188e){return _0x1a5da9(_0xe2188e);},'SjQND':_0x1401e1(0x2bc,'6uuh'),'tWZWx':_0x1401e1(0x1ae,'1Z*z'),'TutYa':_0x1401e1(0x1c5,'ft1$'),'CJqIv':function(_0x61367d,_0x4dc92f){return _0x61367d<_0x4dc92f;},'WINGf':function(_0x290813,_0x483a7a){return _0x290813(_0x483a7a);},'rbJmw':function(_0x452a03,_0xbdd927){return _0x452a03+_0xbdd927;},'HHnBs':_0x1401e1(0x1a2,'J6Mh'),'DUQRW':function(_0x3facf2){return _0x3facf2();},'eGWDP':function(_0x4d5cb7,_0x299913){return _0x4d5cb7!==_0x299913;},'sJOpN':_0x1401e1(0x1a8,'sz4^'),'UhAKt':_0x1401e1(0x26d,'sz4^')};if(!_0x1a202e[0x0]){$[_0x1401e1(0x24b,'ft1$')]($[_0x1401e1(0x319,'Q1qY')],_0x29bb87[_0x1401e1(0x26f,'e@bb')],_0x29bb87[_0x1401e1(0x213,'%P!i')],{'open-url':_0x29bb87[_0x1401e1(0x331,'DHK1')]});return;}$[_0x1401e1(0x2a0,')%so')](_0x29bb87[_0x1401e1(0x254,'cQrc')]);for(let _0x2a1de4=0x0;_0x29bb87[_0x1401e1(0x255,'i5f2')](_0x2a1de4,_0x1a202e[_0x1401e1(0x25a,')%so')]);_0x2a1de4++){if(_0x1a202e[_0x2a1de4]){_0x39a2a1=_0x1a202e[_0x2a1de4],$[_0x1401e1(0x2e3,'vqc[')]=_0x29bb87[_0x1401e1(0x22e,')jV[')](decodeURIComponent,_0x39a2a1[_0x1401e1(0x211,'U)af')](/pt_pin=([^; ]+)(?=;?)/)&&_0x39a2a1[_0x1401e1(0x2f9,'F29S')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$[_0x1401e1(0x343,'$fv5')]=_0x29bb87[_0x1401e1(0x2fb,'vqc[')](_0x2a1de4,0x1),$[_0x1401e1(0x297,'i5f2')]=!![],$[_0x1401e1(0x22d,'F29S')]='',$[_0x1401e1(0x258,'jMi
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