faker3/jd_tj_qdtx.js

17 lines
36 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
2024-07-10 16:06:28 +08:00
活动名称特价-签到提现
环境变量jd_tj_qdtx_threads // 控制并发线程数正整数默认1最大3
jd_tj_qdtx_interval // 自定义运行间隔时长整数单位毫秒默认1000
jd_tj_qdtx_notify // 是否推送通知true/false默认不推送
jd_tj_qdtx_pinFilter // 账号pin过滤多个用@进行分割
jd_tj_qdtx_exchange_mode // 兑换模式0 红包 1 现金 默认兑换现金
2024-06-28 15:38:28 +08:00
2024-07-10 16:06:28 +08:00
cron:1 1,17 * * *
2024-06-28 15:38:28 +08:00
*/
2024-07-10 16:06:28 +08:00
2024-06-28 15:38:28 +08:00
const $ = new Env('特价-签到提现')
2024-07-10 16:06:28 +08:00
const _0x484e87=_0x4314;function _0x4314(_0x3914be,_0x22b5b0){const _0x2f818b=_0x2f81();return _0x4314=function(_0x43144f,_0x5ad082){_0x43144f=_0x43144f-0x7d;let _0x46f9a2=_0x2f818b[_0x43144f];if(_0x4314['SrQrfQ']===undefined){var _0x218a7a=function(_0x4f188a){const _0x1e1085='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2c824c='',_0x5ab166='';for(let _0x130cf3=0x0,_0x4189f4,_0x407377,_0x4c2355=0x0;_0x407377=_0x4f188a['charAt'](_0x4c2355++);~_0x407377&&(_0x4189f4=_0x130cf3%0x4?_0x4189f4*0x40+_0x407377:_0x407377,_0x130cf3++%0x4)?_0x2c824c+=String['fromCharCode'](0xff&_0x4189f4>>(-0x2*_0x130cf3&0x6)):0x0){_0x407377=_0x1e1085['indexOf'](_0x407377);}for(let _0x5398e4=0x0,_0x327d33=_0x2c824c['length'];_0x5398e4<_0x327d33;_0x5398e4++){_0x5ab166+='%'+('00'+_0x2c824c['charCodeAt'](_0x5398e4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5ab166);};const _0x4403f9=function(_0x172ae3,_0x31e280){let _0x82c36b=[],_0xa318ed=0x0,_0x4195d0,_0x1a26be='';_0x172ae3=_0x218a7a(_0x172ae3);let _0x199f9c;for(_0x199f9c=0x0;_0x199f9c<0x100;_0x199f9c++){_0x82c36b[_0x199f9c]=_0x199f9c;}for(_0x199f9c=0x0;_0x199f9c<0x100;_0x199f9c++){_0xa318ed=(_0xa318ed+_0x82c36b[_0x199f9c]+_0x31e280['charCodeAt'](_0x199f9c%_0x31e280['length']))%0x100,_0x4195d0=_0x82c36b[_0x199f9c],_0x82c36b[_0x199f9c]=_0x82c36b[_0xa318ed],_0x82c36b[_0xa318ed]=_0x4195d0;}_0x199f9c=0x0,_0xa318ed=0x0;for(let _0x545355=0x0;_0x545355<_0x172ae3['length'];_0x545355++){_0x199f9c=(_0x199f9c+0x1)%0x100,_0xa318ed=(_0xa318ed+_0x82c36b[_0x199f9c])%0x100,_0x4195d0=_0x82c36b[_0x199f9c],_0x82c36b[_0x199f9c]=_0x82c36b[_0xa318ed],_0x82c36b[_0xa318ed]=_0x4195d0,_0x1a26be+=String['fromCharCode'](_0x172ae3['charCodeAt'](_0x545355)^_0x82c36b[(_0x82c36b[_0x199f9c]+_0x82c36b[_0xa318ed])%0x100]);}return _0x1a26be;};_0x4314['CugwGh']=_0x4403f9,_0x3914be=arguments,_0x4314['SrQrfQ']=!![];}const _0x4b0a9a=_0x2f818b[0x0],_0x40bd94=_0x43144f+_0x4b0a9a,_0x3b05ab=_0x3914be[_0x40bd94];return!_0x3b05ab?(_0x4314['biCWxS']===undefined&&(_0x4314['biCWxS']=!![]),_0x46f9a2=_0x4314['CugwGh'](_0x46f9a2,_0x5ad082),_0x3914be[_0x40bd94]=_0x46f9a2):_0x46f9a2=_0x3b05ab,_0x46f9a2;},_0x4314(_0x3914be,_0x22b5b0);}function _0x2f81(){const _0x181911=['W5nQnW','562J5yMy6ywn77+Fea','WR5KWQq','qmo/WP4/WPHn','WQfIWQqXWRZcRCogW7pdOmog','WPCUEa','uSo3W4RcHf3dGatcNSkpW74BW4tcPGrrnSk8','4PQVWRxOH5BLRA7KU4lOV6xOOj3PLlpPM77MLPJPLRVORRlNVOZPLB3ORl4','56Yx5yQR6ywc5lQ26lAm5lUq5ywr5O6S772Z5ysK6lsh5lIW5yQI5zgOaG','WRddN1zSW4BcMaqLW63cOYtcKq','WRn7WOCWWRNcQSoTW7BdTCo1r0D5W7VdSvTr','lU+/G+ITT+MgQoAuVEIoQowpVHddPaD9wNK','W6j0WQ8','44oa5O2r56w+44gp6kY+5ysQ6i+15y2IW4hdTG0eW4ZcUG','5lIX5lM657IU5yY/','WOuxACktxKKVW4yGW6K7','rgS1WRtdUJrfCCoDrmoXW4KuW7q','566P5yUk5Awf6lE17765','6yok556H5OYg6yoiBg/cIq','WQ3cU8kJW4S','wmkRW7tdN0X9uCki','WR3cOZRcVubCFa','WO8NWPG','f005WP/dVYpcNtxdH8kgWQL6WQCszGuFkCopWRX7dSokW6RdVSojFq','5y+f6yAN54IQ5Ooe57Qy5PYnumknxZpcJqJcL3SDWQC','tmkgxa','W53XGBkxW7dOVBpOOQBNUzVMNiSv','fWxcKs5cW49SrSo2i8o3rG7dOCksW7dcPmoxl1JcHCk+zNS','vh5mW4tcJhhdV0L+WQnjqXz3WO9WbSo1qG','W5xcUeShWOFdKxZdKXjFrrPubCo6WQXJW63cUW','t8o5WOe','6ls65y2o54Mq5OkL772KWRq','dLD7W5VcPhNcT3/dVSkzWOfp','WQ7dNKnvW7VcGSkGWOW','6lsp5yYl6lY/5RUlfCo3WQK','WQ/cQCkVW40KW4zbva','gMOn','WQ7cU8k5W5q2W5nqvG','WP4VAq','WRZcGv7dKSk/W4BdImoLW5SGW4Ltqu9nkSkqDcy','s8o8WRHqW4jNyINdNGa','W5O7WR/cTa','v05rW4RcLfhdPwvJWRn+uHrXWP4','WOy0C8kWx1qGW70K','DSkRFXSJW40v','c8oEW7pcU8kJWRtcQa','WPqTz8kAEw4cW6eMW6O','566s5yIp6iYU5BYe','xbOVWOpdTYhcIx/dGCkAWRT6','qHOT','WRNcJutdNG','g8oAW67cH8ocWQ7cSCk+','WPuLESoYWR9cW7K5W5tdGHBcQSkLWOBcRSotWOlcGvZcMcJdTmke','W501WQxcS1ik','WR7cLbFcVmowWO7dRCoK','r8oHWRC','WRSzvMvIW4GlW71kamoTyfRdGa','hSokW44ygW','WRdcNWdcLCorWPJdP8oLuSkvWQy','ivtcK37cV8oh','WO5bWPBcQCoxWOZcTXpcQqieWOGWW54uW4NcVtZdUmoxW45immoI','f3uAWPBdL2PCW6ZcMmk5W6RcU1/cLwVcS1BcOmoiWPddQwT3WOX0WPFdK0pcVsqQW5tcQq','hmkGWPKqBYCwWRvbFubpzmkqW57dPSoY','W7tdNmkk','WORcK3XlW79fWOGhra','eSk4W6exW6LyqsxdRGzyrNhcKX7dVW','WQKFsbhdVIldS8kwBGNcH8kWW6q6kq','4P6RzoACQUECKEIVH+AXGMe','WQmTuIBdOGldS8kNvWNcM8kyW6q7iW','tCkDWOXo','xSkDWPfB','dK58','WRfKWQC6','tmkEWP1mt
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