KR/jd_pdd2_draw.js

42 lines
82 KiB
JavaScript
Raw Normal View History

2023-11-03 16:48:08 +08:00
/*
PDD每日红包抽奖提现
入口京东APP京东秒杀种豆得豆-大额红包
链接https://pro.m.jd.com/mall/active/3WijvBWPdCirCBr72TzkyiPhgdxJ/index.html
轮询提现变量JD_PDD2_TXNUM //轮询提现页数
提现间隔时间JD_PDD2_TXWAIT //提现兑换间隔,默认 3 秒
2023-11-09 10:15:49 +08:00
抽奖间隔时间JD_PDD2_DRAWWAIT //提现兑换间隔,默认 3 秒
2023-11-03 16:48:08 +08:00
提现变量JD_PDD2_TXCASH //是否提现默认不提现true/false
2023-11-09 10:15:49 +08:00
提现上限刷新时长变量JD_PDD2_Swish //是否延长提现时间默认不延长true/false 配合提现页码,上限后延长,可以延迟到期时间,最终效果可以推迟到下个月直接提现。
2023-11-03 16:48:08 +08:00
重试变量
2023-11-09 10:15:49 +08:00
JD_PDD2_TXMAX_RETRY // 已存在状态/待发放,提现中,等最大重试次数 默认 3 次
2023-11-03 16:48:08 +08:00
JD_PDD2_DRAW_RETRY // 抽奖 提示未中奖等最大重试次数 默认 20 次
兑换红包变量
export JD_PDD2_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_PDD2_draw.js, tag=PDD每日红包抽奖提现, enabled=true
*/
const $ = new Env('PDD每日红包抽奖提现');
2023-11-12 22:07:31 +08:00
var version_='jsjiami.com.v7';const IlII=iii1II;(function(iilIil,illI1i,i1IiII,illI1l,l1ll1I,i1lI1,l1ll11){return iilIil=iilIil>>0x4,i1lI1='hs',l1ll11='hs',function(I1I111,lIllli,lIllll,I11I,ll1Ili){const llIiii=iii1II;I11I='tfi',i1lI1=I11I+i1lI1,ll1Ili='up',l1ll11+=ll1Ili,i1lI1=lIllll(i1lI1),l1ll11=lIllll(l1ll11),lIllll=0x0;const i1IiIl=I1I111();while(!![]&&--illI1l+lIllli){try{I11I=-parseInt(llIiii(0x2b1,'txVq'))/0x1*(parseInt(llIiii(0x38d,'#G93'))/0x2)+parseInt(llIiii(0x25b,'2czn'))/0x3*(parseInt(llIiii(0x206,'txVq'))/0x4)+-parseInt(llIiii(0x266,'ORDA'))/0x5*(parseInt(llIiii(0x403,'JDuj'))/0x6)+parseInt(llIiii(0x272,'LJ9p'))/0x7*(parseInt(llIiii(0x40b,'M5ma'))/0x8)+-parseInt(llIiii(0x138,'nV&)'))/0x9+parseInt(llIiii(0x310,'DgYu'))/0xa+parseInt(llIiii(0x366,'PiXo'))/0xb*(parseInt(llIiii(0x17e,'nV&)'))/0xc);}catch(i1IiIi){I11I=lIllll;}finally{ll1Ili=i1IiIl[i1lI1]();if(iilIil<=illI1l)lIllll?l1ll1I?I11I=ll1Ili:l1ll1I=ll1Ili:lIllll=ll1Ili;else{if(lIllll==l1ll1I['replace'](/[eTPNhRkEAUBDyIrXgdtbM=]/g,'')){if(I11I===lIllli){i1IiIl['un'+i1lI1](ll1Ili);break;}i1IiIl[l1ll11](ll1Ili);}}}}}(i1IiII,illI1i,function(ll1Ill,Ili1il,i1lII,iilIii,iII111,Ili1ii,lIiIil){return Ili1il='\x73\x70\x6c\x69\x74',ll1Ill=arguments[0x0],ll1Ill=ll1Ill[Ili1il](''),i1lII=`\x72\x65\x76\x65\x72\x73\x65`,ll1Ill=ll1Ill[i1lII]('\x76'),iilIii=`\x6a\x6f\x69\x6e`,(0x1471d4,ll1Ill[iilIii](''));});}(0xbd0,0xce40d,Iii11l,0xbf),Iii11l)&&(version_=IlII(0x3b5,'pCgZ'));const IIlI1i=require(IlII(0x304,'8ltA')),iiiI1i=require(IlII(0x314,'nV&)')),iiiI1l=require(IlII(0x35d,'UTAS')),Ili1Ii=require('./function/krgetH5st'),Ii1l1I=process['env'][IlII(0xda,'jw4*')]==='true',iilII1=process[IlII(0xff,'Wt^e')][IlII(0x390,'ORDA')]===IlII(0x253,'h(AP'),iiiI11=process[IlII(0x427,'M5ma')][IlII(0x233,'h(AP')]==='true',l1lilI=process[IlII(0x427,'M5ma')][IlII(0x412,'2czn')]||'1',i1Iil1=process[IlII(0x1be,'kozZ')][IlII(0xd5,'ORDA')]===IlII(0x382,'aZ6w'),liI1Ii=process[IlII(0x1be,'kozZ')]['JD_PDD1_TXWAIT']||'3',l1lil1=process['env'][IlII(0x202,'Y19@')]||'3',i1lil=process[IlII(0x169,'ts]p')][IlII(0x1a9,'MpYc')]||'3',I1iIl=process[IlII(0x15e,'mx%S')][IlII(0x13e,'RD3)')]||'20',IilII=IlII(0xd1,'I)vb'),ili1l=process[IlII(0x1be,'kozZ')][IlII(0x21a,'ibFm')]===IlII(0x316,'EWkI'),i1lii=process[IlII(0x20c,'I)vb')][IlII(0x3cf,'txVq')],iilIII=process['env'][IlII(0x296,'Wt^e')],liI1Il=process[IlII(0x15e,'mx%S')][IlII(0x10d,'Wt^e')]||IlII(0x364,'VhNf');let I1iIi='',iiiI1I=0x0,lilI11=parseInt(liI1Ii)*0x3e8,Ili1II=parseInt(l1lil1)*0x3e8;$[IlII(0x341,'9Sx!')]=![];let ili1i=![];if(ili1l){ili1i=!![];try{require(IlII(0x31f,'EWkI'));if(iilIII){console['log'](IlII(0x27d,'LJ9p')),console[IlII(0x224,'OV^!')](IlII(0x3a2,'LJ9p')+iilIII+'\x0a');let i1Iili=/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/g;global[IlII(0x262,'b&m]')][IlII(0x25a,'uv$J')]=i1Iili['exec'](iilIII)[0x0]+','+liI1Il;}else i1lii?(global['GLOBAL_AGENT']['HTTP_PROXY']=i1lii,global[IlII(0x286,'IlI^')][IlII(0x259,'aZ6w')]=''+liI1Il,console[IlII(0x3d5,'$FW6')]('\x0a☑\x20代理池代理已开启'),console[IlII(0xd3,'pSnZ')](IlII(0x255,'0yT9')+global[IlII(0x175,'0yT9')][IlII(0x407,'PiXo')]+'\x0a')):(console[IlII(0x18a,'#G93')](IlII(0x19e,'M5ma')),console[IlII(0x355,'ts]p')]('⚠\x20代理池变量export\x20JD_JF_PROXY_TUNNRL=\x27http://ip:port\x27'),console[IlII(0x242,'12H2')](IlII(0x36c,'UTAS')));}catch(i1Iill){console['log'](IlII(0x2ba,'h(AP')),console['log'](IlII(0x1b8,'M5ma')),ili1i=![];}}else console[IlII(0x308,'I)vb')]('\x0a⚠\x20检测当前模式未开启代理'),console[IlII(0x3ad,'mCHI')](IlII(0x2b0,'ts]p'));let IiIi1='';function Iii11l(){const IlIl=(function(){return[...[version_,'BDRjUsETjrPiXamihd.ybXcBormgId.MekvUt7AN==','BSoooSk/E8o8uq','4O+O77IHz+w8T+wiGUIUPoE+VoAlKEwNUUMxMUMzMCoPpa','W7BcQ8oxuSk+k2e','W7PUWQ/dMSk7g8kvtSkyiuuPW6lcQMRcQ8ktCrjZWQ4NWRZcOCoxWO7cH8o3WOG7W7BcK8oD','5BsW5OUQ5yId6i6U5B2Era','W7tdNNtcSmofFHffedPtW4pcOSkmB8oDAHxcTCkMW78u','WRDXWQ7dKua','ESk6WPe3sa','rsNdICooWP4','W51QW7DlW4K','W43cPH97geO','W67cMCk/F8k4','DGhdQCoXWPe','W5PuWOi4Fq','wGz3cG','W7XnW5D6','W5e7F8k/emoiWPSJ','8y
2023-11-03 16:48:08 +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