faker3/jd_zzhb_new_help.js

18 lines
41 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
新转转红包助力
链接https://pro.m.jd.com/mall/active/B2Y13x641hwWfpsoRenCzfbz4jR/index.html
环境变量
JD_PDD2_InviterId // 指定助力码 非必须,不填默认助力账号一
JD_PDD2_NUM // 指定人数 非必须,不填默认跑全部账号
cron:0 0,12 * * * jd_zzhb_new_help.js
*/
const $ = new Env('新转赚红包助力');
var il='jsjiami.com.v7';const ilIIIl11=Il1ii111;(function(i1Iii1II,il1llii,ii1iliIl,l11ll1II,i1l1li1i,iiiiIi1l,Il1li1){return i1Iii1II=i1Iii1II>>0x5,iiiiIi1l='hs',Il1li1='hs',function(I1i1liI1,I1iliIil,IIlIlii,lIiil111,iI1ii1i){const IlIliIii=Il1ii111;lIiil111='tfi',iiiiIi1l=lIiil111+iiiiIi1l,iI1ii1i='up',Il1li1+=iI1ii1i,iiiiIi1l=IIlIlii(iiiiIi1l),Il1li1=IIlIlii(Il1li1),IIlIlii=0x0;const IiIil11I=I1i1liI1();while(!![]&&--l11ll1II+I1iliIil){try{lIiil111=-parseInt(IlIliIii(0x22d,'8YP6'))/0x1*(parseInt(IlIliIii(0x1ce,'0t6['))/0x2)+-parseInt(IlIliIii(0x1aa,'QyL8'))/0x3*(-parseInt(IlIliIii(0x229,'Hni4'))/0x4)+-parseInt(IlIliIii(0x263,'u09J'))/0x5*(parseInt(IlIliIii(0x1b9,'(]C['))/0x6)+-parseInt(IlIliIii(0x1d2,'!LoY'))/0x7+-parseInt(IlIliIii(0x1a3,'CDGE'))/0x8+-parseInt(IlIliIii(0x16b,'mpSt'))/0x9+parseInt(IlIliIii(0x290,'#%7p'))/0xa;}catch(i11Il1l1){lIiil111=IIlIlii;}finally{iI1ii1i=IiIil11I[iiiiIi1l]();if(i1Iii1II<=l11ll1II)IIlIlii?i1l1li1i?lIiil111=iI1ii1i:i1l1li1i=iI1ii1i:IIlIlii=iI1ii1i;else{if(IIlIlii==i1l1li1i['replace'](/[tQpYAOgkCVqlREUThSJNbn=]/g,'')){if(lIiil111===I1iliIil){IiIil11I['un'+iiiiIi1l](iI1ii1i);break;}IiIil11I[Il1li1](iI1ii1i);}}}}}(ii1iliIl,il1llii,function(lIilI1il,Il11I11l,ll1il1i1,Il11IIIi,iiIIli1,l1ii1iII,llIIlI1l){return Il11I11l='\x73\x70\x6c\x69\x74',lIilI1il=arguments[0x0],lIilI1il=lIilI1il[Il11I11l](''),ll1il1i1='\x72\x65\x76\x65\x72\x73\x65',lIilI1il=lIilI1il[ll1il1i1]('\x76'),Il11IIIi='\x6a\x6f\x69\x6e',(0x1688ff,lIilI1il[Il11IIIi](''));});}(0x18c0,0x80e07,IlliIIi1,0xc8),IlliIIi1)&&(il=ilIIIl11(0x1af,'u09J'));const notify=require(ilIIIl11(0x218,'qH[v')),jdCookie=require('./jdCookie'),common=require('./utils/Rebels_jdCommon'),{H5st}=require('./utils/Rebels_H'),isNotify=process[ilIIIl11(0x1c3,'h6bp')][ilIIIl11(0x154,'Bj^t')]===ilIIIl11(0x176,'(]C['),pddcode=process[ilIIIl11(0x165,'0oYC')][ilIIIl11(0x1f2,'Chs9')]||'',pddnum=process['env'][ilIIIl11(0x29c,'jZ8X')],linkId='wDNvX5t2N52cWEM8cLOa0g',PDD_WAIT='1';let waitTimes=parseInt(PDD_WAIT)*0x3e8;$['helpnum']=0x0,$['PDDEnd']=![];let cookie='';const cookiesArr=Object[ilIIIl11(0x18b,'xlTU')](jdCookie)[ilIIIl11(0x26f,'rwZ7')](lil111i=>jdCookie[lil111i])[ilIIIl11(0x1e8,'iY%Y')](Iiliil1=>Iiliil1);function Il1ii111(_0x241692,_0x4a4e20){const _0x4fc94d=IlliIIi1();return Il1ii111=function(_0x44b6a0,_0x2698b9){_0x44b6a0=_0x44b6a0-0x148;let _0x36cf47=_0x4fc94d[_0x44b6a0];if(Il1ii111['JaVwal']===undefined){var _0x29219b=function(_0x571565){const _0x58d9eb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x8188c8='',_0x24801e='';for(let _0x14b4ac=0x0,_0x5821d9,_0x585c1f,_0x28008b=0x0;_0x585c1f=_0x571565['charAt'](_0x28008b++);~_0x585c1f&&(_0x5821d9=_0x14b4ac%0x4?_0x5821d9*0x40+_0x585c1f:_0x585c1f,_0x14b4ac++%0x4)?_0x8188c8+=String['fromCharCode'](0xff&_0x5821d9>>(-0x2*_0x14b4ac&0x6)):0x0){_0x585c1f=_0x58d9eb['indexOf'](_0x585c1f);}for(let _0x4d662c=0x0,_0x16ded2=_0x8188c8['length'];_0x4d662c<_0x16ded2;_0x4d662c++){_0x24801e+='%'+('00'+_0x8188c8['charCodeAt'](_0x4d662c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x24801e);};const _0x52b276=function(_0x351800,_0x305e17){let _0x5dd1ea=[],_0x5df3a1=0x0,_0xed172a,_0x29b59a='';_0x351800=_0x29219b(_0x351800);let _0x3f6366;for(_0x3f6366=0x0;_0x3f6366<0x100;_0x3f6366++){_0x5dd1ea[_0x3f6366]=_0x3f6366;}for(_0x3f6366=0x0;_0x3f6366<0x100;_0x3f6366++){_0x5df3a1=(_0x5df3a1+_0x5dd1ea[_0x3f6366]+_0x305e17['charCodeAt'](_0x3f6366%_0x305e17['length']))%0x100,_0xed172a=_0x5dd1ea[_0x3f6366],_0x5dd1ea[_0x3f6366]=_0x5dd1ea[_0x5df3a1],_0x5dd1ea[_0x5df3a1]=_0xed172a;}_0x3f6366=0x0,_0x5df3a1=0x0;for(let _0x160e70=0x0;_0x160e70<_0x351800['length'];_0x160e70++){_0x3f6366=(_0x3f6366+0x1)%0x100,_0x5df3a1=(_0x5df3a1+_0x5dd1ea[_0x3f6366])%0x100,_0xed172a=_0x5dd1ea[_0x3f6366],_0x5dd1ea[_0x3f6366]=_0x5dd1ea[_0x5df3a1],_0x5dd1ea[_0x5df3a1]=_0xed172a,_0x29b59a+=String['fromCharCode'](_0x351800['charCodeAt'](_0x160e70)^_0x5dd1ea[(_0x5dd1ea[_0x3f6366]+_0x5dd1ea[_0x5df3a1])%0x100]);}return _0x29b59a;};Il1ii111['QTDWOQ']=_0x52b276,_0x241692=arguments,Il1ii111['JaVwal']=!![];}const _0x20c8ba=_0x4fc9
// 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