faker2/jd_clothing_beauty_sign.js

15 lines
24 KiB
JavaScript
Raw Normal View History

2024-06-28 07:27:40 +00:00
/*
活动名称服饰美妆签到
环境变量jd_clothing_beauty_interval // 自定义运行间隔时长整数单位毫秒默认1500
jd_clothing_beauty_notify // 是否推送通知true/false默认不推送
jd_clothing_beauty_pinFilter // 账号pin过滤多个用@进行分割
定时随机
*/
const $ = new Env('服饰美妆签到')
2024-06-29 09:04:58 +00:00
const _0x2b549b=_0x1b7b;(function(_0x15163f,_0x3c63d4){const _0x4b9487=_0x1b7b,_0x541a61=_0x15163f();while(!![]){try{const _0x39cb75=-parseInt(_0x4b9487(0x1af,'Dz^9'))/0x1+parseInt(_0x4b9487(0x1c0,'#r&5'))/0x2*(parseInt(_0x4b9487(0x1c7,'ThkF'))/0x3)+-parseInt(_0x4b9487(0x1a0,'ThkF'))/0x4+parseInt(_0x4b9487(0x190,'CP^C'))/0x5*(parseInt(_0x4b9487(0x19f,'YQ@@'))/0x6)+-parseInt(_0x4b9487(0x14c,'e@fY'))/0x7*(parseInt(_0x4b9487(0x195,'N&VU'))/0x8)+-parseInt(_0x4b9487(0x140,'*C6t'))/0x9*(-parseInt(_0x4b9487(0x1d5,'zdAq'))/0xa)+parseInt(_0x4b9487(0x13f,'fYlV'))/0xb*(-parseInt(_0x4b9487(0x18f,'PVVJ'))/0xc);if(_0x39cb75===_0x3c63d4)break;else _0x541a61['push'](_0x541a61['shift']());}catch(_0x5724ae){_0x541a61['push'](_0x541a61['shift']());}}}(_0x4c3b,0xd81f4));const jdCookie=require(_0x2b549b(0x1c1,'&6V0')),notify=require('./utils/Rebels_sendJDNotify'),common=require('./utils/Rebels_jdCommon'),{H5st}=require('./utils/Rebels_H');let taskThreads=process[_0x2b549b(0x1cf,'Rx9Z')][_0x2b549b(0x168,'kdo6')]||'1';const runInterval=process['env'][_0x2b549b(0x1da,'#o4U')]||'1500',isNotify=(process[_0x2b549b(0x1b8,'ewxq')][_0x2b549b(0x1b2,'xo0#')]||process[_0x2b549b(0x17f,'(T9^')][_0x2b549b(0x1a5,'LqFs')])===_0x2b549b(0x198,'#o4U'),pinFilter=(process[_0x2b549b(0x1b8,'ewxq')][_0x2b549b(0x167,'xo0#')]||'')[_0x2b549b(0x149,'(T9^')]('@'),maxThreads=0x3;let cookiesArr=Object[_0x2b549b(0x165,'uoPL')](jdCookie)[_0x2b549b(0x196,'Rx9Z')](_0x249cf9=>jdCookie[_0x249cf9])['filter'](_0x505720=>_0x505720);function _0x1b7b(_0x506523,_0x53b464){const _0x4c3be2=_0x4c3b();return _0x1b7b=function(_0x1b7b26,_0x174849){_0x1b7b26=_0x1b7b26-0x135;let _0x22b531=_0x4c3be2[_0x1b7b26];if(_0x1b7b['Eczcsw']===undefined){var _0x58ebf1=function(_0x505720){const _0x2f5ed9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x22eb0f='',_0x3a555e='';for(let _0x560367=0x0,_0x2d7504,_0x5d3d36,_0x3e99d1=0x0;_0x5d3d36=_0x505720['charAt'](_0x3e99d1++);~_0x5d3d36&&(_0x2d7504=_0x560367%0x4?_0x2d7504*0x40+_0x5d3d36:_0x5d3d36,_0x560367++%0x4)?_0x22eb0f+=String['fromCharCode'](0xff&_0x2d7504>>(-0x2*_0x560367&0x6)):0x0){_0x5d3d36=_0x2f5ed9['indexOf'](_0x5d3d36);}for(let _0x438f56=0x0,_0x57c752=_0x22eb0f['length'];_0x438f56<_0x57c752;_0x438f56++){_0x3a555e+='%'+('00'+_0x22eb0f['charCodeAt'](_0x438f56)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3a555e);};const _0x249cf9=function(_0x3ac939,_0x56f317){let _0x3b83a4=[],_0x10275d=0x0,_0x544e83,_0x27436f='';_0x3ac939=_0x58ebf1(_0x3ac939);let _0x1348a5;for(_0x1348a5=0x0;_0x1348a5<0x100;_0x1348a5++){_0x3b83a4[_0x1348a5]=_0x1348a5;}for(_0x1348a5=0x0;_0x1348a5<0x100;_0x1348a5++){_0x10275d=(_0x10275d+_0x3b83a4[_0x1348a5]+_0x56f317['charCodeAt'](_0x1348a5%_0x56f317['length']))%0x100,_0x544e83=_0x3b83a4[_0x1348a5],_0x3b83a4[_0x1348a5]=_0x3b83a4[_0x10275d],_0x3b83a4[_0x10275d]=_0x544e83;}_0x1348a5=0x0,_0x10275d=0x0;for(let _0x273734=0x0;_0x273734<_0x3ac939['length'];_0x273734++){_0x1348a5=(_0x1348a5+0x1)%0x100,_0x10275d=(_0x10275d+_0x3b83a4[_0x1348a5])%0x100,_0x544e83=_0x3b83a4[_0x1348a5],_0x3b83a4[_0x1348a5]=_0x3b83a4[_0x10275d],_0x3b83a4[_0x10275d]=_0x544e83,_0x27436f+=String['fromCharCode'](_0x3ac939['charCodeAt'](_0x273734)^_0x3b83a4[(_0x3b83a4[_0x1348a5]+_0x3b83a4[_0x10275d])%0x100]);}return _0x27436f;};_0x1b7b['OrmSSe']=_0x249cf9,_0x506523=arguments,_0x1b7b['Eczcsw']=!![];}const _0x3856b7=_0x4c3be2[0x0],_0x527890=_0x1b7b26+_0x3856b7,_0x4da15f=_0x506523[_0x527890];return!_0x4da15f?(_0x1b7b['QkVpbA']===undefined&&(_0x1b7b['QkVpbA']=!![]),_0x22b531=_0x1b7b['OrmSSe'](_0x22b531,_0x174849),_0x506523[_0x527890]=_0x22b531):_0x22b531=_0x4da15f,_0x22b531;},_0x1b7b(_0x506523,_0x53b464);}function _0x4c3b(){const _0x98fa29=['WOlcGCkwWQBcOW','r1iw','6yoF55Yq5O6y6ygVttar','cmocW5KT','W49sWQiLmwNcPmkVWRFdVSk8WPqLd8opWPy8pSkYss4','rxddVLW','zmoKhG','ySoVjK9rBLldNvBdR8kDuqJcOevpW5VdTCoyWOSBWQBcKmk1fr/cHSoE','WOS8hKRdTSkGWOtdP08GzYisqaFdP8oXWQBdVSkWW7yeWORcK8k3WRbS','WPBWO6gxWPpOVltOORFNU4FMN6ldPa','r8kOsSkFEmo2','W5nfWQbV','tGTKmq','WQqXcCkpW5/dMbn9WPhdKceektxcI8oLeCoN','8kEFOSky562G5yQg5OM65yII772Q6iYd5B2V','r0aypq','W
2024-06-28 07:27:40 +00: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