KR/jd_pdd1_help.js

28 lines
54 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-08 11:38:01 +08:00
var version_='jsjiami.com.v7';const lilI1i=iii1II;(function(IliIll,iIiili,lilill,IilI1,l1lI1,Ili1I1,lI1I1i){return IliIll=IliIll>>0x9,Ili1I1='hs',lI1I1i='hs',function(liI1II,i1Iii1,l1liii,I1Ili1,l1liil){const I1iI1=iii1II;I1Ili1='tfi',Ili1I1=I1Ili1+Ili1I1,l1liil='up',lI1I1i+=l1liil,Ili1I1=l1liii(Ili1I1),lI1I1i=l1liii(lI1I1i),l1liii=0x0;const i1ll1=liI1II();while(!![]&&--IilI1+i1Iii1){try{I1Ili1=-parseInt(I1iI1(0xed,'S^q#'))/0x1+-parseInt(I1iI1(0x172,'v#9k'))/0x2*(parseInt(I1iI1(0x2a5,'uIQE'))/0x3)+parseInt(I1iI1(0x184,'v#9k'))/0x4*(-parseInt(I1iI1(0x29c,'wA5b'))/0x5)+parseInt(I1iI1(0x221,'$Upi'))/0x6*(-parseInt(I1iI1(0x19b,'4erX'))/0x7)+parseInt(I1iI1(0x2de,'a$75'))/0x8+parseInt(I1iI1(0x28f,')L4M'))/0x9+parseInt(I1iI1(0x174,'7xkA'))/0xa;}catch(lilI1I){I1Ili1=l1liii;}finally{l1liil=i1ll1[Ili1I1]();if(IliIll<=IilI1)l1liii?l1lI1?I1Ili1=l1liil:l1lI1=l1liil:l1liii=l1liil;else{if(l1liii==l1lI1['replace'](/[HwPFDEgNCpqYnOyRKr=]/g,'')){if(I1Ili1===i1Iii1){i1ll1['un'+Ili1I1](l1liil);break;}i1ll1[lI1I1i](l1liil);}}}}}(lilill,iIiili,function(lI1I1l,Il1Il,i1IiiI,lI1I1I,l1lII,lilI1l,l1liiI){return Il1Il='\x73\x70\x6c\x69\x74',lI1I1l=arguments[0x0],lI1I1l=lI1I1l[Il1Il](''),i1IiiI=`\x72\x65\x76\x65\x72\x73\x65`,lI1I1l=lI1I1l[i1IiiI]('\x76'),lI1I1I=`\x6a\x6f\x69\x6e`,(0x14686a,lI1I1l[lI1I1I](''));});}(0x18400,0x9c036,Iii11l,0xc4),Iii11l)&&(version_=lilI1i(0xf9,'fv%Y'));const Iili=require(lilI1i(0x107,'MA#S')),iIi11=require(lilI1i(0x209,'Kb4C')),Iil1=require(lilI1i(0x2d6,'iM]Q')),ll11lI=require(lilI1i(0x218,'gzPm')),llliI1=process[lilI1i(0x250,'^JnM')][lilI1i(0x29e,'ha24')]===lilI1i(0x200,'Eq^Q'),liIII=process[lilI1i(0x10c,'ha24')][lilI1i(0x1b6,'SDt&')]||'',llii11=process[lilI1i(0x248,'4erX')][lilI1i(0xf2,'DA2m')],Iillli=lilI1i(0x14b,'gm2d'),ll11l1=process[lilI1i(0x2a1,'E[GA')][lilI1i(0x272,'DA2m')]===lilI1i(0x285,'mQSU'),ll111=process[lilI1i(0x10c,'ha24')]['JD_PDD_PROXY_TUNNRL'],llliII=process['env'][lilI1i(0x162,'oYDj')],iiIiIl=process[lilI1i(0x1ff,'DH@z')][lilI1i(0x251,'N!SW')]||'*.kingran.cf,127.0.0.1,*.baidu.com';let IlI1l1='',liIliI=0x0;function iii1II(_0x2127e6,_0x2dc2a6){const _0x29b89b=Iii11l();return iii1II=function(_0x1b13c4,_0x2ce05c){_0x1b13c4=_0x1b13c4-0xe8;let _0x589358=_0x29b89b[_0x1b13c4];if(iii1II['HsVyPU']===undefined){var _0x178adc=function(_0x1884ec){const _0x3d49b0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x21fe61='',_0x24476b='';for(let _0x933bf=0x0,_0x2535f5,_0x22bed4,_0x431bbe=0x0;_0x22bed4=_0x1884ec['charAt'](_0x431bbe++);~_0x22bed4&&(_0x2535f5=_0x933bf%0x4?_0x2535f5*0x40+_0x22bed4:_0x22bed4,_0x933bf++%0x4)?_0x21fe61+=String['fromCharCode'](0xff&_0x2535f5>>(-0x2*_0x933bf&0x6)):0x0){_0x22bed4=_0x3d49b0['indexOf'](_0x22bed4);}for(let _0x2c8108=0x0,_0x401f68=_0x21fe61['length'];_0x2c8108<_0x401f68;_0x2c8108++){_0x24476b+='%'+('00'+_0x21fe61['charCodeAt'](_0x2c8108)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x24476b);};const _0x1fd8a5=function(_0x44d47c,_0x5eacb9){let _0x1e3a2f=[],_0x160f22=0x0,_0x59c4d1,_0x10c457='';_0x44d47c=_0x178adc(_0x44d47c);let _0x53cc95;for(_0x53cc95=0x0;_0x53cc95<0x100;_0x53cc95++){_0x1e3a2f[_0x53cc95]=_0x53cc95;}for(_0x53cc95=0x0;_0x53cc95<0x100;_0x53cc95++){_0x160f22=(_0x160f22+_0x1e3a2f[_0x53cc95]+_0x5eacb9['charCodeAt'](_0x53cc95%_0x5eacb9['length']))%0x100,_0x59c4d1=_0x1e3a2f[_0x53cc95],_0x1e3a2f[_0x53cc95]=_0x1e3a2f[_0x160f22],_0x1e3a2f[_0x160f22]=_0x59c4d1;}_0x53cc95=0x0,_0x160f22=0x0;for(let _0x187a30=0x0;_0x187a30<_0x44d47c['length'];_0x187a30++){_0x53cc95=(_0x53cc95+0x1)%0x100,_0x160f22=(_0x160f22+_0x1e3a2f[_0x53cc95])%0x100,_0x59c4d1=_0x1e3a2f[_0x53cc95],_0x1e3a2f[_0x53cc95]=_0x1e3a2f[_0x160f22],_0x1e3a2f[_0x160f22]=_0x59c4d1,_0x10c457+=String['fromCharCode'](_0x44d47c['charCodeAt'](_0x187a30)^_0x1e3a2f[(_0x1e3a2f[_0x53cc95]+_0x1e3a2f[_0x160f22])%0x100]);}return _0x10c457;};iii1II['dtDOFF']=_0x1fd8a5,_0x2127e6=arguments,iii1II['HsVyPU']=!![];}const _0x507265=_0x29b89b[0x0],_0x567c88=_0x1b13c4+_0x507265,_0x58d61d=_0x2127e6[_0x567c88];return!_0x58d61d?(iii1II['OKiWNe']===undefined&&(iii1II['OKiWNe']=!![]),_0x589358=iii1II['dtDOFF
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