mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-15 00:09:20 +08:00
25 lines
70 KiB
JavaScript
25 lines
70 KiB
JavaScript
|
/*
|
|||
|
活动名称:邀请好友入会得好礼
|
|||
|
活动链接:https://prodev.m.jd.com/mall/active/dVF7gQUVKyUcuSsVhuya5d2XD4F/index.html?code=<活动id>
|
|||
|
环境变量:jd_prodev_actCode // 活动ID
|
|||
|
jd_prodev_invitePin // 需要助力的默认用户名,不填默认CK1
|
|||
|
jd_prodev_Address // 用户登记收货地址,按照顺序依次填写 收件人@手机号@省份@城市@区县@详细地址,多个用管道符分开
|
|||
|
jd_prodev_needPhysicalPrize // 是否领取实物奖品(true/false),默认领取(只会助力到需要领取奖品的档位)
|
|||
|
jd_prodev_Notify // 是否推送通知(true/false),默认不推送
|
|||
|
|
|||
|
开卡邀请类活动,奖品自动过滤优惠券,自动助力并领取奖品,仅助力一个账号,🚀火箭本一秒运行5个号,助力指定账号需要先开通活动否则会提示邀请用户不存在
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('邀请好友入会得好礼')
|
|||
|
const jdCookie = require('./jdCookie')
|
|||
|
const common = require('./function/jdCommon')
|
|||
|
const notify = require('./function/sendJDNotify')
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';const l1l1iIl=i1Iilill;(function(ililiiil,iiiiiI1i,ili1iIIi,lliIli11,llliIli1,I1i11Iii,IIli1Ill){return ililiiil=ililiiil>>0x9,I1i11Iii='hs',IIli1Ill='hs',function(IIlIi1li,lilIi1l1,ll11iI1I,l1II1Il,iliIli1i){const lilI1ii1=i1Iilill;l1II1Il='tfi',I1i11Iii=l1II1Il+I1i11Iii,iliIli1i='up',IIli1Ill+=iliIli1i,I1i11Iii=ll11iI1I(I1i11Iii),IIli1Ill=ll11iI1I(IIli1Ill),ll11iI1I=0x0;const iI1IIi=IIlIi1li();while(!![]&&--lliIli11+lilIi1l1){try{l1II1Il=parseInt(lilI1ii1(0x463,'O#06'))/0x1*(-parseInt(lilI1ii1(0x2ce,'@*oJ'))/0x2)+parseInt(lilI1ii1(0x377,'RUx2'))/0x3+-parseInt(lilI1ii1(0x31b,'YS(D'))/0x4*(-parseInt(lilI1ii1(0x248,'kzq6'))/0x5)+parseInt(lilI1ii1(0x360,'YS(D'))/0x6*(parseInt(lilI1ii1(0x382,'4rE8'))/0x7)+parseInt(lilI1ii1(0x2c3,'CW8a'))/0x8*(parseInt(lilI1ii1(0x22b,'(^aO'))/0x9)+parseInt(lilI1ii1(0x4bc,'(P41'))/0xa+-parseInt(lilI1ii1(0x368,'6VQT'))/0xb*(parseInt(lilI1ii1(0x438,'i$Rl'))/0xc);}catch(I1Iil1Ii){l1II1Il=ll11iI1I;}finally{iliIli1i=iI1IIi[I1i11Iii]();if(ililiiil<=lliIli11)ll11iI1I?llliIli1?l1II1Il=iliIli1i:llliIli1=iliIli1i:ll11iI1I=iliIli1i;else{if(ll11iI1I==llliIli1['replace'](/[WGnlMKEUXPrRSHBhwu=]/g,'')){if(l1II1Il===lilIi1l1){iI1IIi['un'+I1i11Iii](iliIli1i);break;}iI1IIi[IIli1Ill](iliIli1i);}}}}}(ili1iIIi,iiiiiI1i,function(lI1Ili1l,iII1iliI,Il11I,iiiiIlil,l1lii1i1,iIii1ili,iIiiIIIl){return iII1iliI='\x73\x70\x6c\x69\x74',lI1Ili1l=arguments[0x0],lI1Ili1l=lI1Ili1l[iII1iliI](''),Il11I=`\x72\x65\x76\x65\x72\x73\x65`,lI1Ili1l=lI1Ili1l[Il11I]('\x76'),iiiiIlil=`\x6a\x6f\x69\x6e`,(0x13c306,lI1Ili1l[iiiiIlil](''));});}(0x18800,0x9093a,II1IIlI,0xc6),II1IIlI)&&(version_=II1IIlI);const actCode=process[l1l1iIl(0x2b5,'XE6B')][l1l1iIl(0x495,'kzq6')]||'';let invitePin=process[l1l1iIl(0x369,'CH1*')][l1l1iIl(0x4b0,'PUMK')]||'';const isNotify=process[l1l1iIl(0x493,'@*oJ')][l1l1iIl(0x28f,'#p#W')]===l1l1iIl(0x322,'iyIh'),needPhysicalPrize=process[l1l1iIl(0x31f,'@@)M')][l1l1iIl(0x20c,'hk60')]!==l1l1iIl(0x48d,'GTHm');let cookie='';const cookiesArr=Object[l1l1iIl(0x2c0,'BPHZ')](jdCookie)[l1l1iIl(0x280,'RlAI')](I1i1iI1l=>jdCookie[I1i1iI1l])[l1l1iIl(0x455,'6)Vi')](iil1111l=>iil1111l);function i1Iilill(_0x18cfc2,_0x15035e){const _0x1bb9ad=II1IIlI();return i1Iilill=function(_0x17ecbd,_0x501ade){_0x17ecbd=_0x17ecbd-0x162;let _0x301f8e=_0x1bb9ad[_0x17ecbd];if(i1Iilill['vvbhHy']===undefined){var _0x4b94c1=function(_0x2b2f71){const _0x5a8a90='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3fbad6='',_0x4eef5c='';for(let _0x4f8e3c=0x0,_0x476081,_0x54e63f,_0x422a6b=0x0;_0x54e63f=_0x2b2f71['charAt'](_0x422a6b++);~_0x54e63f&&(_0x476081=_0x4f8e3c%0x4?_0x476081*0x40+_0x54e63f:_0x54e63f,_0x4f8e3c++%0x4)?_0x3fbad6+=String['fromCharCode'](0xff&_0x476081>>(-0x2*_0x4f8e3c&0x6)):0x0){_0x54e63f=_0x5a8a90['indexOf'](_0x54e63f);}for(let _0x38602e=0x0,_0x20336e=_0x3fbad6['length'];_0x38602e<_0x20336e;_0x38602e++){_0x4eef5c+='%'+('00'+_0x3fbad6['charCodeAt'](_0x38602e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4eef5c);};const _0x4bc0d6=function(_0x236e8d,_0x5dd43b){let _0x386712=[],_0x995417=0x0,_0x53d201,_0x4771ce='';_0x236e8d=_0x4b94c1(_0x236e8d);let _0x311796;for(_0x311796=0x0;_0x311796<0x100;_0x311796++){_0x386712[_0x311796]=_0x311796;}for(_0x311796=0x0;_0x311796<0x100;_0x311796++){_0x995417=(_0x995417+_0x386712[_0x311796]+_0x5dd43b['charCodeAt'](_0x311796%_0x5dd43b['length']))%0x100,_0x53d201=_0x386712[_0x311796],_0x386712[_0x311796]=_0x386712[_0x995417],_0x386712[_0x995417]=_0x53d201;}_0x311796=0x0,_0x995417=0x0;for(let _0x5aec31=0x0;_0x5aec31<_0x236e8d['length'];_0x5aec31++){_0x311796=(_0x311796+0x1)%0x100,_0x995417=(_0x995417+_0x386712[_0x311796])%0x100,_0x53d201=_0x386712[_0x311796],_0x386712[_0x311796]=_0x386712[_0x995417],_0x386712[_0x995417]=_0x53d201,_0x4771ce+=String['fromCharCode'](_0x236e8d['charCodeAt'](_0x5aec31)^_0x386712[(_0x386712[_0x311796]+_0x386712[_0x995417])%0x100]);}return _0x4771ce;};i1Iilill['HHVRqA']=_0x4bc0d6,_0x18cfc2=arguments,i1Iilill['vvbhHy']=!![];}const _0x5aafc4=_0x1bb9ad[0x0],_0x4b0aaa=_0x17ecbd+_0x5aafc4,_0x5c9425=_0x18cfc2[_0x4b0aaa];retu
|
|||
|
|
|||
|
// 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
|