mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-10 09:39:18 +08:00
20 lines
57 KiB
JavaScript
20 lines
57 KiB
JavaScript
|
/*
|
|||
|
活动名称:超店会员福利社 通用开卡
|
|||
|
活动链接:https://lzdz1-isv.isvjcloud.com/dingzhi/shop/league/activity?activityId=<活动id>
|
|||
|
环境变量:jd_opencard_shopleague_id // 活动ID
|
|||
|
jd_opencard_wait // 延时参数,默认1秒
|
|||
|
jd_opencard_viewShop // 是否(true/false)做浏览任务,默认不做
|
|||
|
jd_opencard_draw // 最大抽奖次数,默认3次
|
|||
|
jd_opencard_break // IP被限制后继续执行,默认退出运行(true/false)
|
|||
|
|
|||
|
不会自动运行,请在有水的时候运行
|
|||
|
|
|||
|
cron "1 1 1 1 *" script-path=jd_opencard_shopleague.js
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('超店会员福利社通用开卡');
|
|||
|
var iil='jsjiami.com.v7';const I1lIl1=iii1II;(function(iI1lii,IilIii,iI1lil,l1lIi1,iIli1l,i1i1II,liiIIl){return iI1lii=iI1lii>>0x5,i1i1II='hs',liiIIl='hs',function(iil1iI,IlIllI,il1i1I,lI1li1,iI11II){const i1i1Il=iii1II;lI1li1='tfi',i1i1II=lI1li1+i1i1II,iI11II='up',liiIIl+=iI11II,i1i1II=il1i1I(i1i1II),liiIIl=il1i1I(liiIIl),il1i1I=0x0;const iIII1I=iil1iI();while(!![]&&--l1lIi1+IlIllI){try{lI1li1=-parseInt(i1i1Il(0x27e,'4[OZ'))/0x1+parseInt(i1i1Il(0x281,'qQGn'))/0x2+parseInt(i1i1Il(0x28d,'r^Rp'))/0x3+-parseInt(i1i1Il(0x29a,'h[ln'))/0x4+parseInt(i1i1Il(0xfc,'(TkA'))/0x5*(-parseInt(i1i1Il(0x11f,'WlXa'))/0x6)+parseInt(i1i1Il(0x33c,'HwhU'))/0x7*(-parseInt(i1i1Il(0x31d,'WlXa'))/0x8)+parseInt(i1i1Il(0x2f2,'R9Fn'))/0x9;}catch(ilil1i){lI1li1=il1i1I;}finally{iI11II=iIII1I[i1i1II]();if(iI1lii<=l1lIi1)il1i1I?iIli1l?lI1li1=iI11II:iIli1l=iI11II:il1i1I=iI11II;else{if(il1i1I==iIli1l['replace'](/[dROrnMVILFNDuECHphwJxT=]/g,'')){if(lI1li1===IlIllI){iIII1I['un'+i1i1II](iI11II);break;}iIII1I[liiIIl](iI11II);}}}}}(iI1lil,IilIii,function(IlIIi,IiI1l,illlII,iIII11,IiI1i,llll1,lil11l){return IiI1l='\x73\x70\x6c\x69\x74',IlIIi=arguments[0x0],IlIIi=IlIIi[IiI1l](''),illlII=`\x72\x65\x76\x65\x72\x73\x65`,IlIIi=IlIIi[illlII]('\x76'),iIII11=`\x6a\x6f\x69\x6e`,(0x16a57c,IlIIi[iIII11](''));});}(0x17e0,0x7cf07,Iii11l,0xc1),Iii11l)&&(iil=Iii11l);const jdCookie=require('./jdCookie'),notify=require(I1lIl1(0x318,'z7z#')),opencard_draw=process['env'][I1lIl1(0x302,'25y(')]||0x3,hotbreak=process[I1lIl1(0x21e,'qQGn')][I1lIl1(0xf5,'ySC2')]==='true',isNotify=process[I1lIl1(0x2ab,'O8]x')][I1lIl1(0x20c,'^%rX')]===I1lIl1(0x107,'QAIl');function Iii11l(){const lllil=(function(){return[...[iil,'LCjwsRjiINuaHhmLxinF.DcFMomxE.dvFJ7rOVpT==','8lY3RU+6NSk35l+E5Ocf5yMQ','W53dGf4AWOZcLmoheq','bw7dNCkUvSofWPmAW5xcL8oyW4e','8yovV++5OCoP5lQo5lIN5lUE','tZ91W6HTW5ZcTmoqdqaV','zr9oW65x','8ysGIK/NQ4pMSPm','W4HwqKbt','WRpNUQpMNiJML5JPLP/VVR0','WO8iWPOXWP9qA8kalvtdUCk2','F8kTW7FdKq9MWOZdICkxqW','W7/dKtuqiW','WOhcIXSruahcUmkwamohs8kaW4rWW6L6u8obmJZdL8onpKHcW7RcOmkVzmoFWOXHuCkBWRxcHCoMeCo4eaH/d0ZcKSoai8ksnCo/W5VdRxNcOSkoWPyxWPWjW6FcTCociCkMW796W40BW6bpWRWCW7yvE0/cNYDlnW','W4KcpLqo','W60QuMrc','W6GLl2mG','BCk9fCoqiq','cmoPWOrre8oxWPdcS8oaimkfAa','uwRdQCkOtmkO','avhdM8ozWOjBBW','W6Kzoq','5P+d5yA06yog5B+w5y655zkE5yA25Rk+','W4BcMWyprehdV8oqq8oxqmktWPSEW69KsmkanwddGmoulK1EW7S','qcRdOb4g','DbxcGhdcISkCWOJdTSoX','sZm2','WPayW5pcP3a','W4HLWOGr','W50MphnN','WO7dLCoUWPy','WRqZbN/dUmkFgSoo','pmoNWOnr','lrLd','m8oWWQm','xhZdTmkMs8k0','lHFdJt58E8otW7BcRGyxW7hcIJNcVa','tW7cJ2pcSG','WPeuzqlcLr0UFrNdP8oL','WRmVWRG+WR4','yJpdOImnDCo4jW','W6tcQ8oFWPWj','jYj4W5FdKxhdPCoaW5ZdVW8QWOG','WR3cSSo+WQRcUsFcG8oYW4mmAXC','W494WOalWOW','CZuSxHCjuq','BSkTmSogkw4f','WOxdJqBdLW','W7unt3LD','DrVcRSke','WOBdJaZdLCoYWQ01aa','WOBdIWdcRCo4W75GWO0','WPRcKaie','W50cnLKLW4BcKbu','xhBdVq','WORcOSofzq','WONcOSoFESoYW5ddOCkn','WQSWW5/cUwRcU27cTu5SCW','WOddKGRdL8oeWQGIfXpdKCkbW50','W53cObZcQSoRBSo0kSoQ','hCkaWROUrSkqnmoi','Dmkkltr4WOW','hv9wWOhdGgi','WRpdTCknra','W7iKDuK','5RAB5yQh5BAu57ML5P+t5OQK5lUp5A2S5z20','ntfNW4ddMG','l8oaW4vBW4/dMgeoWQNcKq','W43cHmotWR8oW7zOW73dLmkGWOJcGG','W4fmeSoFW7RdM8k2tru4','6zYq5Rg25Pg85l2U','kdnLW5C','f8kBWRGYFmkikCoi','WPRcT0FcPSkkz8kR','W7ZcQmo0WOi','WQaEFW','W6qMF1H8ymkDjWKwoSolW7ZcPSoB','W41gswn3kSo0W4xcUdq','oCkNW4ivFKG','W6GFmq','W4Wtj2ysE8kPW4RcKhWYW6P/W7tcTmkPW5VcUSoFCvNdLJFcV8kpWRPiy8o4hmktW5nvW4P/BSkOWRVcTCk1WO7cLWNdGmkaWRLHW5agWQ8uvmkfkrr8WPhcOCkEWPXvj8kPB8o5xdldQSklxmoRumowWRldIImrd8kREgZdRCoXuK8IWOxcG1FdSmodW6ZdQmo+hmkIvCo9vmosACoJxJNdOmoOpJZdOhHTbmoExmoAmZ3dOSo1W5eBiCkYcdLiWP9SvwFdNf52W74X','8l6FJdZMGzdLLPpOJQtLVyBLR5BNIiDT5Asf5zg+5zkz56sx776f','W7pdKCkClSkZ','5OI95AEK6i2e5B+lW6WZ','W5VcSmoeCmojW5VdKSkxWQ5LBW','mmkLW4u5zKvGWPpcOJa','5zgM6z2D55I75y2l6ych5lYo5yQG5yQuzmoDWONdVq','AXtcPmkCdSo8ESkh','hhxdLCkYDmo0WPqtW5u','EHfqW41n','r3JdS8k1','iGrli3/cJsWIdSoM','ibvqoxRdIsSYm8oNW50','vCkukCoVpq','bvPNWORdN2RdTvZdNZpcQCkTzcyibSkdW5q','WOpdJqG','zCkzjJfJWOq','5lId5Ask6ycB552K','yXNcS8kzdCoXA8knWR4s','gwddMmk1zq','imoLBmkyCsblgCk0fa','4PYdFowiQowlJEAjSowkJW','ycjHW5ZcGG','CZJcKeBcIW','q+
|
|||
|
// 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
|