KR/jd_pdd_draw.js

33 lines
79 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 秒
兑换红包变量
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
*/
const $ = new Env('PDD特价转盘抽奖提现')
var version_='jsjiami.com.v7';const I1IIll=iii1II;(function(i1IlI,lIl1Ii,lIl1Il,Ii1IlI,Il1I1I,ll1Il1,li11li){return i1IlI=i1IlI>>0x8,ll1Il1='hs',li11li='hs',function(iliiii,IIlIIi,iliiil,li11ll,i1Il1){const iIIIli=iii1II;li11ll='tfi',ll1Il1=li11ll+ll1Il1,i1Il1='up',li11li+=i1Il1,ll1Il1=iliiil(ll1Il1),li11li=iliiil(li11li),iliiil=0x0;const li1l1=iliiii();while(!![]&&--Ii1IlI+IIlIIi){try{li11ll=-parseInt(iIIIli(0x438,'3JXq'))/0x1+-parseInt(iIIIli(0x3f8,'82aU'))/0x2+-parseInt(iIIIli(0x17b,'FQ[i'))/0x3*(-parseInt(iIIIli(0x251,'boxj'))/0x4)+parseInt(iIIIli(0x474,'m@WU'))/0x5*(-parseInt(iIIIli(0x40a,'TpC5'))/0x6)+parseInt(iIIIli(0x34c,'3JXq'))/0x7+parseInt(iIIIli(0x2f9,'T4dE'))/0x8*(parseInt(iIIIli(0x1f6,'0IRl'))/0x9)+parseInt(iIIIli(0x1f1,'h(qH'))/0xa;}catch(IIiI1l){li11ll=iliiil;}finally{i1Il1=li1l1[ll1Il1]();if(i1IlI<=Ii1IlI)iliiil?Il1I1I?li11ll=i1Il1:Il1I1I=i1Il1:iliiil=i1Il1;else{if(iliiil==Il1I1I['replace'](/[hqwnkeQVfrtUEGxbuKMIHpy=]/g,'')){if(li11ll===IIlIIi){li1l1['un'+ll1Il1](i1Il1);break;}li1l1[li11li](i1Il1);}}}}}(lIl1Il,lIl1Ii,function(IIiI1i,ilIllI,I1IIli,Il1I1i,lIilI1,Il1I1l,Ii1Il1){return ilIllI='\x73\x70\x6c\x69\x74',IIiI1i=arguments[0x0],IIiI1i=IIiI1i[ilIllI](''),I1IIli=`\x72\x65\x76\x65\x72\x73\x65`,IIiI1i=IIiI1i[I1IIli]('\x76'),Il1I1i=`\x6a\x6f\x69\x6e`,(0x14592e,IIiI1i[Il1I1i](''));});}(0xc200,0x53765,Iii11l,0xc4),Iii11l)&&(version_=I1IIll(0x46c,'FQ[i'));const lIilii=require(I1IIll(0x2f5,'Zx1C')),lIilil=require(I1IIll(0x359,'h(qH')),lIl1ll=require('./function/jdCommon'),Ii111=require('./function/krgetH5st'),Ii1III=process[I1IIll(0x1c6,'6PWD')][I1IIll(0x48c,'f7Il')]===I1IIll(0x321,'TpC5'),ilIIi1=process['env'][I1IIll(0x479,'0IRl')]||'1',l111i=process[I1IIll(0x231,'@ymL')]['JD_PDD_Exchange']===I1IIll(0x2c4,'FNcL'),l111l=process[I1IIll(0x318,'W34Z')]['JD_PDD_TXWAIT']||'3',I1iilI=I1IIll(0x266,'$5Ai'),Ii1II1=process[I1IIll(0x450,'Q4dD')][I1IIll(0x1df,'N*6@')]===I1IIll(0x227,'Kjvc'),lilili=process[I1IIll(0x43f,'Kjvc')][I1IIll(0x2cc,'iU2q')],IliIli=process[I1IIll(0x200,'5TaN')][I1IIll(0x411,'JHZe')],lI1ilI=process[I1IIll(0x231,'@ymL')][I1IIll(0x35d,'V*r*')]||I1IIll(0x2ca,'gSFC'),IllliI=0x5;let IliIll='',iIiili=0x0,lilill=parseInt(l111l)*0x3e8;$[I1IIll(0x2c8,'OFz7')]=0x0,$[I1IIll(0x297,'dTij')]=![];let IilI1=![];if(Ii1II1){IilI1=!![];try{require(I1IIll(0x18b,'m1B!'));if(IliIli){console['log'](I1IIll(0x2f3,'82aU')),console[I1IIll(0x1bb,'vvRC')](I1IIll(0x2bc,'QiT)')+IliIli+'\x0a');let i1IiiI=/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/g;global[I1IIll(0x3d1,'Kjvc')][I1IIll(0x1ff,'Rs95')]=i1IiiI[I1IIll(0x3fa,'FNcL')](IliIli)[0x0]+','+lI1ilI;}else lilili?(global[I1IIll(0x3d4,'FNcL')][I1IIll(0x483,'LZd0')]=lilili,global[I1IIll(0x30f,'@ymL')][I1IIll(0x41a,'zxPZ')]=''+lI1ilI,console[I1IIll(0x36c,'TpC5')](I1IIll(0x326,'vvRC')),console['log'](I1IIll(0x1cb,'Q4dD')+global[I1IIll(0x207,'Rs95')]['HTTP_PROXY']+'\x0a')):(console[I1IIll(0x27f,'@DID')]('\x0a⚠\x20当前检测到已开启代理但未填写代理地址变量'),console[I1IIll(0x221,'3JXq')]('⚠\x20代理池变量export\x20JD_JF_PROXY_TUNNRL=\x27http://ip:port\x27'),console[I1IIll(0x1bb,'vvRC')](I1IIll(0x3d9,'6PWD')));}catch(lI1I1I){console[I1IIll(0x414,'0IRl')](I1IIll(0x40b,'BcDj')),console[I1IIll(0x1d7,'LZd0')]('\x0a安装命令npm\x20install\x20global-agent\x0a'),IilI1=![];}}else console[I1IIll(0x2a1,'FQ[i')](I1IIll(0x42a,'m1B!')),console[I1IIll(0x3bd,'Rs95')](I1IIll(0x2f4,'FQ[i'));let l1lI1='';const Ili1I1=Object[I1IIll(0x413,'Xvlg')](lIilii)[I1IIll(0x191,'W34Z')](l1lII=>lIilii[l1lII])[I1IIll(0x36b,'3JXq')](lilI1l=>lilI1l);!Ili1I1[0x0]&&($[I1IIll(0x23b,'Kjvc')]($['name'],I1IIll(0x311,'FQ[i')),process['exit'](0x1));!(async()=>{const i1Ii1=I1IIll,l1liiI={'JHHHX':function(I1iI1,lilI1i){return I1iI1<lilI1i;},'rnfLJ':i1Ii1(0x249,'5TaN'),'MKRLm':function(Il1Ii,Ii11l){return Il1Ii&&Ii11l;},'mUFHm':function(liI1I1,Ii11i){return liI1I1!==Ii11i;},'utxDQ':i1Ii1(0x3a2,'QiT)'),'wmSJd':function(i1llI,iIIli1){return i1llI==iIIli1;},'qzDsJ':function(Ii1l1i,l1lIl){return Ii1l1i%l1lIl;},'gQNem':function(Ii1l1l){return Ii1l1l();},'fSZSX':functio
// 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