KR/jd_pdd2_help.js

28 lines
56 KiB
JavaScript
Raw Normal View History

2023-11-01 15:13:14 +08:00
/*
PDD每日红包助力
入口京东APP京东秒杀种豆得豆-大额红包
链接https://pro.m.jd.com/mall/active/3WijvBWPdCirCBr72TzkyiPhgdxJ/index.html
环境变量
JD_PDD_InviterId // 指定助力码 非必须,不填默认助力账号一
JD_PDD_NUM // 指定人数 非必须,不填默认跑全部账号
代理变量
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_pdd2_help.js, tag=PDD每日红包助力, enabled=true
*/
const $ = new Env('PDD每日红包助力')
var version_='jsjiami.com.v7';const l1IIii=iii1II;(function(llIII1,IiIiI,iill1I,Illi1,l1iiIl,lIIi1i,liI11I){return llIII1=llIII1>>0x8,lIIi1i='hs',liI11I='hs',function(III1,l1IIl1,l1iiIi,lIIi1l,I1lI1i){const llIill=iii1II;lIIi1l='tfi',lIIi1i=lIIi1l+lIIi1i,I1lI1i='up',liI11I+=I1lI1i,lIIi1i=l1iiIi(lIIi1i),liI11I=l1iiIi(liI11I),l1iiIi=0x0;const illili=III1();while(!![]&&--Illi1+l1IIl1){try{lIIi1l=-parseInt(llIill(0x280,'kP#h'))/0x1*(-parseInt(llIill(0x1cc,'Bem#'))/0x2)+parseInt(llIill(0x1e1,'J4Le'))/0x3+parseInt(llIill(0x170,'thtJ'))/0x4+parseInt(llIill(0x330,'K#1U'))/0x5*(parseInt(llIill(0x2ba,'l]Cr'))/0x6)+parseInt(llIill(0x1e9,'[X%y'))/0x7+parseInt(llIill(0x310,'i8DG'))/0x8+-parseInt(llIill(0x165,'p]AZ'))/0x9*(parseInt(llIill(0x241,'o^q4'))/0xa);}catch(iiiII1){lIIi1l=l1iiIi;}finally{I1lI1i=illili[lIIi1i]();if(llIII1<=Illi1)l1iiIi?l1iiIl?lIIi1l=I1lI1i:l1iiIl=I1lI1i:l1iiIi=I1lI1i;else{if(l1iiIi==l1iiIl['replace'](/[nWkChJbSfIweAVPOKFYyxER=]/g,'')){if(lIIi1l===l1IIl1){illili['un'+lIIi1i](I1lI1i);break;}illili[liI11I](I1lI1i);}}}}}(iill1I,IiIiI,function(liI111,IiIlI,iIlI1i,iII1Il,IIIliI,iII1Ii,iIlI1l){return IiIlI='\x73\x70\x6c\x69\x74',liI111=arguments[0x0],liI111=liI111[IiIlI](''),iIlI1i=`\x72\x65\x76\x65\x72\x73\x65`,liI111=liI111[iIlI1i]('\x76'),iII1Il=`\x6a\x6f\x69\x6e`,(0x1457d4,liI111[iII1Il](''));});}(0xc200,0xeec57,Iii11l,0xc4),Iii11l)&&(version_=l1IIii(0x27f,'rRDb'));const IliiI=require('./jdCookie'),lI111i=require(l1IIii(0x232,'uy7F')),I1lIII=require(l1IIii(0x267,'TLjt')),liIlll=require(l1IIii(0x2a2,'Wi3x')),I1iI1I=process['env']['JD_PDD_Notify']===l1IIii(0x19d,'y9WY'),illll1=process[l1IIii(0x199,'bz9z')][l1IIii(0x1a6,'kP#h')]||'',IIIIl1=process[l1IIii(0x216,'[VIP')][l1IIii(0x16b,'y9WY')],liiilI='EcuVpjGGfccY3Ic_1ni83w',lI111l=process[l1IIii(0x26e,'Wi3x')][l1IIii(0x34a,'fMt$')]==='true',liiii1=process['env']['JD_PDD_PROXY_TUNNRL'],IIiiIl=process[l1IIii(0x190,'rRDb')]['JD_PDD_PROXY_URL'],l1ilIl=process[l1IIii(0x33f,'l*K9')][l1IIii(0x26a,'vL!F')]||l1IIii(0x2c4,'4Szw');function Iii11l(){const illiil=(function(){return[...[version_,'nSOjYswjkxiaWmiF.hCcVomf.KPvkb7eERKIJPAy==','pSk7WQddRgbYv1W','4PM2aow/M+wsG+s7NUErPEwmG+MgGU+/PYDHWRBcQmozW5HHewFcJZtdS8k4eMDIWRRcM1ufW7RdGHvTCCkDASk7WQBdVxFdTmk8','WRDXnmkVW6C','W7xLRQdOOOpLKRBKUBBVVlVdONSihCkdW7NdHJNdLwScW7NcTwakW5tdRwnydd0lWOr2W58','WQBdLcC','bYfdWOu4','b2TSW4P8W5ZdQq','WPdcPCkYW59zW5lcI1ldNu5HzG','WPGCWOnADW','WPy0ymkpWP0','bCoIWRRcPt4','8jkdUbS','WRZcU007W4pdMJi','uetcMSoNW4e','yMz6DsO','yCoMWRO','mtKNhsmvWP3dGa','l+kAUo+6QCk+amoNjUwEMUwEL+s5QUEqTEw2VEw9N+wqQo+/UW','44gm5OYV56EA44gO6k2k5ys76iYT5y+2W5ZdI2WJsGq','W7fZmmk7WQRdV0q','bhBcOrK','B8ofW77dG0u','emoGuCoxdG','WOhdG8klbCoh','WPTOW6i1W5K','W74CyG','WPv8W6vBW40','W6WqW5LMBCo+WQBdMSkNg2L/cW','bSkbf3u','4P+3WRpLTBdLOOBLH7dMJ6FLRAJLIRJLIkdLJ4ZPH5NVVl3LVOlLPzJLIPhLI43cRx8','WP3cH3y6W6u','sCoiW6RdTa','qLpcN8oQW5u','WRlcIHJcLcX6FInQrSkSW5JcQxDoj8kzermdcCoyemkc','WONdGbe','z8k4W4/dR35Wac8LiCkVpq','WRPNW4OHW7S','WQ3dNJrVWPHAmG','p8kEWO4UW5WhW79sW7BdIMq','WOVcUddcIrvGrhm','W4JdVCo0WOqDWOxcThJdIgD/xSoSW7TDoSo9','WRffWQ/dPaGqWQ8','W7Clyha','zmoRWQJcIWSPnW','W4xMJ4hLJ6/LKkhLUAxMLlNMJkBOPzZMNRhLPAdOTydcS8ks','WOpcISk5','FSo8WO3dIIa','WQHqW5GZW5O','WQVcQZxcUxG','h8opWQGZWPa','jSokEmolmCoA','4PMD77MVaEs4KEErVowETEwFSEs4LE+8RW','W5bRW4uelCo+','W4FdHmoNWOS+','qCoiW5ldVW','WOVcOZdcIrq1eYubWO3dP8knWR8AjN8WW5TSiG','i+wqTow7ILe+WP9Fg0PKW7ddVmo6','4PYVW5NMNzJOG6VMRyRNOBhLPyRNKyGT','W5ZdImoUp8kBW5NcM8kdWQvfW65mpq','jdBcGZmH','WPWcW5ZdGXK','8yA4VmoT','pSoHWOVcRtWTaru','WQldSmkiiCo7','WOK8WODgBCk7WPS','8yoWKfO','WR9oWQ3dHuKgWP0KWO4XCmkPWQNdO8odld4','W4/dUI0','WOddIZrRW44','WQ1PWR8ufq','WQjfW6uE','ltbKWRSy','xEITK+AYUoMeQoE+JownJ+AwPoMwQ+IUGo++VoITRUIcTUEZTEw+SEwmREIbL+I9V+IINowmG+MLNE+9Pc/cMLhcRCkKW5JcTSkjWQPWW4ZdK8k1qq','C8kbW6ZcRua','dbpcOHy0','iCoAz8oLoW','rCkeW6RcPLO','sKBdSW','mEIVKoAXQEwtGEw7LmoL','WRu1W47dOt0','t8ojW7G','W7NdTCo6WQKy','DSoojcr0mg8yW40','WR1oWOCQoSkJW6C','gGZcJZa7','W4ZdOmoL','WOmnySknWP0Lmq','nCo9wCoAeW','B8kwoq','W5a0W6eUrq','hs7cKICCqXvpnmkv','tKRcJmoEW6C','WPKAWPP+Ba','WRiLwSoonJSmrq','W7hdNmorWRK','W4BdKdpdPSoL
// 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