faker3/jd_seckill_viewTask.js

15 lines
37 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
活动名称秒杀浏览领京豆
环境变量jd_seckill_viewTask_interval // 自定义运行间隔时长整数单位毫秒默认1000
jd_seckill_viewTask_notify // 是否推送通知true/false默认不推送
jd_seckill_viewTask_pinFilter // 账号pin过滤多个用@进行分割
定时随机
*/
const $ = new Env('秒杀浏览领京豆')
var il='jsjiami.com.v7';const il1iI1=iii1II;(function(i1l1II,i1ill,I1l11l,lilIIi,i1l1Il,llIli,i1i11l){return i1l1II=i1l1II>>0x4,llIli='hs',i1i11l='hs',function(i1i11i,II11l1,Iil1lI,IiiliI,iii1iI){const iilll=iii1II;IiiliI='tfi',llIli=IiiliI+llIli,iii1iI='up',i1i11l+=iii1iI,llIli=Iil1lI(llIli),i1i11l=Iil1lI(i1i11l),Iil1lI=0x0;const llIll=i1i11i();while(!![]&&--lilIIi+II11l1){try{IiiliI=-parseInt(iilll(0x234,'W$k!'))/0x1*(-parseInt(iilll(0x188,'7FLi'))/0x2)+parseInt(iilll(0x1f9,'3WLl'))/0x3+parseInt(iilll(0x1f1,'XwPH'))/0x4+-parseInt(iilll(0x22b,'[74C'))/0x5*(parseInt(iilll(0x251,'Q@kn'))/0x6)+-parseInt(iilll(0x1e4,'^^oh'))/0x7+-parseInt(iilll(0x239,'PT&W'))/0x8*(parseInt(iilll(0x1f7,'v)8c'))/0x9)+-parseInt(iilll(0x220,'8gTh'))/0xa*(parseInt(iilll(0x198,'^^oh'))/0xb);}catch(il1iII){IiiliI=Iil1lI;}finally{iii1iI=llIll[llIli]();if(i1l1II<=lilIIi)Iil1lI?i1l1Il?IiiliI=iii1iI:i1l1Il=iii1iI:Iil1lI=iii1iI;else{if(Iil1lI==i1l1Il['replace'](/[wUFWOTEQfXVpgxYMrkuIl=]/g,'')){if(IiiliI===II11l1){llIll['un'+llIli](iii1iI);break;}llIll[i1i11l](iii1iI);}}}}}(I1l11l,i1ill,function(iilli,IlllIl,II11lI,lI1IIi,I1l11I,Ilil1l,iIIiii){return IlllIl='\x73\x70\x6c\x69\x74',iilli=arguments[0x0],iilli=iilli[IlllIl](''),II11lI=`\x72\x65\x76\x65\x72\x73\x65`,iilli=iilli[II11lI]('\x76'),lI1IIi=`\x6a\x6f\x69\x6e`,(0x173a21,iilli[lI1IIi](''));});}(0xc60,0x6eb86,Iii11l,0xc8),Iii11l)&&(il=Iii11l);function iii1II(_0x3fd854,_0x39dfa1){const _0x5baaae=Iii11l();return iii1II=function(_0x552303,_0x471a1f){_0x552303=_0x552303-0x154;let _0x519eb2=_0x5baaae[_0x552303];if(iii1II['kCqdPw']===undefined){var _0x17b187=function(_0x57f057){const _0x269cae='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xfcc280='',_0x262f44='';for(let _0x2bab07=0x0,_0xa4e839,_0x557bcf,_0x441707=0x0;_0x557bcf=_0x57f057['charAt'](_0x441707++);~_0x557bcf&&(_0xa4e839=_0x2bab07%0x4?_0xa4e839*0x40+_0x557bcf:_0x557bcf,_0x2bab07++%0x4)?_0xfcc280+=String['fromCharCode'](0xff&_0xa4e839>>(-0x2*_0x2bab07&0x6)):0x0){_0x557bcf=_0x269cae['indexOf'](_0x557bcf);}for(let _0xe5659=0x0,_0x456fce=_0xfcc280['length'];_0xe5659<_0x456fce;_0xe5659++){_0x262f44+='%'+('00'+_0xfcc280['charCodeAt'](_0xe5659)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x262f44);};const _0xedaa01=function(_0x1805c4,_0x478f6a){let _0x355d96=[],_0x33337e=0x0,_0x4cc123,_0x2a34ab='';_0x1805c4=_0x17b187(_0x1805c4);let _0x3626c5;for(_0x3626c5=0x0;_0x3626c5<0x100;_0x3626c5++){_0x355d96[_0x3626c5]=_0x3626c5;}for(_0x3626c5=0x0;_0x3626c5<0x100;_0x3626c5++){_0x33337e=(_0x33337e+_0x355d96[_0x3626c5]+_0x478f6a['charCodeAt'](_0x3626c5%_0x478f6a['length']))%0x100,_0x4cc123=_0x355d96[_0x3626c5],_0x355d96[_0x3626c5]=_0x355d96[_0x33337e],_0x355d96[_0x33337e]=_0x4cc123;}_0x3626c5=0x0,_0x33337e=0x0;for(let _0x4ea53a=0x0;_0x4ea53a<_0x1805c4['length'];_0x4ea53a++){_0x3626c5=(_0x3626c5+0x1)%0x100,_0x33337e=(_0x33337e+_0x355d96[_0x3626c5])%0x100,_0x4cc123=_0x355d96[_0x3626c5],_0x355d96[_0x3626c5]=_0x355d96[_0x33337e],_0x355d96[_0x33337e]=_0x4cc123,_0x2a34ab+=String['fromCharCode'](_0x1805c4['charCodeAt'](_0x4ea53a)^_0x355d96[(_0x355d96[_0x3626c5]+_0x355d96[_0x33337e])%0x100]);}return _0x2a34ab;};iii1II['RTBeaw']=_0xedaa01,_0x3fd854=arguments,iii1II['kCqdPw']=!![];}const _0x42fbc0=_0x5baaae[0x0],_0x12d4c7=_0x552303+_0x42fbc0,_0x25c392=_0x3fd854[_0x12d4c7];return!_0x25c392?(iii1II['UZRuUr']===undefined&&(iii1II['UZRuUr']=!![]),_0x519eb2=iii1II['RTBeaw'](_0x519eb2,_0x471a1f),_0x3fd854[_0x12d4c7]=_0x519eb2):_0x519eb2=_0x25c392,_0x519eb2;},iii1II(_0x3fd854,_0x39dfa1);}function Iii11l(){const iii1lI=(function(){return[...[il,'OxjsIUkjExQiYTaMTmriEf.pVcoXmM.Wvg7ulTwF==','lmo6v3yb','a1rl','jSoUWROxW7u','qeKLWRldG8ooWR0kWPuSe1y','WPOSWO3dQg4IWOG','vK03WRFdNCojWR8','f8oyW7qhWO3dNrSeWQ44WQRdRW','WPrODmkRda','eCkrwGNdTaRcOJe','k8oezW','6lAA5yYd6l6G5RUyWQhcGSo9','5lQW5AEA5Bwg5A+q5OIU5lUx5yMA','teSKWP7dVq','gmk9W5uYAW','egvUovm','W4z8gZPlW7Or','hYyMdmko','imkXa2ZdQG','CL41WPz3','4PYEgUADUEIdVEATVUEIUUwLSoEtOv4','W7BdThioW4lcTSonW4KQW6SG','raBcRSkghG','v8kBWO0','4PYlWOVMNkROG4NMRA3NOPpLP6ZNKyPJ','cSkxlgNdOa','6lAy5y+R
// 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