KR/jd_luck_draw.js

34 lines
107 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/*
2023-09-03 02:07:30 +08:00
活动名称店铺抽奖 · 超级无线/超级会员
活动链接https://lzkj-isv.isvjd.com/lzclient/<活动id>/cjwx/common/entry.html?activityId=<活动id>&gameType=<玩法类型>
https://lzkj-isv.isvjd.com/wxDrawActivity/activity/activity?activityId=<活动id>
2023-07-27 16:14:01 +08:00
https://cjhy-isv.isvjcloud.com/wxDrawActivity/activity/activity?activityId=<活动id>
环境变量LUCK_DRAW_URL // 活动链接
2023-09-03 02:07:30 +08:00
LUCK_DRAW_NOTIFY // 是否推送通知true/false默认不推送
LUCK_DRAW_OPENCARD // 是否入会true/false默认不入会
2023-09-03 17:41:54 +08:00
LUCK_DRAW_BREAK // 493后继续执行默认退出运行true/false
2023-09-03 02:07:30 +08:00
LUCK_DRAW_INTERVAL // 自定义抽奖间隔正整数默认1秒
LUCK_DRAW_MAX_MISS // 最大连续未抽中次数(正整数),达到此次数后会跳过运行对应账号,默认不启用此功能
LUCK_DRAW_NUM //运行账号数量默认运行前7
LUCK_DRAW_Number // 连续无次数跳出,默认 7 次,火爆账号请设置黑名单,否则也会占用次数
2023-07-27 16:14:01 +08:00
LUCK_DRAW_BLACKLIST 黑名单 &隔开 pin值
2023-09-03 02:36:30 +08:00
JD_LZ_OPEN // 是否开启LZ活动运行true/false默认运行
JD_CJ_OPEN // 是否开启CJ活动运行true/false默认运行
2023-07-27 16:14:01 +08:00
2023-09-03 10:16:18 +08:00
只有在没有抽奖次数的情况下才会去做任务获取部分活动涉及定制接口会导致请求响应非法操作
2023-07-27 16:14:01 +08:00
2023-09-03 02:07:30 +08:00
2023/9/3 大量更新
2023-07-27 16:14:01 +08:00
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
2023-09-03 17:41:54 +08:00
#店铺抽奖通用活动
1 1 1 1 * jd_luck_draw.js, tag=店铺抽奖通用活动, enabled=true
2023-07-27 16:14:01 +08:00
2023-09-03 02:07:30 +08:00
*/
2023-07-27 16:14:01 +08:00
2023-09-03 02:07:30 +08:00
const $ = new Env('店铺抽奖(超级无线/超级会员)');
2023-09-03 17:41:54 +08:00
var version_='jsjiami.com.v7';function iiII11il(_0x173c5b,_0x592a4a){const _0x581286=iIiii1i1();return iiII11il=function(_0x272d7d,_0x3296c1){_0x272d7d=_0x272d7d-0x1ef;let _0x383de4=_0x581286[_0x272d7d];if(iiII11il['gqFMfX']===undefined){var _0x2de38f=function(_0x5dcb5e){const _0x2b3e5b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3ecb0e='',_0x20a755='';for(let _0x1fcb8a=0x0,_0x373e7b,_0x42280c,_0x36e683=0x0;_0x42280c=_0x5dcb5e['charAt'](_0x36e683++);~_0x42280c&&(_0x373e7b=_0x1fcb8a%0x4?_0x373e7b*0x40+_0x42280c:_0x42280c,_0x1fcb8a++%0x4)?_0x3ecb0e+=String['fromCharCode'](0xff&_0x373e7b>>(-0x2*_0x1fcb8a&0x6)):0x0){_0x42280c=_0x2b3e5b['indexOf'](_0x42280c);}for(let _0x56209d=0x0,_0x1077b0=_0x3ecb0e['length'];_0x56209d<_0x1077b0;_0x56209d++){_0x20a755+='%'+('00'+_0x3ecb0e['charCodeAt'](_0x56209d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x20a755);};const _0x2023fd=function(_0x26def2,_0x13e105){let _0x53476f=[],_0x3f53d4=0x0,_0x4ddc2f,_0x106133='';_0x26def2=_0x2de38f(_0x26def2);let _0x483441;for(_0x483441=0x0;_0x483441<0x100;_0x483441++){_0x53476f[_0x483441]=_0x483441;}for(_0x483441=0x0;_0x483441<0x100;_0x483441++){_0x3f53d4=(_0x3f53d4+_0x53476f[_0x483441]+_0x13e105['charCodeAt'](_0x483441%_0x13e105['length']))%0x100,_0x4ddc2f=_0x53476f[_0x483441],_0x53476f[_0x483441]=_0x53476f[_0x3f53d4],_0x53476f[_0x3f53d4]=_0x4ddc2f;}_0x483441=0x0,_0x3f53d4=0x0;for(let _0x5432a6=0x0;_0x5432a6<_0x26def2['length'];_0x5432a6++){_0x483441=(_0x483441+0x1)%0x100,_0x3f53d4=(_0x3f53d4+_0x53476f[_0x483441])%0x100,_0x4ddc2f=_0x53476f[_0x483441],_0x53476f[_0x483441]=_0x53476f[_0x3f53d4],_0x53476f[_0x3f53d4]=_0x4ddc2f,_0x106133+=String['fromCharCode'](_0x26def2['charCodeAt'](_0x5432a6)^_0x53476f[(_0x53476f[_0x483441]+_0x53476f[_0x3f53d4])%0x100]);}return _0x106133;};iiII11il['SQYhvc']=_0x2023fd,_0x173c5b=arguments,iiII11il['gqFMfX']=!![];}const _0x452d40=_0x581286[0x0],_0x8b2555=_0x272d7d+_0x452d40,_0x19740c=_0x173c5b[_0x8b2555];return!_0x19740c?(iiII11il['bSLVTj']===undefined&&(iiII11il['bSLVTj']=!![]),_0x383de4=iiII11il['SQYhvc'](_0x383de4,_0x3296c1),_0x173c5b[_0x8b2555]=_0x383de4):_0x383de4=_0x19740c,_0x383de4;},iiII11il(_0x173c5b,_0x592a4a);}function iIiii1i1(){const IiII11Il=(function(){return[...[version_,'lHjWDHsqjOxrifdaCmiRDl.hCCcoSmlK.kvOXQ7p==','W6FdHCo9W6O','pW5ivSkG','qSkoCSkPvG','hCoGFCkJWPHCqSkYW7ldQSoGzSoiqCkxAZa','wSkMWQFdMCkThsu','xCoThmklmmoMW5/cLSka','yYf2AsC','uIqtExa','urrBtSoC','nuWLW5es','zCkrvfldRqe+CSoHWOBdTM8','WQFKVQlMGBBLIytdSq','WRFcUmkmrvPyuW','yWOPb3u','FbXCCYtdVsq','hCkbWPVdQcOSW604mmozWOFdJerlW6memwBcP8kxfq','W43cSmo3WQ7cOqeDWOJdJf4OlCk9oIpdIe3cVW','WRVcVSklx01wqJ7dI3j8pG','DmoLgCk1pq','gKGdtutdHvC','g8oMFCkfWP5qwmkiW5ddT8oQqCoztSkx','f8orsSkuWOK','WRBORldMSipLKOZLUlNcLW','yIBdNri+bMTbiW','oCkXn8ofefjwWQpcPxLNW4pcSq','fmoef2dcImkS','CCoyg8kUkW','W7tdNHJcJmkKns4lW5NcNmojdCoXWP5xpf/dKmkbBq8vWQG','Dej/u8oR','vSkntt3cGmk8WO7dJhvB','WQhcN35jW5e','rHSFte9rWPNdGCkGWPBdSSoCu8o2q3vc','W6ZdIuZdGCo6yMOkW57cMmkdmmoY','WRm3WQ/dSSkhWRtcOW','F8kTW7aEWP4','cSojB8kyWOa','WOdcIvzzW7q','s8oWb8kCnmoMW7BcJ8kl','rrxcHSoeW4j8pSoqt8oJm8kmjbZdPq','WQemzcldSSosWQbyWPbwWRdcRKVdJW','WQH1WOddKSov','W67dHqZdGSkbW6PgWRjIWOmmWPeDW7G','z8kvWORdRqi','W7RcQcy','W6eSmMRdUa','jhGqr34','CFgiR5NVUAC','WRVcKGRcKmk8pY4BW6lcI8kwgW','W6ZcH1S','WOFdJSo2W6HW','W6O1if/dTSoZF8o7CW','WOBdImoHW4r0','WP/cMmksWRxdULC','4PMYsEIVSowGPUweHEAIIUw/O+ATKUEIKoEAT+wmRoMeHa','W6tdHmoVW7dcHa','6AgE6ksv5zIb54MX77YH','WQ41WQxdQCkBWQdcOca','zmo7WPCxWPq','w8ksEmkVtG','WRhcV0fyW6W','WPrtWRa','sbpdSd4Aiwr4ba4','joIUVUAZREwLJUI1UU+9UMLnpJddN8khW6XDW4RcOsq+WRGv','DcBdNaS','W6WMmK3dPSoZyq','56MY5Rkx8j+bNG','WRdcJmkPF0K','u+s+M+AdOEwlJNW','qSkTu8k+s0zToW','W7HMW4VcLSoBgCoA','WOClWOxdSSkt','5lYC5Ocs5yIy8jgLIU+5PW','pCkXiq','A0L4F8oEpG','w8kSD8kHq1bXose','pCk9dhW','vSkxWPFdJq','W6fQW5xcGa','WOCBtbVdHG','W7nQW4a','maH1E8k6','A0nX','ys9exXG','AJGglwa','xConWOuyWOq','W4NdRdVdHCkx','sSkaW6GeWOqHW6WC','WOv7WOSo','gLGdW7yqWRlcU2zg','vW5cvCoJW5PZFSk8','jxiKxW','qSomt8kHWQPCsW','qGhcGCofW4TPhG','WPZcKga0W74','vCoYCCkOWPPyw8kWW7ddRmoTq8ovvmkAmtdc
2023-07-27 16:14:01 +08:00
// prettier-ignore
2023-09-03 02:07:30 +08:00
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