KR/jd_pdd_help.js

27 lines
57 KiB
JavaScript
Raw Normal View History

2023-11-01 14:45:03 +08:00
/*
PDD特价转盘助力
入口特价版APP幸运抽奖
链接https://pro.m.jd.com/jdlite/active/23CeE8ZXA4uFS9M9mTjtta9T4S5x/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_pdd_help.js, tag=PDD特价转盘助力, enabled=true
*/
const $ = new Env('PDD特价转盘助力')
2023-11-28 17:21:46 +08:00
var il='jsjiami.com.v7';const iilIIl=iii1II;(function(I1iIl,IilII,ili1l,i1lii,iilIII,liI1Il,I1iIi){return I1iIl=I1iIl>>0x6,liI1Il='hs',I1iIi='hs',function(iiiI1I,lilI11,Ili1II,ili1i,IiIi1){const ili1I=iii1II;ili1i='tfi',liI1Il=ili1i+liI1Il,IiIi1='up',I1iIi+=IiIi1,liI1Il=Ili1II(liI1Il),I1iIi=Ili1II(I1iIi),Ili1II=0x0;const l1Ii1=iiiI1I();while(!![]&&--i1lii+lilI11){try{ili1i=parseInt(ili1I(0x16b,'tf%l'))/0x1+-parseInt(ili1I(0x12f,'fEl4'))/0x2+-parseInt(ili1I(0x2d7,'q#$t'))/0x3*(parseInt(ili1I(0x219,'w4Ri'))/0x4)+parseInt(ili1I(0x1a5,'CET%'))/0x5*(parseInt(ili1I(0xe8,'K$jx'))/0x6)+parseInt(ili1I(0x237,'NQJ8'))/0x7*(parseInt(ili1I(0x1d0,'OO7f'))/0x8)+-parseInt(ili1I(0xf9,'q#$t'))/0x9+parseInt(ili1I(0x2fa,'EsdR'))/0xa;}catch(i1IilI){ili1i=Ili1II;}finally{IiIi1=l1Ii1[liI1Il]();if(I1iIl<=i1lii)Ili1II?iilIII?ili1i=IiIi1:iilIII=IiIi1:Ili1II=IiIi1;else{if(Ili1II==iilIII['replace'](/[BnMYkOFrPKhWHNQDwXfpeJ=]/g,'')){if(ili1i===lilI11){l1Ii1['un'+liI1Il](IiIi1);break;}l1Ii1[I1iIi](IiIi1);}}}}}(ili1l,IilII,function(III1I1,ilI111,I1IllI,IIlI11,iIIll1,llIIII,ilI11I){return ilI111='\x73\x70\x6c\x69\x74',III1I1=arguments[0x0],III1I1=III1I1[ilI111](''),I1IllI=`\x72\x65\x76\x65\x72\x73\x65`,III1I1=III1I1[I1IllI]('\x76'),IIlI11=`\x6a\x6f\x69\x6e`,(0x14944c,III1I1[IIlI11](''));});}(0x3200,0xd10f0,Iii11l,0xca),Iii11l)&&(il=Iii11l);const l1i11=require('./jdCookie'),IlI1li=require('./function/sendJDNotify'),IlI1ll=require(iilIIl(0x252,'g5#i')),ll11l=require('./function/krgetH5st'),III111=process[iilIIl(0x1ef,'g5#i')][iilIIl(0x231,'oW&I')]==='true',liIll1=process['env'][iilIIl(0x24f,'o8gu')]||'',l1llli=process[iilIIl(0x18c,'l5rQ')][iilIIl(0x28f,'X(s%')],iI1lII='Wvzc_VpNTlSkiQdHT8r7QA',ll11iI=process[iilIIl(0x1a6,'fEl4')][iilIIl(0x249,'EsdR')]===iilIIl(0x2f1,'eXh@'),l1i1I=process[iilIIl(0x2df,'osTL')]['JD_PDD_PROXY_TUNNRL'],l1llll=process[iilIIl(0x243,'jsT@')][iilIIl(0x2ed,'jsT@')],I1I1ll=process[iilIIl(0x168,'NQJ8')]['JD_PDD_NO_PROXY']||iilIIl(0x10b,'x^D#');let lil1i='',liiiil=0x0;const IIIIli='2';let lllIi=parseInt(IIIIli)*0x3e8;ll11iI&&(l1i1I||l1llll)&&(lllIi=0x64);$['helpnum']=0x0,$[iilIIl(0x2ea,')bOy')]=![];let lil1l=![];if(ll11iI){lil1l=!![];try{require(iilIIl(0x160,'tf%l'));if(l1llll){console['log'](iilIIl(0x278,'jJ2q')),console[iilIIl(0x15a,'jJ2q')](iilIIl(0x22b,'K$jx')+l1llll+'\x0a');let l1ilI1=/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/g;global[iilIIl(0x1d9,'BltI')][iilIIl(0x302,'jsT@')]=l1ilI1[iilIIl(0x1ad,'cES*')](l1llll)[0x0]+','+I1I1ll;}else l1i1I?(global[iilIIl(0x197,'w4Ri')][iilIIl(0x1aa,'b2Iw')]=l1i1I,global[iilIIl(0x2d6,'uMTg')][iilIIl(0x297,'b2Iw')]=''+I1I1ll,console[iilIIl(0x124,'aGAT')]('\x0a☑\x20代理池代理已开启'),console[iilIIl(0x28a,'8(So')](iilIIl(0x221,'IV83')+global[iilIIl(0x270,'g5#i')][iilIIl(0x2e4,'8(So')]+'\x0a')):(console['log'](iilIIl(0x154,'EsdR')),console[iilIIl(0xed,'h*pn')](iilIIl(0x15c,'3flb')),console[iilIIl(0x22f,'Uv$d')]('⚠\x20API地址变量export\x20JD_JF_PROXY_URL=\x27http://api.xxx.xxx\x27\x0a'));}catch(l1l1Il){console[iilIIl(0x1c0,'UvlY')](iilIIl(0x279,'yDV&')),console[iilIIl(0x24e,'jsT@')](iilIIl(0x263,'C(U7')),lil1l=![];}}else console[iilIIl(0x128,'x^D#')]('\x0a⚠\x20检测当前模式未开启代理'),console[iilIIl(0x1ac,'w4Ri')](iilIIl(0x105,'X(s%'));function iii1II(_0x31c10f,_0x46cf7d){const _0xd809e3=Iii11l();return iii1II=function(_0x4719ab,_0x3e03c3){_0x4719ab=_0x4719ab-0xe1;let _0x4aaff7=_0xd809e3[_0x4719ab];if(iii1II['jPJckl']===undefined){var _0x30661d=function(_0x2b35da){const _0x37eb2d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x208a67='',_0x46894e='';for(let _0x2ae165=0x0,_0x2c430c,_0x21d3bb,_0x3db6c6=0x0;_0x21d3bb=_0x2b35da['charAt'](_0x3db6c6++);~_0x21d3bb&&(_0x2c430c=_0x2ae165%0x4?_0x2c430c*0x40+_0x21d3bb:_0x21d3bb,_0x2ae165++%0x4)?_0x208a67+=String['fromCharCode'](0xff&_0x2c430c>>(-0x2*_0x2ae165&0x6)):0x0){_0x21d3bb=_0x37eb2d['indexOf'](_0x21d3bb);}for(let _0x20900f=0x0,_0x2c15f0=_0x208a67['length'];_0x20900f<_0x2c15f0;_0x20900f++){_0x46894e+='%'+('00'+_0x208a67['charCodeAt'](_0x20900f)['toString'
2023-11-01 14:45:03 +08:00
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