faker3/jd_tj_ttlhb.js

13 lines
53 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
特价-天天领红包
jd_tj_ttlhb_tx // 是否提现,默认不提现
cron "1 4,21 * * *" script-path=jd_tj_ttlhb.js, tag=特价-天天领红包
*/
const $ = new Env('特价-天天领红包')
var il='jsjiami.com.v7';const lliiIl=iii1II;if(function(llIlII,IIlII,lIIiII,i1iIlI,li111,liI1lI,lIIiI1){return llIlII=llIlII>>0x2,liI1lI='hs',lIIiI1='hs',function(ll1I1,Ii1ili,iI1Ii1,Ii1ill,llIlI1){const li11l=iii1II;Ii1ill='tfi',liI1lI=Ii1ill+liI1lI,llIlI1='up',lIIiI1+=llIlI1,liI1lI=iI1Ii1(liI1lI),lIIiI1=iI1Ii1(lIIiI1),iI1Ii1=0x0;const iI1IiI=ll1I1();while(!![]&&--i1iIlI+Ii1ili){try{Ii1ill=parseInt(li11l(0x203,'dtYM'))/0x1*(-parseInt(li11l(0x346,'4qUJ'))/0x2)+parseInt(li11l(0x3bb,'4qUJ'))/0x3+parseInt(li11l(0x30e,'TVFV'))/0x4+parseInt(li11l(0x1c7,'Rf0r'))/0x5*(-parseInt(li11l(0x38b,'^f9n'))/0x6)+-parseInt(li11l(0x282,'RvIx'))/0x7+-parseInt(li11l(0x37c,'56])'))/0x8+-parseInt(li11l(0x3bf,'a5iY'))/0x9*(-parseInt(li11l(0x2e3,'[W&i'))/0xa);}catch(IIlI1){Ii1ill=iI1Ii1;}finally{llIlI1=iI1IiI[liI1lI]();if(llIlII<=i1iIlI)iI1Ii1?li111?Ii1ill=llIlI1:li111=llIlI1:iI1Ii1=llIlI1;else{if(iI1Ii1==li111['replace'](/[gCHAVfShtLyeMDxINRqTr=]/g,'')){if(Ii1ill===Ii1ili){iI1IiI['un'+liI1lI](llIlI1);break;}iI1IiI[lIIiI1](llIlI1);}}}}}(lIIiII,IIlII,function(i1iIli,i1iIll,i1lliI,liI1l1,IllIlI,IiillI,ili11I){return i1iIll='\x73\x70\x6c\x69\x74',i1iIli=arguments[0x0],i1iIli=i1iIli[i1iIll](''),i1lliI=`\x72\x65\x76\x65\x72\x73\x65`,i1iIli=i1iIli[i1lliI]('\x76'),liI1l1=`\x6a\x6f\x69\x6e`,(0x16d667,i1iIli[liI1l1](''));});}(0x318,0x1c146,Iii11l,0xc8),Iii11l){}const jdCookie=require(lliiIl(0x297,'psl1')),notify=require(lliiIl(0x334,'CWIr')),common=require(lliiIl(0x1a8,'gEbb')),{H5st}=require(lliiIl(0x315,'CWIr')),Exchange=process[lliiIl(0x211,'K)Jm')][lliiIl(0x1eb,'Ql$#')]==='true',pagination=process[lliiIl(0x2c8,'0Ufr')][lliiIl(0x187,'ibS!')]||'1',Swish=process[lliiIl(0x3de,'z@fC')][lliiIl(0x387,'249X')]==='true',MAX_RETRY=process[lliiIl(0x2f9,'rHP5')]['jd_tj_ttlhb_txmax_retry']||'3',isNotify=![];let linkId=lliiIl(0x3d3,'[W&i'),cookie='';const cookiesArr=Object[lliiIl(0x201,'8fE[')](jdCookie)[lliiIl(0x3b6,'8fE[')](Iil1l1=>jdCookie[Iil1l1])['filter'](i1i11I=>i1i11I);function iii1II(_0x5a91ee,_0x57e247){const _0x494f52=Iii11l();return iii1II=function(_0x1ede6e,_0x11df11){_0x1ede6e=_0x1ede6e-0x183;let _0x585bc3=_0x494f52[_0x1ede6e];if(iii1II['fEHPui']===undefined){var _0x32ec9f=function(_0x19f769){const _0x2c0d21='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2844d6='',_0x2d861a='';for(let _0x468883=0x0,_0xb01d1b,_0x12fed5,_0x5d8a3c=0x0;_0x12fed5=_0x19f769['charAt'](_0x5d8a3c++);~_0x12fed5&&(_0xb01d1b=_0x468883%0x4?_0xb01d1b*0x40+_0x12fed5:_0x12fed5,_0x468883++%0x4)?_0x2844d6+=String['fromCharCode'](0xff&_0xb01d1b>>(-0x2*_0x468883&0x6)):0x0){_0x12fed5=_0x2c0d21['indexOf'](_0x12fed5);}for(let _0x4f04e8=0x0,_0x23153d=_0x2844d6['length'];_0x4f04e8<_0x23153d;_0x4f04e8++){_0x2d861a+='%'+('00'+_0x2844d6['charCodeAt'](_0x4f04e8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2d861a);};const _0x344cfd=function(_0x4d70a1,_0x5bd60d){let _0x397f87=[],_0x4c5265=0x0,_0x4aab43,_0x3af532='';_0x4d70a1=_0x32ec9f(_0x4d70a1);let _0x5ce867;for(_0x5ce867=0x0;_0x5ce867<0x100;_0x5ce867++){_0x397f87[_0x5ce867]=_0x5ce867;}for(_0x5ce867=0x0;_0x5ce867<0x100;_0x5ce867++){_0x4c5265=(_0x4c5265+_0x397f87[_0x5ce867]+_0x5bd60d['charCodeAt'](_0x5ce867%_0x5bd60d['length']))%0x100,_0x4aab43=_0x397f87[_0x5ce867],_0x397f87[_0x5ce867]=_0x397f87[_0x4c5265],_0x397f87[_0x4c5265]=_0x4aab43;}_0x5ce867=0x0,_0x4c5265=0x0;for(let _0x16f327=0x0;_0x16f327<_0x4d70a1['length'];_0x16f327++){_0x5ce867=(_0x5ce867+0x1)%0x100,_0x4c5265=(_0x4c5265+_0x397f87[_0x5ce867])%0x100,_0x4aab43=_0x397f87[_0x5ce867],_0x397f87[_0x5ce867]=_0x397f87[_0x4c5265],_0x397f87[_0x4c5265]=_0x4aab43,_0x3af532+=String['fromCharCode'](_0x4d70a1['charCodeAt'](_0x16f327)^_0x397f87[(_0x397f87[_0x5ce867]+_0x397f87[_0x4c5265])%0x100]);}return _0x3af532;};iii1II['wPXxcn']=_0x344cfd,_0x5a91ee=arguments,iii1II['fEHPui']=!![];}const _0x47a772=_0x494f52[0x0],_0x22780f=_0x1ede6e+_0x47a772,_0x31f11d=_0x5a91ee[_0x22780f];return!_0x31f11d?(iii1II['dWCiqe']===undefined&&(iii1II['dWCiqe']=!![]),_0x585bc3=iii1II['wPXxcn'](_0x585bc3,_0x11df11),_0x5a91ee[_0x22780f]=_0x585bc3):_0x585bc3=_0x31f11d,_0x585bc3
// 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