2024-06-28 15:38:28 +08:00
|
|
|
|
/*
|
2024-06-29 17:05:17 +08:00
|
|
|
|
活动名称:领京豆签到
|
|
|
|
|
环境变量:jd_beanSign_interval // 自定义运行间隔时长(整数,单位毫秒),默认1500
|
|
|
|
|
jd_beanSign_notify // 是否推送通知(true/false),默认不推送
|
|
|
|
|
jd_beanSign_pinFilter // 账号pin过滤,多个用@进行分割
|
2024-06-28 15:38:28 +08:00
|
|
|
|
|
|
|
|
|
cron:15 0,16 * * *
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const $ = new Env('领京豆签到')
|
2024-06-29 17:05:17 +08:00
|
|
|
|
const _0xe9705b=_0x3fe0;function _0x3fe0(_0x6bd70b,_0x133225){const _0x3b7afb=_0x3b7a();return _0x3fe0=function(_0x3fe0e1,_0x5af6f0){_0x3fe0e1=_0x3fe0e1-0x117;let _0x31c00c=_0x3b7afb[_0x3fe0e1];if(_0x3fe0['VGmfOA']===undefined){var _0xb360dd=function(_0xcbe79c){const _0x42e759='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1abf9b='',_0x3eaabc='';for(let _0x2b0244=0x0,_0x3237d9,_0x4b0c04,_0x4d201e=0x0;_0x4b0c04=_0xcbe79c['charAt'](_0x4d201e++);~_0x4b0c04&&(_0x3237d9=_0x2b0244%0x4?_0x3237d9*0x40+_0x4b0c04:_0x4b0c04,_0x2b0244++%0x4)?_0x1abf9b+=String['fromCharCode'](0xff&_0x3237d9>>(-0x2*_0x2b0244&0x6)):0x0){_0x4b0c04=_0x42e759['indexOf'](_0x4b0c04);}for(let _0x37f5cf=0x0,_0x9b69a0=_0x1abf9b['length'];_0x37f5cf<_0x9b69a0;_0x37f5cf++){_0x3eaabc+='%'+('00'+_0x1abf9b['charCodeAt'](_0x37f5cf)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3eaabc);};const _0x45a0e6=function(_0x3c3719,_0x1afca9){let _0xf82c70=[],_0x72b1ab=0x0,_0x21e591,_0xd01254='';_0x3c3719=_0xb360dd(_0x3c3719);let _0x3b6674;for(_0x3b6674=0x0;_0x3b6674<0x100;_0x3b6674++){_0xf82c70[_0x3b6674]=_0x3b6674;}for(_0x3b6674=0x0;_0x3b6674<0x100;_0x3b6674++){_0x72b1ab=(_0x72b1ab+_0xf82c70[_0x3b6674]+_0x1afca9['charCodeAt'](_0x3b6674%_0x1afca9['length']))%0x100,_0x21e591=_0xf82c70[_0x3b6674],_0xf82c70[_0x3b6674]=_0xf82c70[_0x72b1ab],_0xf82c70[_0x72b1ab]=_0x21e591;}_0x3b6674=0x0,_0x72b1ab=0x0;for(let _0x443bd4=0x0;_0x443bd4<_0x3c3719['length'];_0x443bd4++){_0x3b6674=(_0x3b6674+0x1)%0x100,_0x72b1ab=(_0x72b1ab+_0xf82c70[_0x3b6674])%0x100,_0x21e591=_0xf82c70[_0x3b6674],_0xf82c70[_0x3b6674]=_0xf82c70[_0x72b1ab],_0xf82c70[_0x72b1ab]=_0x21e591,_0xd01254+=String['fromCharCode'](_0x3c3719['charCodeAt'](_0x443bd4)^_0xf82c70[(_0xf82c70[_0x3b6674]+_0xf82c70[_0x72b1ab])%0x100]);}return _0xd01254;};_0x3fe0['fIIlZt']=_0x45a0e6,_0x6bd70b=arguments,_0x3fe0['VGmfOA']=!![];}const _0x5c0172=_0x3b7afb[0x0],_0x349a07=_0x3fe0e1+_0x5c0172,_0x47c44b=_0x6bd70b[_0x349a07];return!_0x47c44b?(_0x3fe0['NgrIwZ']===undefined&&(_0x3fe0['NgrIwZ']=!![]),_0x31c00c=_0x3fe0['fIIlZt'](_0x31c00c,_0x5af6f0),_0x6bd70b[_0x349a07]=_0x31c00c):_0x31c00c=_0x47c44b,_0x31c00c;},_0x3fe0(_0x6bd70b,_0x133225);}(function(_0x21ea36,_0x337af1){const _0x24f753=_0x3fe0,_0x13f6dc=_0x21ea36();while(!![]){try{const _0x2e3bb1=parseInt(_0x24f753(0x14e,'USNi'))/0x1*(parseInt(_0x24f753(0x18c,'N1@*'))/0x2)+parseInt(_0x24f753(0x1b5,'Am]f'))/0x3*(parseInt(_0x24f753(0x169,'n$g3'))/0x4)+parseInt(_0x24f753(0x168,'CN86'))/0x5+parseInt(_0x24f753(0x124,'&h1I'))/0x6*(-parseInt(_0x24f753(0x14d,'B@hR'))/0x7)+parseInt(_0x24f753(0x11e,'&h1I'))/0x8+parseInt(_0x24f753(0x188,'3MEL'))/0x9*(-parseInt(_0x24f753(0x11b,'A6jK'))/0xa)+-parseInt(_0x24f753(0x17b,'Am]f'))/0xb;if(_0x2e3bb1===_0x337af1)break;else _0x13f6dc['push'](_0x13f6dc['shift']());}catch(_0x4d253f){_0x13f6dc['push'](_0x13f6dc['shift']());}}}(_0x3b7a,0xc3479));const jdCookie=require(_0xe9705b(0x13b,'xFc]')),notify=require('./utils/Rebels_sendJDNotify'),common=require(_0xe9705b(0x164,'pe]O')),{H5st}=require(_0xe9705b(0x1ad,'79Lw'));function _0x3b7a(){const _0x3236be=['ECkuW6CBWPRcLq','wcqelbfx','q0foW4NdP8kXca','v0L1EHTnoNpcMmkdW7LHWOC','5lMU6lcHkVcMGOa','z8kWWQ4m','lGtdPCoDAmoXWPa','W4NcQCkKW6qlW6ldNrn9','FSoXjG','emodmG','aYNcRmobWPxcHa','4P2gWRVMNitOGkZMR7hNOk7LPyJNKRtcGG','fY/dVW','gmkAtmoO','rmkyDmoxB1iTW684WQVdJW','WRzgWOSkqNjDWOZcO8ojWPddVq','bwhdMCkZW6JdKx/cTSk9WOpdOa','W6VdJJi','WR8GbcW','FmkvW7m','W6xdHdtcRs0eWPxdPb8','W6RcIKykk3PQWQ3dPW','e8kvvW','bSkxW7lcGZOP','WQOtFHxdHrSafZSiWRfQW6rUoCo0WPxcJSkwWOJdMY/cMgKJlSkosmoXFCo/gLm8d8kCsmoxlsviuGX0WOFcNmkTWQKNWRquamoYWR1LbColWPFcNwJdNSoPyKPNBYRdOw9xW4FcKCkDWOhdTCkezXKCW6/dM8kHW6xdOhPpW5NcHmkAW43dPCkpsmkZjrjdWQFdSKpdGc3dS8kwk8k3imoMW6aXFmoRW7ZdNHDXgZNdI0tcVuBdMcpdQhC7WOqJf2GKyeRdPcNcUZ53Dmo/qaRcGHdcQCkrjCooaq/cMCoeWR93EmougxiotcRdKSoyWOuxtmofi8olW5lcGq8eqINdGSklWQv3dSo5W4OyuCk1WP/cPmk9qCkxWOz3W790qwpdS8oXBIzVW6JcLGFdR8k+WP1QpXDcW53dRrbGj8oKW5Kvf3BdUWhcUCoiCMv5oaW5eXhcHKybFSojWPenWPD3W4ldVCkYW4BdJKucW49DW63dTmoleW/dQSkWW4FdLmkEoCoMW5/dRCkQCmkNWPCOWOdcRJH8mWmfW5GrrWOhch1meqJdJCkcW5bNW41iW7pcGXZdOmkc
|
2024-06-28 15:38:28 +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
|