KR/jd_AJMH.js

25 lines
80 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/*
安佳做任务开盲盒赢好礼
变量jd_AJMH_id // 活动id 7月idexport jd_AJMH_id="dz61340bc3efcd43e2b986c8be"
做任务邀请抽奖
请求太频繁会被黑ip
过10分钟再执行
cron:11 11 11 11 *
============Quantumultx===============
[task_local]
#安佳做任务开盲盒赢好礼
11 11 11 11 * jd_AJMH.js, tag=安佳做任务开盲盒赢好礼, enabled=true
*/
const $ = new Env('安佳做任务开盲盒,赢好礼')
var version_='jsjiami.com.v7';function iii1II(_0x4fdf27,_0x247ee6){const _0x22c8ad=Iii11l();return iii1II=function(_0x5d7557,_0x1d0bb0){_0x5d7557=_0x5d7557-0x161;let _0x538d8e=_0x22c8ad[_0x5d7557];if(iii1II['RUBbxB']===undefined){var _0x3cb9a1=function(_0x5b68c5){const _0x1c3166='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x18d951='',_0x599e11='';for(let _0x1a283c=0x0,_0x7ee9a0,_0x87eac4,_0xc77ece=0x0;_0x87eac4=_0x5b68c5['charAt'](_0xc77ece++);~_0x87eac4&&(_0x7ee9a0=_0x1a283c%0x4?_0x7ee9a0*0x40+_0x87eac4:_0x87eac4,_0x1a283c++%0x4)?_0x18d951+=String['fromCharCode'](0xff&_0x7ee9a0>>(-0x2*_0x1a283c&0x6)):0x0){_0x87eac4=_0x1c3166['indexOf'](_0x87eac4);}for(let _0x830ca9=0x0,_0x2d395e=_0x18d951['length'];_0x830ca9<_0x2d395e;_0x830ca9++){_0x599e11+='%'+('00'+_0x18d951['charCodeAt'](_0x830ca9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x599e11);};const _0x453d2f=function(_0x2dfbc6,_0xc3b9e5){let _0x64e8e8=[],_0x502dfd=0x0,_0xfd1575,_0x4613a3='';_0x2dfbc6=_0x3cb9a1(_0x2dfbc6);let _0x3f3a15;for(_0x3f3a15=0x0;_0x3f3a15<0x100;_0x3f3a15++){_0x64e8e8[_0x3f3a15]=_0x3f3a15;}for(_0x3f3a15=0x0;_0x3f3a15<0x100;_0x3f3a15++){_0x502dfd=(_0x502dfd+_0x64e8e8[_0x3f3a15]+_0xc3b9e5['charCodeAt'](_0x3f3a15%_0xc3b9e5['length']))%0x100,_0xfd1575=_0x64e8e8[_0x3f3a15],_0x64e8e8[_0x3f3a15]=_0x64e8e8[_0x502dfd],_0x64e8e8[_0x502dfd]=_0xfd1575;}_0x3f3a15=0x0,_0x502dfd=0x0;for(let _0xf2a910=0x0;_0xf2a910<_0x2dfbc6['length'];_0xf2a910++){_0x3f3a15=(_0x3f3a15+0x1)%0x100,_0x502dfd=(_0x502dfd+_0x64e8e8[_0x3f3a15])%0x100,_0xfd1575=_0x64e8e8[_0x3f3a15],_0x64e8e8[_0x3f3a15]=_0x64e8e8[_0x502dfd],_0x64e8e8[_0x502dfd]=_0xfd1575,_0x4613a3+=String['fromCharCode'](_0x2dfbc6['charCodeAt'](_0xf2a910)^_0x64e8e8[(_0x64e8e8[_0x3f3a15]+_0x64e8e8[_0x502dfd])%0x100]);}return _0x4613a3;};iii1II['SFykUI']=_0x453d2f,_0x4fdf27=arguments,iii1II['RUBbxB']=!![];}const _0x807f38=_0x22c8ad[0x0],_0x570392=_0x5d7557+_0x807f38,_0x1f264e=_0x4fdf27[_0x570392];return!_0x1f264e?(iii1II['SjLfTk']===undefined&&(iii1II['SjLfTk']=!![]),_0x538d8e=iii1II['SFykUI'](_0x538d8e,_0x1d0bb0),_0x4fdf27[_0x570392]=_0x538d8e):_0x538d8e=_0x1f264e,_0x538d8e;},iii1II(_0x4fdf27,_0x247ee6);}function Iii11l(){const lil1=(function(){return[version_,'rXljWSksjKiIaQLmiE.UWctoAdmL.UQvt7rpKHHK==','W6XrWO3cSdi','sX3cGHK','W65WhmkSW5C','cGfyW4u','W7L0gSkkW4hcK8kItCoDs1a','W5RcLeOFbW','zSkqt0ldKmkxWQCR','E8kFW6m','W6RcR1dcSG','ur0gdmkyWQG3B8oqWR0','W7j+cq','xSofWRBdRIHQqW','rSkRgCkWW4NcQ3ZcLXtdSY0t','AtnMkCkEeG0','WOVdQCofirC','gexdGebqrc3dVrjPfW','W6JcOvhcLdW','WR9lxSkRWQ/dS8k+iq','hmkmW6JcJ8oLFq','qCkpgCkiW5G','sCk7fGzNDcdcGYXR','W59ZFNi0DCkdpvq','W4pcLNxdQKq','W61YaCkTW5C','xmoVWRFdRry','mJ5R','W7PPcSk8W4a','sSo3f8o+za','uGayd8kfWPibDmomWQZcUSos','W6aubCkbWQBdUSkgjCk3','W4iyW7Hnbt3cPKeR','vu4X','w8kSa8kQW5K','fSoYACkFr8k5WQdcJcm','zLf3','W7tcSZNcOmkkWRz0','WR1wtq','DwVdRmkSW6u','4PY4qoI/SoEQR+AxNoAnIoInN+wpLowKPUI0Rg3OR47OHkVOOPxMNAFMIABLJRpNLPpMTORLIPNcSmo1EmorWPZdOG','W6C/DmoMW44','aG9l','W7lcKLpdOMa','DCocW6ZcGmoSaW','aCo1xCoQWOZdGslcMdFdTryvrq','W7ddOCkLaCoC','W7WmW6Xrjq','z+AkGos4J+wVGUElOmoL','BxXwrt4','W7hdLmodW5yv','h1hdNYNdUCohwGW','WOBdICoXaqG','efVdIcVdOCopqXa','W79YgSk2W4tcN8kKFCo2q1S','5BAd57U35yIv5yUz5yEH5lMW5lQn','h1HrkCoLWRe','WOVNMylLIPVLIzBLGOxKUztVV5O','rEISUUwhI+McU+I/O+EoHUwJUowmJ+MgHbpORiFNVkVMTBRLIlpcVCoO5y6k6ywt772AdeBcKrLOzmogWQX6WRijW53dK2GKeKGXW73MTANLIyBdICkEDd/LR5xKUBhMTiNLIkSfvJm','WQhdTSo8WOJdTCoP','WOJdOaxdKXC','WPDRzCknWOO','W7hcTXVcTmkT','waCEjSkBWR4d','CCocW5BcJmoY','bbVcS11gtCot','WPNdNCofltG','ESk6h8oruq','W5/dQSozW6OZ','W610gSoYW5hcMCk/B8oAsa','lCkcW6NcGmoJDq','lSorW7a1W7CHiwLlW4zZW6a','WOVdHSo4csi','WOxdQSot','W4RcVeFdGuldNW','hSkUW5FcG8o5','qmkcdqvN','W5xcVM4t','ftdcV3tdQG','5QYtW7D15Bs+6kky6zQi5yUI77+16k6N6l6MxSkB5yIL6zg/5zgu5ysn5OMQ6kgn6iEl5P6/W4G','W6VdOCoIW6xdVJqvW6/dLuddRmkpFW','ydvKkmkieZldOCkXbWRdLLxcRKO','faHxW5LJgW','W4pcVKddRvRdKNq+sCoei8kSpCoiW5m','uKD/uXS','y8oehmoGEa','s0qLWOe4pW','DSkmhmovBam5W65Fvmo1aCoepa','AMZdU8kGW6LqnCknB8k8WPtdOG','WRbvrSocW5HrzcxcHq','AuG4','WRlcTh00W7G','W6hdUmo2W481','FYtcJZqN','W5fhtg4F','W
// 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