mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
15 lines
29 KiB
JavaScript
15 lines
29 KiB
JavaScript
|
/*
|
|||
|
活动名称:服饰美妆签到
|
|||
|
环境变量:jd_clothing_beauty_interval // 自定义运行间隔时长(整数,单位毫秒),默认1500
|
|||
|
jd_clothing_beauty_notify // 是否推送通知(true/false),默认不推送
|
|||
|
jd_clothing_beauty_pinFilter // 账号pin过滤,多个用@进行分割
|
|||
|
|
|||
|
定时随机
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('服饰美妆签到')
|
|||
|
var iil='jsjiami.com.v7';const ill11l=iii1II;(function(il1i11,IlIll1,IlIII,ilil1l,illlIi,I1lIii,IiI1I){return il1i11=il1i11>>0x9,I1lIii='hs',IiI1I='hs',function(illlIl,i11ill,IIIIIi,IIIIIl,I1lIil){const lllill=iii1II;IIIIIl='tfi',I1lIii=IIIIIl+I1lIii,I1lIil='up',IiI1I+=I1lIil,I1lIii=IIIIIi(I1lIii),IiI1I=IIIIIi(IiI1I),IIIIIi=0x0;const IIIl1i=illlIl();while(!![]&&--ilil1l+i11ill){try{IIIIIl=-parseInt(lllill(0x1c8,'%Y8%'))/0x1+-parseInt(lllill(0x1e7,'*(5V'))/0x2*(parseInt(lllill(0x1b8,'KkLV'))/0x3)+-parseInt(lllill(0x18c,'U83g'))/0x4*(-parseInt(lllill(0x23f,'lImw'))/0x5)+parseInt(lllill(0x219,'FTWW'))/0x6*(parseInt(lllill(0x192,'Wbxn'))/0x7)+-parseInt(lllill(0x1c0,'AEa6'))/0x8*(parseInt(lllill(0x246,'#J[m'))/0x9)+parseInt(lllill(0x21d,'aEj('))/0xa*(-parseInt(lllill(0x1af,'h7f1'))/0xb)+parseInt(lllill(0x1e8,'h7f1'))/0xc*(parseInt(lllill(0x200,'aEj('))/0xd);}catch(liiII1){IIIIIl=IIIIIi;}finally{I1lIil=IIIl1i[I1lIii]();if(il1i11<=ilil1l)IIIIIi?illlIi?IIIIIl=I1lIil:illlIi=I1lIil:IIIIIi=I1lIil;else{if(IIIIIi==illlIi['replace'](/[tbKENLGhDHgSRVxyuPUT=]/g,'')){if(IIIIIl===i11ill){IIIl1i['un'+I1lIii](I1lIil);break;}IIIl1i[IiI1I](I1lIil);}}}}}(IlIII,IlIll1,function(IIIl1l,lllll,i11ili,iil1l1,lllli,iiili1,ill11i){return lllll='\x73\x70\x6c\x69\x74',IIIl1l=arguments[0x0],IIIl1l=IIIl1l[lllll](''),i11ili=`\x72\x65\x76\x65\x72\x73\x65`,IIIl1l=IIIl1l[i11ili]('\x76'),iil1l1=`\x6a\x6f\x69\x6e`,(0x1731cd,IIIl1l[iil1l1](''));});}(0x18600,0xe2124,Iii11l,0xc5),Iii11l)&&(iil=`\x6c2`);const jdCookie=require(ill11l(0x1ff,'aGcN')),notify=require(ill11l(0x1c9,'Yejg')),common=require(ill11l(0x1b4,'02pP')),{H5st}=require(ill11l(0x20d,'rQbJ'));let taskThreads=process[ill11l(0x1ec,'q4u2')][ill11l(0x193,'!a%H')]||'1';const runInterval=process['env'][ill11l(0x178,'!a%H')]||'1500',isNotify=(process[ill11l(0x1ec,'q4u2')][ill11l(0x185,'rQbJ')]||process[ill11l(0x1b3,'%Y8%')][ill11l(0x1e5,'M7O7')])==='true',pinFilter=(process[ill11l(0x17e,'s1X]')]['jd_clothing_beauty_pinFilter']||'')[ill11l(0x224,'G1hK')]('@'),maxThreads=0x3;function iii1II(_0x339b75,_0x14b3fb){const _0x2079d8=Iii11l();return iii1II=function(_0x101e4c,_0x33f66c){_0x101e4c=_0x101e4c-0x170;let _0x5bd061=_0x2079d8[_0x101e4c];if(iii1II['ihsDzd']===undefined){var _0x146387=function(_0x39cdde){const _0x33e19b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1ec8ca='',_0x8de70a='';for(let _0x1dbdc4=0x0,_0x15ad1d,_0x278adc,_0x92613=0x0;_0x278adc=_0x39cdde['charAt'](_0x92613++);~_0x278adc&&(_0x15ad1d=_0x1dbdc4%0x4?_0x15ad1d*0x40+_0x278adc:_0x278adc,_0x1dbdc4++%0x4)?_0x1ec8ca+=String['fromCharCode'](0xff&_0x15ad1d>>(-0x2*_0x1dbdc4&0x6)):0x0){_0x278adc=_0x33e19b['indexOf'](_0x278adc);}for(let _0x4d5963=0x0,_0x253a7d=_0x1ec8ca['length'];_0x4d5963<_0x253a7d;_0x4d5963++){_0x8de70a+='%'+('00'+_0x1ec8ca['charCodeAt'](_0x4d5963)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x8de70a);};const _0x376029=function(_0x4239fc,_0x4e65f9){let _0x4a672e=[],_0x1c6003=0x0,_0x12ba00,_0x93a050='';_0x4239fc=_0x146387(_0x4239fc);let _0x483e50;for(_0x483e50=0x0;_0x483e50<0x100;_0x483e50++){_0x4a672e[_0x483e50]=_0x483e50;}for(_0x483e50=0x0;_0x483e50<0x100;_0x483e50++){_0x1c6003=(_0x1c6003+_0x4a672e[_0x483e50]+_0x4e65f9['charCodeAt'](_0x483e50%_0x4e65f9['length']))%0x100,_0x12ba00=_0x4a672e[_0x483e50],_0x4a672e[_0x483e50]=_0x4a672e[_0x1c6003],_0x4a672e[_0x1c6003]=_0x12ba00;}_0x483e50=0x0,_0x1c6003=0x0;for(let _0x2ec6f1=0x0;_0x2ec6f1<_0x4239fc['length'];_0x2ec6f1++){_0x483e50=(_0x483e50+0x1)%0x100,_0x1c6003=(_0x1c6003+_0x4a672e[_0x483e50])%0x100,_0x12ba00=_0x4a672e[_0x483e50],_0x4a672e[_0x483e50]=_0x4a672e[_0x1c6003],_0x4a672e[_0x1c6003]=_0x12ba00,_0x93a050+=String['fromCharCode'](_0x4239fc['charCodeAt'](_0x2ec6f1)^_0x4a672e[(_0x4a672e[_0x483e50]+_0x4a672e[_0x1c6003])%0x100]);}return _0x93a050;};iii1II['cVwtoQ']=_0x376029,_0x339b75=arguments,iii1II['ihsDzd']=!![];}const _0x2a1a48=_0x2079d8[0x0],_0x4ca16c=_0x101e4c+_0x2a1a48,_0x524c85=_0x339b75[_0x4ca16c];return!_0x524c85?(iii1II['dsEQhh']===undefined&&(iii1II['dsEQhh']=!![]),_0x5bd061=iii1II['cVwtoQ'](_0x5bd061,_0x33f66c),_0x339b75[
|
|||
|
// 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
|