KR/jd_pdd1_help.js

28 lines
53 KiB
JavaScript
Raw Normal View History

2023-11-01 15:02:56 +08:00
/*
PDD转赚红包助力
入口京东APP玩一玩转赚红包
链接https://pro.m.jd.com/mall/active/3BwUqhLsJYrHP4qgAgDDJGrSVngK/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_pdd1_help.js, tag=PDD转赚红包助力, enabled=true
*/
const $ = new Env('PDD转赚红包助力')
2023-11-01 22:23:59 +08:00
var version_='jsjiami.com.v7';const Ili1I1=iii1II;(function(i11111,lIl1li,Il1I1,lIilii,lIilil,lIl1ll,Ii111){return i11111=i11111>>0x1,lIl1ll='hs',Ii111='hs',function(Ii1III,ilIIi1,l111i,l111l,I1iilI){const l1lI1=iii1II;l111l='tfi',lIl1ll=l111l+lIl1ll,I1iilI='up',Ii111+=I1iilI,lIl1ll=l111i(lIl1ll),Ii111=l111i(Ii111),l111i=0x0;const Ii1II1=Ii1III();while(!![]&&--lIilii+ilIIi1){try{l111l=-parseInt(l1lI1(0x32b,'BeFJ'))/0x1*(parseInt(l1lI1(0x26d,'SbUa'))/0x2)+parseInt(l1lI1(0x317,'LK$5'))/0x3*(parseInt(l1lI1(0x325,'J]1c'))/0x4)+parseInt(l1lI1(0x194,'Uz0I'))/0x5+parseInt(l1lI1(0x249,'inMb'))/0x6*(-parseInt(l1lI1(0x224,'qA2)'))/0x7)+-parseInt(l1lI1(0x210,'G]Mx'))/0x8*(-parseInt(l1lI1(0x219,'IAKi'))/0x9)+-parseInt(l1lI1(0x203,'QoD3'))/0xa+parseInt(l1lI1(0x1fc,'*fbw'))/0xb*(parseInt(l1lI1(0x204,'K(]T'))/0xc);}catch(lilili){l111l=l111i;}finally{I1iilI=Ii1II1[lIl1ll]();if(i11111<=lIilii)l111i?lIilil?l111l=I1iilI:lIilil=I1iilI:l111i=I1iilI;else{if(l111i==lIilil['replace'](/[xPNUDLuFOGreRfwSQlbHE=]/g,'')){if(l111l===ilIIi1){Ii1II1['un'+lIl1ll](I1iilI);break;}Ii1II1[Ii111](I1iilI);}}}}}(Il1I1,lIl1li,function(IliIli,lI1ilI,IllliI,IliIll,iIiili,lilill,IilI1){return lI1ilI='\x73\x70\x6c\x69\x74',IliIli=arguments[0x0],IliIli=IliIli[lI1ilI](''),IllliI=`\x72\x65\x76\x65\x72\x73\x65`,IliIli=IliIli[IllliI]('\x76'),IliIll=`\x6a\x6f\x69\x6e`,(0x1459b7,IliIli[IliIll](''));});}(0x182,0x67147,Iii11l,0xc3),Iii11l)&&(version_=Ili1I1(0x1a4,'[&VA'));const ili1Ii=require(Ili1I1(0x222,'PSH$')),Iilll1=require(Ili1I1(0x21c,'y10Z')),ll11I=require('./function/jdCommon'),iIi1I=require(Ili1I1(0x300,'qFOO')),liIIl=process['env'][Ili1I1(0x2d0,'bJr^')]===Ili1I1(0x2d7,'BKeM'),IlI1lI=process['env'][Ili1I1(0x261,'K(]T')]||'',liIIi=process['env']['JD_PDD_NUM'],IilllI=Ili1I1(0x2e3,'nkQc'),iI1lIi=process['env'][Ili1I1(0x273,'Uhx8')]===Ili1I1(0x28b,'ko)j'),l1lllI=process[Ili1I1(0x313,'JW]@')][Ili1I1(0x27e,'3TfN')],llliIi=process['env'][Ili1I1(0x320,'eu*G')],i1lIli=process['env'][Ili1I1(0x289,'uogG')]||Ili1I1(0x1de,'ko)j');let i1lIll='',ll11ii=0x0;const liIlii='2';let llii1l=parseInt(liIlii)*0x3e8;iI1lIi&&(l1lllI||llliIi)&&(llii1l=0x64);function iii1II(_0x43f476,_0x157e46){const _0x1db264=Iii11l();return iii1II=function(_0x54a6b3,_0x4d4110){_0x54a6b3=_0x54a6b3-0x13e;let _0xab01b8=_0x1db264[_0x54a6b3];if(iii1II['BtStAn']===undefined){var _0x38de50=function(_0x32658b){const _0x27b04f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x787271='',_0x3c25c2='';for(let _0x412198=0x0,_0x19214e,_0x20e737,_0x3335b1=0x0;_0x20e737=_0x32658b['charAt'](_0x3335b1++);~_0x20e737&&(_0x19214e=_0x412198%0x4?_0x19214e*0x40+_0x20e737:_0x20e737,_0x412198++%0x4)?_0x787271+=String['fromCharCode'](0xff&_0x19214e>>(-0x2*_0x412198&0x6)):0x0){_0x20e737=_0x27b04f['indexOf'](_0x20e737);}for(let _0x58ccfa=0x0,_0x156c0f=_0x787271['length'];_0x58ccfa<_0x156c0f;_0x58ccfa++){_0x3c25c2+='%'+('00'+_0x787271['charCodeAt'](_0x58ccfa)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3c25c2);};const _0x4e33ed=function(_0x16910d,_0x5ed633){let _0x2886a3=[],_0x5bed03=0x0,_0x31e7e4,_0x270e37='';_0x16910d=_0x38de50(_0x16910d);let _0x2d9930;for(_0x2d9930=0x0;_0x2d9930<0x100;_0x2d9930++){_0x2886a3[_0x2d9930]=_0x2d9930;}for(_0x2d9930=0x0;_0x2d9930<0x100;_0x2d9930++){_0x5bed03=(_0x5bed03+_0x2886a3[_0x2d9930]+_0x5ed633['charCodeAt'](_0x2d9930%_0x5ed633['length']))%0x100,_0x31e7e4=_0x2886a3[_0x2d9930],_0x2886a3[_0x2d9930]=_0x2886a3[_0x5bed03],_0x2886a3[_0x5bed03]=_0x31e7e4;}_0x2d9930=0x0,_0x5bed03=0x0;for(let _0x38137b=0x0;_0x38137b<_0x16910d['length'];_0x38137b++){_0x2d9930=(_0x2d9930+0x1)%0x100,_0x5bed03=(_0x5bed03+_0x2886a3[_0x2d9930])%0x100,_0x31e7e4=_0x2886a3[_0x2d9930],_0x2886a3[_0x2d9930]=_0x2886a3[_0x5bed03],_0x2886a3[_0x5bed03]=_0x31e7e4,_0x270e37+=String['fromCharCode'](_0x16910d['charCodeAt'](_0x38137b)^_0x2886a3[(_0x2886a3[_0x2d9930]+_0x2886a3[_0x5bed03])%0x100]);}return _0x270e37;};iii1II['FhDPEV']=_0x4e33ed,_0x43f476=arguments,iii1II['BtStAn']=!![];}const _0x17b025=_0x1db264[0x0],_0x27d45e=_0x54a6b3+_0x17b025,_0x2cf70e=_0x43f476[_0x27d45e];return!_0x2cf70e?(iii1II['Fq
2023-11-01 15:02:56 +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