KR/jd_prodev.js

23 lines
62 KiB
JavaScript
Raw Normal View History

2023-08-02 16:28:54 +08:00
/*
活动名称邀请好友入会得好礼
活动链接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默认领取只会助力到需要领取奖品的档位
开卡邀请类活动奖品自动过滤优惠券自动助力并领取奖品仅助力一个账号
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#邀请好友入会得好礼
1 1 1 1 * jd_prodev.js, tag=邀请好友入会得好礼, enabled=true
*/
const $ = new Env('邀请好友入会得好礼')
2023-08-08 15:14:55 +08:00
var version_='jsjiami.com.v7';const Illlll=iii1II;(function(li1I,IIliil,ll1liI,lI1iiI,i11lII,iIIlli,ll1li1){return li1I=li1I>>0x4,iIIlli='hs',ll1li1='hs',function(iIIlll,I1iiiI,iiI1il,iiI1ii,I1iii1){const IIlilI=iii1II;iiI1ii='tfi',iIIlli=iiI1ii+iIIlli,I1iii1='up',ll1li1+=I1iii1,iIIlli=iiI1il(iIIlli),ll1li1=iiI1il(ll1li1),iiI1il=0x0;const lilii1=iIIlll();while(!![]&&--lI1iiI+I1iiiI){try{iiI1ii=parseInt(IIlilI(0x18f,'J8yv'))/0x1+parseInt(IIlilI(0xf6,'E2Pp'))/0x2+parseInt(IIlilI(0x268,'$mE]'))/0x3+parseInt(IIlilI(0x13c,'6&5A'))/0x4*(-parseInt(IIlilI(0x1ab,'G2@i'))/0x5)+-parseInt(IIlilI(0xd9,')!QI'))/0x6+-parseInt(IIlilI(0x2de,')4%R'))/0x7*(-parseInt(IIlilI(0x2a4,'cklr'))/0x8)+parseInt(IIlilI(0x2c5,'LfAQ'))/0x9;}catch(iIiii1){iiI1ii=iiI1il;}finally{I1iii1=lilii1[iIIlli]();if(li1I<=lI1iiI)iiI1il?i11lII?iiI1ii=I1iii1:i11lII=I1iii1:iiI1il=I1iii1;else{if(iiI1il==i11lII['replace'](/[EGgnFQIAOXMlkBNrtYhJ=]/g,'')){if(iiI1ii===I1iiiI){lilii1['un'+iIIlli](I1iii1);break;}lilii1[ll1li1](I1iii1);}}}}}(ll1liI,IIliil,function(ll1lil,IIlil1,I1Illl,ll1lii,li11,ilIlI1,I1Illi){return IIlil1='\x73\x70\x6c\x69\x74',ll1lil=arguments[0x0],ll1lil=ll1lil[IIlil1](''),I1Illl='\x72\x65\x76\x65\x72\x73\x65',ll1lil=ll1lil[I1Illl]('\x76'),ll1lii='\x6a\x6f\x69\x6e',(0x13849c,ll1lil[ll1lii](''));});}(0xcb0,0x572d4,Iii11l,0xcd),Iii11l)&&(version_=Iii11l);const ii1iI=require(Illlll(0x332,'1iQK')),IIIil=require(Illlll(0x225,'FnPa')),IIIii=require('./function/sendJDNotify'),iI111i=process[Illlll(0x32b,'oxHv')]['jd_prodev_actCode']||'';let I1I1l1=process['env'][Illlll(0x239,'R@[C')]||'';function iii1II(_0x5865d5,_0x1f98f4){const _0x2d7edb=Iii11l();return iii1II=function(_0x1a4b1f,_0x5cdcb8){_0x1a4b1f=_0x1a4b1f-0xca;let _0x4ba578=_0x2d7edb[_0x1a4b1f];if(iii1II['oXIAdz']===undefined){var _0x536b85=function(_0x29afe5){const _0x433b91='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xf6522f='',_0x20e1a1='';for(let _0x2d6256=0x0,_0x58af88,_0x336cf1,_0x239c27=0x0;_0x336cf1=_0x29afe5['charAt'](_0x239c27++);~_0x336cf1&&(_0x58af88=_0x2d6256%0x4?_0x58af88*0x40+_0x336cf1:_0x336cf1,_0x2d6256++%0x4)?_0xf6522f+=String['fromCharCode'](0xff&_0x58af88>>(-0x2*_0x2d6256&0x6)):0x0){_0x336cf1=_0x433b91['indexOf'](_0x336cf1);}for(let _0x546d20=0x0,_0x5e6045=_0xf6522f['length'];_0x546d20<_0x5e6045;_0x546d20++){_0x20e1a1+='%'+('00'+_0xf6522f['charCodeAt'](_0x546d20)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x20e1a1);};const _0x42cb12=function(_0x18f39b,_0xd3bcc5){let _0x1ada83=[],_0x1f50c2=0x0,_0x318848,_0x258344='';_0x18f39b=_0x536b85(_0x18f39b);let _0x43af24;for(_0x43af24=0x0;_0x43af24<0x100;_0x43af24++){_0x1ada83[_0x43af24]=_0x43af24;}for(_0x43af24=0x0;_0x43af24<0x100;_0x43af24++){_0x1f50c2=(_0x1f50c2+_0x1ada83[_0x43af24]+_0xd3bcc5['charCodeAt'](_0x43af24%_0xd3bcc5['length']))%0x100,_0x318848=_0x1ada83[_0x43af24],_0x1ada83[_0x43af24]=_0x1ada83[_0x1f50c2],_0x1ada83[_0x1f50c2]=_0x318848;}_0x43af24=0x0,_0x1f50c2=0x0;for(let _0x5df920=0x0;_0x5df920<_0x18f39b['length'];_0x5df920++){_0x43af24=(_0x43af24+0x1)%0x100,_0x1f50c2=(_0x1f50c2+_0x1ada83[_0x43af24])%0x100,_0x318848=_0x1ada83[_0x43af24],_0x1ada83[_0x43af24]=_0x1ada83[_0x1f50c2],_0x1ada83[_0x1f50c2]=_0x318848,_0x258344+=String['fromCharCode'](_0x18f39b['charCodeAt'](_0x5df920)^_0x1ada83[(_0x1ada83[_0x43af24]+_0x1ada83[_0x1f50c2])%0x100]);}return _0x258344;};iii1II['aaoElQ']=_0x42cb12,_0x5865d5=arguments,iii1II['oXIAdz']=!![];}const _0x552263=_0x2d7edb[0x0],_0x128494=_0x1a4b1f+_0x552263,_0xe915f0=_0x5865d5[_0x128494];return!_0xe915f0?(iii1II['EQUqNs']===undefined&&(iii1II['EQUqNs']=!![]),_0x4ba578=iii1II['aaoElQ'](_0x4ba578,_0x5cdcb8),_0x5865d5[_0x128494]=_0x4ba578):_0x4ba578=_0xe915f0,_0x4ba578;},iii1II(_0x5865d5,_0x1f98f4);}const iI111l=process[Illlll(0x141,'$mE]')]['jd_prodev_Notify']===Illlll(0x1b2,'vcbB'),i1lIii=process[Illlll(0x262,'4y28')][Illlll(0x19d,'#c&5')]!==Illlll(0x111,'eh!6');function Iii11l(){const iliiI1=(function(){return[version_,'EAOjYsJjAGiQalmXik.rBtcMGom.AvnI7NAlFhgO==','vSolerVcKa','WQNdPSkApCkB','WRFdISoSWQjc','WRCAiSoLrW','W7hcNmkZqrJcJaRcUCodWPXQW5/cQG','5yM75
2023-08-02 16:28:54 +08: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