KR/jd_ttlhb.js

13 lines
65 KiB
JavaScript
Raw Normal View History

2023-09-15 15:22:53 +08:00
/*
天天领红包
cron "25 7 * * *" script-path=jd_ttlhb.js, tag=天天领红包
轮询提现变量jd_ttlhb_num //轮询提现页数 一般无需填写
*/
const $ = new Env('天天领红包');
var version_='jsjiami.com.v7';const ll11ilII=i1ilIiiI;(function(IIil11I1,i1IiI1i1,ilIiIiii,iliIllli,i1I1I1ii,i1Ilii11,lii1li1i){return IIil11I1=IIil11I1>>0x7,i1Ilii11='hs',lii1li1i='hs',function(lillI11,I1iiI11I,lIIIiI1i,lIIli11l,I1iiii1I){const lI1lIiil=i1ilIiiI;lIIli11l='tfi',i1Ilii11=lIIli11l+i1Ilii11,I1iiii1I='up',lii1li1i+=I1iiii1I,i1Ilii11=lIIIiI1i(i1Ilii11),lii1li1i=lIIIiI1i(lii1li1i),lIIIiI1i=0x0;const I1iIiIII=lillI11();while(!![]&&--iliIllli+I1iiI11I){try{lIIli11l=parseInt(lI1lIiil(0x94,'NITD'))/0x1*(-parseInt(lI1lIiil(0x263,'*MBP'))/0x2)+-parseInt(lI1lIiil(0x12b,'*Bp['))/0x3+-parseInt(lI1lIiil(0x178,'Cc(i'))/0x4+-parseInt(lI1lIiil(0x17d,'**z)'))/0x5*(parseInt(lI1lIiil(0x1ce,'M54O'))/0x6)+-parseInt(lI1lIiil(0x8d,'Tset'))/0x7*(parseInt(lI1lIiil(0xc5,'iFSY'))/0x8)+-parseInt(lI1lIiil(0x80,'Tset'))/0x9+parseInt(lI1lIiil(0x1e7,'mYuP'))/0xa;}catch(iIl1111i){lIIli11l=lIIIiI1i;}finally{I1iiii1I=I1iIiIII[i1Ilii11]();if(IIil11I1<=iliIllli)lIIIiI1i?i1I1I1ii?lIIli11l=I1iiii1I:i1I1I1ii=I1iiii1I:lIIIiI1i=I1iiii1I;else{if(lIIIiI1i==i1I1I1ii['replace'](/[qrNlbnSfDBMkxQCOGXYHP=]/g,'')){if(lIIli11l===I1iiI11I){I1iIiIII['un'+i1Ilii11](I1iiii1I);break;}I1iIiIII[lii1li1i](I1iiii1I);}}}}}(ilIiIiii,i1IiI1i1,function(li1II1l,lliIliII,lIIi11il,I1li,I1I1iii1,llIi1Ill,lII1iii){return lliIliII='\x73\x70\x6c\x69\x74',li1II1l=arguments[0x0],li1II1l=li1II1l[lliIliII](''),lIIi11il=`\x72\x65\x76\x65\x72\x73\x65`,li1II1l=li1II1l[lIIi11il]('\x76'),I1li=`\x6a\x6f\x69\x6e`,(0x13e5fc,li1II1l[I1li](''));});}(0x6300,0x4761a,iiiIil,0xc8),iiiIil)&&(version_=iiiIil);const llIlIiI=$[ll11ilII(0x107,'5a&p')]()?require(ll11ilII(0x128,'OpU9')):'',ll1IilI=$[ll11ilII(0x237,'*MBP')]()?require(ll11ilII(0x1f0,'k0ze')):'',iIIi11ii=require(ll11ilII(0x295,'WC8('));let Il11IliI=!![],IIl1II1I=ll11ilII(0x25e,'Tset'),llli1l1=process['env']['jd_ttlhb_num']?process[ll11ilII(0x2a3,'tm[%')][ll11ilII(0x16e,'lI5V')]:'1',iiI1iiI1=Date['now'](),iliili1i=[],il1ilIli='',I111I1ii;if($[ll11ilII(0x242,'tpp&')]()){Object[ll11ilII(0x14c,'Cc(i')](ll1IilI)[ll11ilII(0x6f,'**z)')](i1lIi11i=>{const Ii1lIlll=ll11ilII;iliili1i[Ii1lIlll(0x16a,'Tset')](ll1IilI[i1lIi11i]);});if(process['env'][ll11ilII(0x177,'Oeyf')]&&process[ll11ilII(0xc8,'Tset')][ll11ilII(0x109,'ZuTT')]==='false')console[ll11ilII(0x1b6,'m$a0')]=()=>{};}else iliili1i=[$['getdata'](ll11ilII(0x1ae,'pB[s')),$[ll11ilII(0x23e,'k0ze')](ll11ilII(0x11c,'mYuP')),...l1Ii1Il1($[ll11ilII(0x208,'u1Ik')](ll11ilII(0x18b,'MAx)'))||'[]')['map'](I1Ili1=>I1Ili1[ll11ilII(0x1d4,'*Bp[')])][ll11ilII(0xc2,'pB[s')](iIl1IiIl=>!!iIl1IiIl);function i1ilIiiI(_0x3b55db,_0x1f60f1){const _0x2200a2=iiiIil();return i1ilIiiI=function(_0x1538f9,_0x51f134){_0x1538f9=_0x1538f9-0x6c;let _0x5bb453=_0x2200a2[_0x1538f9];if(i1ilIiiI['DZDJsj']===undefined){var _0xc5deea=function(_0x1de9f1){const _0x3d413e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x571599='',_0x3d453d='';for(let _0x5995d1=0x0,_0x3f9700,_0x22b8c9,_0x1eb0e6=0x0;_0x22b8c9=_0x1de9f1['charAt'](_0x1eb0e6++);~_0x22b8c9&&(_0x3f9700=_0x5995d1%0x4?_0x3f9700*0x40+_0x22b8c9:_0x22b8c9,_0x5995d1++%0x4)?_0x571599+=String['fromCharCode'](0xff&_0x3f9700>>(-0x2*_0x5995d1&0x6)):0x0){_0x22b8c9=_0x3d413e['indexOf'](_0x22b8c9);}for(let _0x23f3c2=0x0,_0x5a3030=_0x571599['length'];_0x23f3c2<_0x5a3030;_0x23f3c2++){_0x3d453d+='%'+('00'+_0x571599['charCodeAt'](_0x23f3c2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3d453d);};const _0x2d42ff=function(_0x10decd,_0x26750d){let _0x484157=[],_0x2d966f=0x0,_0x2dd428,_0x21e436='';_0x10decd=_0xc5deea(_0x10decd);let _0x58151c;for(_0x58151c=0x0;_0x58151c<0x100;_0x58151c++){_0x484157[_0x58151c]=_0x58151c;}for(_0x58151c=0x0;_0x58151c<0x100;_0x58151c++){_0x2d966f=(_0x2d966f+_0x484157[_0x58151c]+_0x26750d['charCodeAt'](_0x58151c%_0x26750d['length']))%0x100,_0x2dd428=_0x484157[_0x58151c],_0x484157[_0x58151c]=_0x484157[_0x2d966f],_0x484157[_0x2d966f]=_0x2dd428;}_0x58151c=0x0,_0x2d966f=0x0;for(let _0x42e941=0x0;_0x42e941<_0x10decd['length'];_0x42e941++){_0x58151c=(_0x58151c+0x1)%0x100,_0x2d966f=(_0x2d966f+_0x484157[_0x58151c])%0x100,_0x2dd428=_0x4
// 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