KR/jd_pdd_draw.js

39 lines
80 KiB
JavaScript
Raw Normal View History

2023-11-01 21:14:01 +08:00
/*
PDD特价转盘抽奖提现
入口特价版APP幸运抽奖
链接https://pro.m.jd.com/jdlite/active/23CeE8ZXA4uFS9M9mTjtta9T4S5x/index.html
轮询提现变量JD_PDD_TXNUM //轮询提现页数
提现间隔时间JD_PDD_TXWAIT //提现兑换间隔,默认 3 秒
2023-11-03 02:10:59 +08:00
提现变量JD_PDD_TXCASH //是否提现默认不提现true/false
重试变量
JD_PDD_TXMAX_RETRY // 已存在状态/待发放,提现中,等最大重试次数 默认 5 次
JD_PDD_DRAW_RETRY // 抽奖 提示未中奖等最大重试次数 默认 20 次
2023-11-01 21:14:01 +08:00
兑换红包变量
export JD_PDD_Exchange="true" // 上限后兑换红包,默认关闭
注意轮询页数也大越容易403请谨慎填写
代理变量
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_draw.js, tag=PDD特价转盘抽奖提现, enabled=true
*/
2023-11-03 02:10:59 +08:00
const $ = new Env('PDD特价转盘抽奖提现');
var version_='jsjiami.com.v7';const Ili1l1=iii1II;(function(l1lIIi,iII11I,IiIii1,l1lIIl,i1lIl,i1lIi,iilIiI){return l1lIIi=l1lIIi>>0x6,i1lIi='hs',iilIiI='hs',function(III1li,Ili1iI,lIlll1,Ili1i1,I1I11I){const I11l=iii1II;Ili1i1='tfi',i1lIi=Ili1i1+i1lIi,I1I11I='up',iilIiI+=I1I11I,i1lIi=lIlll1(i1lIi),iilIiI=lIlll1(iilIiI),lIlll1=0x0;const iII11l=III1li();while(!![]&&--l1lIIl+Ili1iI){try{Ili1i1=parseInt(I11l(0x32c,'E4*y'))/0x1*(parseInt(I11l(0x4c6,'essF'))/0x2)+-parseInt(I11l(0x251,'Aw*V'))/0x3*(parseInt(I11l(0x2ab,'3H2v'))/0x4)+-parseInt(I11l(0x1d1,'FQTo'))/0x5*(-parseInt(I11l(0x3dc,'NCce'))/0x6)+-parseInt(I11l(0x30b,'Yok('))/0x7*(parseInt(I11l(0x281,'P3BB'))/0x8)+-parseInt(I11l(0x32d,'2su5'))/0x9*(-parseInt(I11l(0x444,'X*Q5'))/0xa)+-parseInt(I11l(0x1ec,'$awn'))/0xb+parseInt(I11l(0x264,'Xmvg'))/0xc*(-parseInt(I11l(0x1d6,'x6rw'))/0xd);}catch(i1IiI1){Ili1i1=lIlll1;}finally{I1I11I=iII11l[i1lIi]();if(l1lIIi<=l1lIIl)lIlll1?i1lIl?Ili1i1=I1I11I:i1lIl=I1I11I:lIlll1=I1I11I;else{if(lIlll1==i1lIl['replace'](/[IBPStKpUFxqbRHkCVl=]/g,'')){if(Ili1i1===Ili1iI){iII11l['un'+i1lIi](I1I11I);break;}iII11l[iilIiI](I1I11I);}}}}}(IiIii1,iII11I,function(l1lIII,iII11i,l1iI1i,lIlllI,III1lI,I11i,ll1IlI){return iII11i='\x73\x70\x6c\x69\x74',l1lIII=arguments[0x0],l1lIII=l1lIII[iII11i](''),l1iI1i=`\x72\x65\x76\x65\x72\x73\x65`,l1lIII=l1lIII[l1iI1i]('\x76'),lIlllI=`\x6a\x6f\x69\x6e`,(0x145cd3,l1lIII[lIlllI](''));});}(0x3040,0xae0d6,Iii11l,0xc3),Iii11l)&&(version_=Ili1l1(0x2aa,'#QSO'));const iIIli1=require(Ili1l1(0x1b2,'lX]*')),Ii1l1i=require(Ili1l1(0x1ce,'VV#P')),l1lIl=require('./function/jdCommon'),Ii1l1l=require(Ili1l1(0x337,'w2zb')),i1Iiil=process[Ili1l1(0x2b5,'BuMa')][Ili1l1(0x422,'Oqmq')]===Ili1l1(0x21b,'ljLc'),i1Iiii=process[Ili1l1(0x21c,'FQTo')]['JD_PDD_TXCASH']===Ili1l1(0x39e,'sn5e'),l1lIi=process[Ili1l1(0x42b,'DDNh')][Ili1l1(0x1ee,'wCND')]||'1',l1lili=process['env']['JD_PDD_Exchange']===Ili1l1(0x2d7,'zei9'),IIlI1l=process['env']['JD_PDD_TXWAIT']||'3',lI1I11=process['env'][Ili1l1(0x324,'Dt6c')]||'5',IilIl=process[Ili1l1(0x1d3,'nF#p')][Ili1l1(0x3f6,'eNJn')]||'20',IilIi='Wvzc_VpNTlSkiQdHT8r7QA',Ili1Il=process['env']['JD_PDD_PROXY_OPEN']===Ili1l1(0x49b,'E4*y'),i1liI=process[Ili1l1(0x356,'ljLc')][Ili1l1(0x3aa,'E4*y')],iilIIi=process[Ili1l1(0x3b7,'Aw*V')]['JD_PDD_PROXY_URL'],I1iII=process[Ili1l1(0x4d8,'3I3x')][Ili1l1(0x4cb,'4Z9G')]||Ili1l1(0x41a,'Xmvg');let IIlI1i='',iiiI1i=0x0,iiiI1l=parseInt(IIlI1l)*0x3e8;function iii1II(_0x48d5e3,_0xda67fc){const _0x2fdcd9=Iii11l();return iii1II=function(_0x50a432,_0x3097b6){_0x50a432=_0x50a432-0x1a7;let _0x3b766e=_0x2fdcd9[_0x50a432];if(iii1II['QshTjK']===undefined){var _0x36957e=function(_0x502c15){const _0x36ebed='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4c9df7='',_0x575c31='';for(let _0x332142=0x0,_0x3e53d4,_0x4dd4b4,_0x4c95e4=0x0;_0x4dd4b4=_0x502c15['charAt'](_0x4c95e4++);~_0x4dd4b4&&(_0x3e53d4=_0x332142%0x4?_0x3e53d4*0x40+_0x4dd4b4:_0x4dd4b4,_0x332142++%0x4)?_0x4c9df7+=String['fromCharCode'](0xff&_0x3e53d4>>(-0x2*_0x332142&0x6)):0x0){_0x4dd4b4=_0x36ebed['indexOf'](_0x4dd4b4);}for(let _0x157999=0x0,_0x4c9c43=_0x4c9df7['length'];_0x157999<_0x4c9c43;_0x157999++){_0x575c31+='%'+('00'+_0x4c9df7['charCodeAt'](_0x157999)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x575c31);};const _0x543695=function(_0x35ae48,_0x2bb0d3){let _0x474181=[],_0x34979d=0x0,_0x3144c9,_0x54cb14='';_0x35ae48=_0x36957e(_0x35ae48);let _0xd9865;for(_0xd9865=0x0;_0xd9865<0x100;_0xd9865++){_0x474181[_0xd9865]=_0xd9865;}for(_0xd9865=0x0;_0xd9865<0x100;_0xd9865++){_0x34979d=(_0x34979d+_0x474181[_0xd9865]+_0x2bb0d3['charCodeAt'](_0xd9865%_0x2bb0d3['length']))%0x100,_0x3144c9=_0x474181[_0xd9865],_0x474181[_0xd9865]=_0x474181[_0x34979d],_0x474181[_0x34979d]=_0x3144c9;}_0xd9865=0x0,_0x34979d=0x0;for(let _0x381456=0x0;_0x381456<_0x35ae48['length'];_0x381456++){_0xd9865=(_0xd9865+0x1)%0x100,_0x34979d=(_0x34979d+_0x474181[_0xd9865])%0x100,_0x3144c9=_0x474181[_0xd9865],_0x474181[_0xd9865]=_0x474181[_0x34979d],_0x474181[_0x34979d]=_0x3144c9,_0x54cb14+=String['fromCharCode'](_0x35ae48['charCodeAt'](_0x3814
2023-11-01 21:14:01 +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