KR/jd_prodev.js

24 lines
64 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默认领取只会助力到需要领取奖品的档位
2023-11-20 17:23:11 +08:00
jd_prodev_Notify // 是否推送通知true/false默认不推送
2023-08-02 16:28:54 +08:00
2023-11-20 17:23:11 +08:00
开卡邀请类活动奖品自动过滤优惠券自动助力并领取奖品仅助力一个账号🚀火箭本一秒运行5个号助力指定账号需要先开通活动否则会提示邀请用户不存在
2023-08-02 16:28:54 +08:00
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#邀请好友入会得好礼
1 1 1 1 * jd_prodev.js, tag=邀请好友入会得好礼, enabled=true
*/
const $ = new Env('邀请好友入会得好礼')
2023-11-20 17:23:11 +08:00
var il='jsjiami.com.v7';const Il1II=iii1II;(function(lIili1,li1l,iliiII,iiI1li,IIliii,i1111I,IliIl1){return lIili1=lIili1>>0x9,i1111I='hs',IliIl1='hs',function(lIl1lI,iiI1ll,lIiliI,iIiill,Ii1IIi){const lI1ili=iii1II;iIiill='tfi',i1111I=iIiill+i1111I,Ii1IIi='up',IliIl1+=Ii1IIi,i1111I=lIiliI(i1111I),IliIl1=lIiliI(IliIl1),lIiliI=0x0;const Ii1IIl=lIl1lI();while(!![]&&--iiI1li+iiI1ll){try{iIiill=-parseInt(lI1ili(0xef,'OE5h'))/0x1+parseInt(lI1ili(0x200,'d#%q'))/0x2+parseInt(lI1ili(0x1b7,'fnjp'))/0x3*(-parseInt(lI1ili(0x12f,'N)e)'))/0x4)+parseInt(lI1ili(0xc7,'eXc#'))/0x5+parseInt(lI1ili(0x192,'eXc#'))/0x6*(-parseInt(lI1ili(0x368,'OE5h'))/0x7)+parseInt(lI1ili(0x140,'TNAb'))/0x8+parseInt(lI1ili(0x323,'ZEGM'))/0x9*(parseInt(lI1ili(0x17b,'h5T6'))/0xa);}catch(l111I){iIiill=lIiliI;}finally{Ii1IIi=Ii1IIl[i1111I]();if(lIili1<=iiI1li)lIiliI?IIliii?iIiill=Ii1IIi:IIliii=Ii1IIi:lIiliI=Ii1IIi;else{if(lIiliI==IIliii['replace'](/[uOQkwJWDMxhHdgBLyTIfA=]/g,'')){if(iIiill===iiI1ll){Ii1IIl['un'+i1111I](Ii1IIi);break;}Ii1IIl[IliIl1](Ii1IIi);}}}}}(iliiII,li1l,function(ll1lli,ll1lll,Illlil,I1iili,lililI,lI1ill,Illlii){return ll1lll='\x73\x70\x6c\x69\x74',ll1lli=arguments[0x0],ll1lli=ll1lli[ll1lll](''),Illlil=`\x72\x65\x76\x65\x72\x73\x65`,ll1lli=ll1lli[Illlil]('\x76'),I1iili=`\x6a\x6f\x69\x6e`,(0x148374,ll1lli[I1iili](''));});}(0x18000,0x7c40b,Iii11l,0xc2),Iii11l)&&(il=Iii11l);const IIIlIl=require(Il1II(0x2cd,'gZbS')),IIIlI=require(Il1II(0x322,'MNRw')),IiiI=require(Il1II(0x296,'P!tp')),iIi1i=process[Il1II(0xdf,'ATqC')]['jd_prodev_actCode']||'';let l1iIll=process[Il1II(0x210,'MNRw')][Il1II(0x267,'B6eF')]||'';const l1iIli=process['env'][Il1II(0x1f3,'x!2z')]===Il1II(0x2b8,'TNAb'),iIi1l=process['env'][Il1II(0x10b,'4Yvp')]!==Il1II(0x163,'P!tp');function iii1II(_0x5e62ae,_0x3f6910){const _0x15f680=Iii11l();return iii1II=function(_0x3ede94,_0x914430){_0x3ede94=_0x3ede94-0xc0;let _0x2c36d4=_0x15f680[_0x3ede94];if(iii1II['bktpiV']===undefined){var _0x2c8081=function(_0x1c3a6f){const _0xbafd60='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xd34ecf='',_0x3cb177='';for(let _0x4a3b98=0x0,_0x592d98,_0x4c0793,_0x15e99b=0x0;_0x4c0793=_0x1c3a6f['charAt'](_0x15e99b++);~_0x4c0793&&(_0x592d98=_0x4a3b98%0x4?_0x592d98*0x40+_0x4c0793:_0x4c0793,_0x4a3b98++%0x4)?_0xd34ecf+=String['fromCharCode'](0xff&_0x592d98>>(-0x2*_0x4a3b98&0x6)):0x0){_0x4c0793=_0xbafd60['indexOf'](_0x4c0793);}for(let _0x25420e=0x0,_0x4ff995=_0xd34ecf['length'];_0x25420e<_0x4ff995;_0x25420e++){_0x3cb177+='%'+('00'+_0xd34ecf['charCodeAt'](_0x25420e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3cb177);};const _0x313611=function(_0x3eba0e,_0x5eaaf0){let _0x421445=[],_0x3e1a4f=0x0,_0x3b997d,_0x23a24e='';_0x3eba0e=_0x2c8081(_0x3eba0e);let _0x510d26;for(_0x510d26=0x0;_0x510d26<0x100;_0x510d26++){_0x421445[_0x510d26]=_0x510d26;}for(_0x510d26=0x0;_0x510d26<0x100;_0x510d26++){_0x3e1a4f=(_0x3e1a4f+_0x421445[_0x510d26]+_0x5eaaf0['charCodeAt'](_0x510d26%_0x5eaaf0['length']))%0x100,_0x3b997d=_0x421445[_0x510d26],_0x421445[_0x510d26]=_0x421445[_0x3e1a4f],_0x421445[_0x3e1a4f]=_0x3b997d;}_0x510d26=0x0,_0x3e1a4f=0x0;for(let _0x4e1138=0x0;_0x4e1138<_0x3eba0e['length'];_0x4e1138++){_0x510d26=(_0x510d26+0x1)%0x100,_0x3e1a4f=(_0x3e1a4f+_0x421445[_0x510d26])%0x100,_0x3b997d=_0x421445[_0x510d26],_0x421445[_0x510d26]=_0x421445[_0x3e1a4f],_0x421445[_0x3e1a4f]=_0x3b997d,_0x23a24e+=String['fromCharCode'](_0x3eba0e['charCodeAt'](_0x4e1138)^_0x421445[(_0x421445[_0x510d26]+_0x421445[_0x3e1a4f])%0x100]);}return _0x23a24e;};iii1II['ZEboJQ']=_0x313611,_0x5e62ae=arguments,iii1II['bktpiV']=!![];}const _0x56968f=_0x15f680[0x0],_0x3ff20=_0x3ede94+_0x56968f,_0x26a0c6=_0x5e62ae[_0x3ff20];return!_0x26a0c6?(iii1II['zZJHSS']===undefined&&(iii1II['zZJHSS']=!![]),_0x2c36d4=iii1II['ZEboJQ'](_0x2c36d4,_0x914430),_0x5e62ae[_0x3ff20]=_0x2c36d4):_0x2c36d4=_0x26a0c6,_0x2c36d4;},iii1II(_0x5e62ae,_0x3f6910);}function Iii11l(){const IliIll=(function(){return[...[il,'TjHsTJQjyfiWBuafmAdiwL.cugoOOmD.MkvhI7xf==','gmkWhSk+xa','aSo6imk2pa','WOhcHSkSx8oi','CSoiW7hcVW','W4BcHejefM7dNq5gksldVmkHCSoujW','exe
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