KR/jd_pdd_help.js

28 lines
56 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特价转盘助力')
var version_='jsjiami.com.v7';const Ili1II=iii1II;(function(I1iII,IIlI1i,iiiI1i,iiiI1l,Ili1Ii,Ii1l1I,iilII1){return I1iII=I1iII>>0x1,Ii1l1I='hs',iilII1='hs',function(iiiI11,l1lilI,i1Iil1,liI1Ii,l1lil1){const lilI11=iii1II;liI1Ii='tfi',Ii1l1I=liI1Ii+Ii1l1I,l1lil1='up',iilII1+=l1lil1,Ii1l1I=i1Iil1(Ii1l1I),iilII1=i1Iil1(iilII1),i1Iil1=0x0;const i1lil=iiiI11();while(!![]&&--iiiI1l+l1lilI){try{liI1Ii=parseInt(lilI11(0x26d,'u%!R'))/0x1+parseInt(lilI11(0x19b,'^Z&d'))/0x2*(-parseInt(lilI11(0x1c9,'uEJJ'))/0x3)+parseInt(lilI11(0x195,'UxAG'))/0x4*(-parseInt(lilI11(0x2a7,'aJn1'))/0x5)+parseInt(lilI11(0x329,'axjj'))/0x6+parseInt(lilI11(0x2e0,'MX!Y'))/0x7*(-parseInt(lilI11(0x15f,'S$t]'))/0x8)+parseInt(lilI11(0x370,'ChPR'))/0x9*(parseInt(lilI11(0x24d,'fLKf'))/0xa)+parseInt(lilI11(0x196,'an^l'))/0xb;}catch(I1iIl){liI1Ii=i1Iil1;}finally{l1lil1=i1lil[Ii1l1I]();if(I1iII<=iiiI1l)i1Iil1?Ili1Ii?liI1Ii=l1lil1:Ili1Ii=l1lil1:i1Iil1=l1lil1;else{if(i1Iil1==Ili1Ii['replace'](/[xWYwLdtGknhReTyFpDNU=]/g,'')){if(liI1Ii===l1lilI){i1lil['un'+Ii1l1I](l1lil1);break;}i1lil[iilII1](l1lil1);}}}}}(iiiI1i,IIlI1i,function(IilII,ili1l,i1lii,iilIII,liI1Il,I1iIi,iiiI1I){return ili1l='\x73\x70\x6c\x69\x74',IilII=arguments[0x0],IilII=IilII[ili1l](''),i1lii=`\x72\x65\x76\x65\x72\x73\x65`,IilII=IilII[i1lii]('\x76'),iilIII=`\x6a\x6f\x69\x6e`,(0x1457c4,IilII[iilIII](''));});}(0x17a,0x81c56,Iii11l,0xbf),Iii11l)&&(version_=Ili1II(0x1e4,'aJn1'));const l1i1I=require('./jdCookie'),l1llll=require(Ili1II(0x302,'ApIx')),I1I1ll=require('./function/jdCommon'),lil1i=require(Ili1II(0x212,'^Z&d')),liiiil=process[Ili1II(0x21c,'(I83')][Ili1II(0x204,'GwEb')]===Ili1II(0x1da,'z3j@'),IIIIli=process['env'][Ili1II(0x16e,'u%!R')]||'',lllIi=process['env'][Ili1II(0x1c7,'^Z&d')],lil1l=Ili1II(0x217,'uEJJ'),lllIl={0x1:'水滴'},Iliii=process['env'][Ili1II(0x355,'z3j@')]===Ili1II(0x206,'rY6d'),illlii=process[Ili1II(0x278,'M2c*')][Ili1II(0x168,'2BTG')],I1lIIi=process[Ili1II(0x1c3,'@i!7')][Ili1II(0x1af,'S$t]')],l1i1i=process[Ili1II(0x1ad,'e$Sz')][Ili1II(0x2c0,'GwEb')]||Ili1II(0x2fb,'@i!7');let I1iI1i='',l1i1l=0x0;const I1iI1l='2';let illlil=parseInt(I1iI1l)*0x3e8;Iliii&&(illlii||I1lIIi)&&(illlil=0x64);$[Ili1II(0x1cb,'BN%6')]=0x0,$[Ili1II(0x263,'an^l')]=![];let Iliil=![];if(Iliii){Iliil=!![];try{require('global-agent/bootstrap');if(I1lIIi){console[Ili1II(0x332,']%4C')](Ili1II(0x37b,')ChM')),console[Ili1II(0x27f,'v)xE')](Ili1II(0x308,'cLF3')+I1lIIi+'\x0a');let l11iI1=/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/g;global['GLOBAL_AGENT'][Ili1II(0x290,'c8f[')]=l11iI1[Ili1II(0x1e7,'BfwJ')](I1lIIi)[0x0]+','+l1i1i;}else illlii?(global[Ili1II(0x315,'MX!Y')][Ili1II(0x2c6,'OH8F')]=illlii,global['GLOBAL_AGENT'][Ili1II(0x2ae,'s#]9')]=''+l1i1i,console[Ili1II(0x20c,'fLKf')]('\x0a☑\x20代理池代理已开启'),console[Ili1II(0x2db,')tQg')]('☑️\x20代理地址为'+global[Ili1II(0x18d,'0)C3')][Ili1II(0x175,'(qVG')]+'\x0a')):(console[Ili1II(0x1fd,'2BTG')](Ili1II(0x336,'2c0S')),console['log'](Ili1II(0x1a6,'MX!Y')),console[Ili1II(0x221,'axjj')](Ili1II(0x203,'ChPR')));}catch(IliiI){console['log'](Ili1II(0x318,'u%!R')),console['log'](Ili1II(0x23c,'@i!7')),Iliil=![];}}else console[Ili1II(0x321,'GroP')]('\x0a⚠\x20检测当前模式未开启代理'),console[Ili1II(0x167,'GwEb')](Ili1II(0x265,'s#]9'));let I1lIIl='';const l1ilI1=Object[Ili1II(0x280,'0)C3')](l1i1I)[Ili1II(0x33c,')ChM')](lI111i=>l1i1I[lI111i])[Ili1II(0x364,'MH%q')](I1lIII=>I1lIII);!l1ilI1[0x0]&&($[Ili1II(0x17b,'O1cH')]($[Ili1II(0x261,'fLKf')],Ili1II(0x2bd,'e$Sz')),process[Ili1II(0x1b0,'GwEb')](0x1));!(async()=>{const ili1i=Ili1II,liIlll={'swpAf':function(I1iI1I,illll1){return I1iI1I+illll1;},'RSobo':function(IIIIl1,liiilI){return IIIIl1(liiilI);},'Ciqzs':'http://code.kingran.cf/yqlxj.json','cScLZ':function(lI111l,liiii1,IIiiIl){return lI111l(liiii1,IIiiIl);},'fDSEu':ili1i(0x268,'(I83'),'BcvwQ':ili1i(0x376,'GwEb'),'gAqwi':function(l1ilIl,IIiiIi,l1ilIi){return l1ilIl(IIiiIi,l1ilIi);},'rTmrN':ili1i(0x249,'nUQB'),'PyWzR':function(l11iIi,ll11li){return l11iIi===ll11li;},'jDUag':ili1i(0x219,']%4C'),'VNVZx':function(iliIlI,l
// 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