KR/jd_pdd1_help.js

28 lines
56 KiB
JavaScript
Raw Normal View History

2023-11-01 15:02:56 +08:00
/*
PDD转赚红包助力
入口京东APP玩一玩转赚红包
2023-11-08 11:38:01 +08:00
链接https://pro.m.jd.com/mall/active/3BwUqhLsJYrHP4qgAgDDJGrSVngK/index.html
2023-11-01 15:02:56 +08:00
环境变量
2023-11-08 11:38:01 +08:00
JD_PDD1_InviterId // 指定助力码 非必须,不填默认助力账号一
JD_PDD1_NUM // 指定人数 非必须,不填默认跑全部账号
2023-11-01 15:02:56 +08:00
代理变量
JD_PDD_PROXY_OPEN // 代理启用变量默认不开启true/false
JD_PDD_PROXY_TUNNRL // 代理池代理地址变量,默认不开启,仅支持代理池模式(auto-proxy-pool)格式为http://ip:port
JD_PDD_PROXY_URL // API代理地址变量默认不开启仅支持 数据格式:txt;提取数量:每次一个格式为http://api.xxx.xxx
JD_PDD_NO_PROXY // 禁止走代理,默认 127.0.0.1,*.baidu.com 需要自行修改
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#PDD转赚红包助力
1 1 1 1 * jd_pdd1_help.js, tag=PDD转赚红包助力, enabled=true
*/
const $ = new Env('PDD转赚红包助力')
2023-11-28 17:21:46 +08:00
var il='jsjiami.com.v7';const IIlI11=iii1II;(function(l1lilI,i1Iil1,liI1Ii,l1lil1,i1lil,I1iIl,IilII){return l1lilI=l1lilI>>0x2,I1iIl='hs',IilII='hs',function(ili1l,i1lii,iilIII,liI1Il,I1iIi){const I1IllI=iii1II;liI1Il='tfi',I1iIl=liI1Il+I1iIl,I1iIi='up',IilII+=I1iIi,I1iIl=iilIII(I1iIl),IilII=iilIII(IilII),iilIII=0x0;const iiiI1I=ili1l();while(!![]&&--l1lil1+i1lii){try{liI1Il=-parseInt(I1IllI(0x20a,'Q1Qu'))/0x1+parseInt(I1IllI(0x29c,'9i[3'))/0x2+-parseInt(I1IllI(0x144,'lBMS'))/0x3*(parseInt(I1IllI(0x22d,'B6R4'))/0x4)+-parseInt(I1IllI(0x185,'pNv*'))/0x5*(-parseInt(I1IllI(0xd5,'v]!y'))/0x6)+parseInt(I1IllI(0xf8,'SXRm'))/0x7+-parseInt(I1IllI(0x11e,'HJZe'))/0x8*(-parseInt(I1IllI(0x1c7,'P]GL'))/0x9)+parseInt(I1IllI(0x1fe,'Pe&M'))/0xa*(-parseInt(I1IllI(0x10a,'3$j['))/0xb);}catch(lilI11){liI1Il=iilIII;}finally{I1iIi=iiiI1I[I1iIl]();if(l1lilI<=l1lil1)iilIII?i1lil?liI1Il=I1iIi:i1lil=I1iIi:iilIII=I1iIi;else{if(iilIII==i1lil['replace'](/[pdfMhnIbNLywquPUAWlx=]/g,'')){if(liI1Il===i1lii){iiiI1I['un'+I1iIl](I1iIi);break;}iiiI1I[IilII](I1iIi);}}}}}(liI1Ii,i1Iil1,function(Ili1II,ili1i,IiIi1,l1Ii1,i1IilI,III1I1,ilI111){return ili1i='\x73\x70\x6c\x69\x74',Ili1II=arguments[0x0],Ili1II=Ili1II[ili1i](''),IiIi1=`\x72\x65\x76\x65\x72\x73\x65`,Ili1II=Ili1II[IiIi1]('\x76'),l1Ii1=`\x6a\x6f\x69\x6e`,(0x14944d,Ili1II[l1Ii1](''));});}(0x2f0,0xce749,Iii11l,0xbe),Iii11l)&&(il=0x21c0);const iI1lI1=require(IIlI11(0x1f3,'VGsh')),I1I1li=require(IIlI11(0x228,'8[MI')),l1i11=require(IIlI11(0x129,'!rV2')),IlI1li=require(IIlI11(0x267,'uc$H')),IlI1ll=process[IIlI11(0x196,'QE!Z')]['JD_PDD1_Notify']==='true',ll11l=process[IIlI11(0xf0,'CaOg')]['JD_PDD1_InviterId']||'',III111=process[IIlI11(0x1bd,'3$j[')]['JD_PDD1_NUM'],liIll1='3orGfh1YkwNLksxOcN8zWQ',l1llli=process['env'][IIlI11(0x1d0,'P]GL')]==='true',iI1lII=process['env'][IIlI11(0x2d2,'fv5v')],ll11iI=process[IIlI11(0x194,'1(ht')][IIlI11(0xe4,'Q1Qu')],l1i1I=process[IIlI11(0x2bc,'n*Cf')][IIlI11(0x10e,']uPd')]||IIlI11(0x120,'SXRm');let l1llll='',I1I1ll=0x0;const lil1i='2';let liiiil=parseInt(lil1i)*0x3e8;l1llli&&(iI1lII||ll11iI)&&(liiiil=0x64);function iii1II(_0x42b71b,_0x4d343d){const _0x528909=Iii11l();return iii1II=function(_0x1524d4,_0x52b26b){_0x1524d4=_0x1524d4-0xc4;let _0x2bd3bd=_0x528909[_0x1524d4];if(iii1II['WFBZBM']===undefined){var _0x4efc85=function(_0x4c85c5){const _0xae30aa='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x17a2e2='',_0x44863c='';for(let _0x4ac6a3=0x0,_0x1f9f6d,_0x3d422f,_0x47dbbf=0x0;_0x3d422f=_0x4c85c5['charAt'](_0x47dbbf++);~_0x3d422f&&(_0x1f9f6d=_0x4ac6a3%0x4?_0x1f9f6d*0x40+_0x3d422f:_0x3d422f,_0x4ac6a3++%0x4)?_0x17a2e2+=String['fromCharCode'](0xff&_0x1f9f6d>>(-0x2*_0x4ac6a3&0x6)):0x0){_0x3d422f=_0xae30aa['indexOf'](_0x3d422f);}for(let _0x2a9544=0x0,_0x1f8e4c=_0x17a2e2['length'];_0x2a9544<_0x1f8e4c;_0x2a9544++){_0x44863c+='%'+('00'+_0x17a2e2['charCodeAt'](_0x2a9544)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44863c);};const _0x823a47=function(_0x3103e7,_0x1fe035){let _0x3a0a77=[],_0x9fb536=0x0,_0x255ebb,_0x12dbdb='';_0x3103e7=_0x4efc85(_0x3103e7);let _0x5ba8ba;for(_0x5ba8ba=0x0;_0x5ba8ba<0x100;_0x5ba8ba++){_0x3a0a77[_0x5ba8ba]=_0x5ba8ba;}for(_0x5ba8ba=0x0;_0x5ba8ba<0x100;_0x5ba8ba++){_0x9fb536=(_0x9fb536+_0x3a0a77[_0x5ba8ba]+_0x1fe035['charCodeAt'](_0x5ba8ba%_0x1fe035['length']))%0x100,_0x255ebb=_0x3a0a77[_0x5ba8ba],_0x3a0a77[_0x5ba8ba]=_0x3a0a77[_0x9fb536],_0x3a0a77[_0x9fb536]=_0x255ebb;}_0x5ba8ba=0x0,_0x9fb536=0x0;for(let _0x43afc0=0x0;_0x43afc0<_0x3103e7['length'];_0x43afc0++){_0x5ba8ba=(_0x5ba8ba+0x1)%0x100,_0x9fb536=(_0x9fb536+_0x3a0a77[_0x5ba8ba])%0x100,_0x255ebb=_0x3a0a77[_0x5ba8ba],_0x3a0a77[_0x5ba8ba]=_0x3a0a77[_0x9fb536],_0x3a0a77[_0x9fb536]=_0x255ebb,_0x12dbdb+=String['fromCharCode'](_0x3103e7['charCodeAt'](_0x43afc0)^_0x3a0a77[(_0x3a0a77[_0x5ba8ba]+_0x3a0a77[_0x9fb536])%0x100]);}return _0x12dbdb;};iii1II['QLdsuc']=_0x823a47,_0x42b71b=arguments,iii1II['WFBZBM']=!![];}const _0x1127fa=_0x528909[0x0],_0x381591=_0x1524d4+_0x1127fa,_0x5430c9=_0x42b71b[_0x381591];return!_0x5430c9?(iii1II['CrUiDg']===undefined&&(iii1II['CrUiDg
2023-11-01 15:02:56 +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