mirror of https://github.com/6dylan6/jdpro.git
9 lines
72 KiB
JavaScript
9 lines
72 KiB
JavaScript
|
/*
|
||
|
天天领红包
|
||
|
任务+开红包
|
||
|
3 3,15 * * * https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_tjlhb.js
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('特价版领红包');
|
||
|
var _0xodO='jsjiami.com.v7';const _0x1c213e=_0x3c03;(function(_0x46bf75,_0x4cdb97,_0x556d87,_0xa044d3,_0x14ea2c,_0x346b37,_0x42ef7f){return _0x46bf75=_0x46bf75>>0x4,_0x346b37='hs',_0x42ef7f='hs',function(_0x2c7dad,_0x7afbe0,_0x375ffc,_0x15ecc7,_0x28bba2){const _0x3a8872=_0x3c03;_0x15ecc7='tfi',_0x346b37=_0x15ecc7+_0x346b37,_0x28bba2='up',_0x42ef7f+=_0x28bba2,_0x346b37=_0x375ffc(_0x346b37),_0x42ef7f=_0x375ffc(_0x42ef7f),_0x375ffc=0x0;const _0x3a4e7e=_0x2c7dad();while(!![]&&--_0xa044d3+_0x7afbe0){try{_0x15ecc7=-parseInt(_0x3a8872(0x280,'CODu'))/0x1+-parseInt(_0x3a8872(0x3c0,'ZyUd'))/0x2*(parseInt(_0x3a8872(0x2a3,'zZ70'))/0x3)+parseInt(_0x3a8872(0x2f8,'qLI4'))/0x4+-parseInt(_0x3a8872(0x339,'pps1'))/0x5+-parseInt(_0x3a8872(0x1ec,'bRH8'))/0x6+-parseInt(_0x3a8872(0x194,')@6^'))/0x7*(-parseInt(_0x3a8872(0x2d4,'bRH8'))/0x8)+-parseInt(_0x3a8872(0x12e,'KU%L'))/0x9*(-parseInt(_0x3a8872(0x2c3,'UrDM'))/0xa);}catch(_0x2736f2){_0x15ecc7=_0x375ffc;}finally{_0x28bba2=_0x3a4e7e[_0x346b37]();if(_0x46bf75<=_0xa044d3)_0x375ffc?_0x14ea2c?_0x15ecc7=_0x28bba2:_0x14ea2c=_0x28bba2:_0x375ffc=_0x28bba2;else{if(_0x375ffc==_0x14ea2c['replace'](/[uDAChlIBJdERtYKyMONGqL=]/g,'')){if(_0x15ecc7===_0x7afbe0){_0x3a4e7e['un'+_0x346b37](_0x28bba2);break;}_0x3a4e7e[_0x42ef7f](_0x28bba2);}}}}}(_0x556d87,_0x4cdb97,function(_0x1aeca3,_0x3d3127,_0x3648,_0x10dc54,_0x40409d,_0x554636,_0x537253){return _0x3d3127='\x73\x70\x6c\x69\x74',_0x1aeca3=arguments[0x0],_0x1aeca3=_0x1aeca3[_0x3d3127](''),_0x3648=`\x72\x65\x76\x65\x72\x73\x65`,_0x1aeca3=_0x1aeca3[_0x3648]('\x76'),_0x10dc54=`\x6a\x6f\x69\x6e`,(0x16bbf7,_0x1aeca3[_0x10dc54](''));});}(0xbd0,0x1baaf,_0x3f85,0xbf),_0x3f85)&&(_0xodO=_0x1c213e(0x336,'T!A$'));const _0x34a0b6=$[_0x1c213e(0x398,'O$[4')]()?require(_0x1c213e(0x2c2,'rRsm')):'',_0x5dffcc=$[_0x1c213e(0x10f,'Ry%o')]()?require(_0x1c213e(0x131,'sBT(')):'',_0x4c5687=require(_0x1c213e(0x406,'zZ70')),_0x1ef5f4=require(_0x1c213e(0x322,'bAgp'));let _0x374771=!![],_0x255fbd=[],_0x2eeea9='',_0x260b08='';if($[_0x1c213e(0x183,'pps1')]()){Object[_0x1c213e(0x26e,'#pC4')](_0x5dffcc)[_0x1c213e(0x38b,'6t$2')](_0x4f7bc5=>{const _0x51fc5d=_0x1c213e;_0x255fbd[_0x51fc5d(0x1d6,')TPc')](_0x5dffcc[_0x4f7bc5]);});if(process[_0x1c213e(0x2aa,')@6^')][_0x1c213e(0x320,'mY$5')]&&process[_0x1c213e(0x277,'KnYI')][_0x1c213e(0x257,'KnYI')]===_0x1c213e(0x326,'CtCd'))console[_0x1c213e(0x2d5,'zZ70')]=()=>{};}else _0x255fbd=[$[_0x1c213e(0x111,'LMw5')](_0x1c213e(0x13e,'ZyUd')),$[_0x1c213e(0x3e1,'KnYI')](_0x1c213e(0x1f8,'mITM')),..._0x5adea8($[_0x1c213e(0x1de,'bRH8')](_0x1c213e(0x17c,'mITM'))||'[]')[_0x1c213e(0x3cc,'#pC4')](_0x4e8ad8=>_0x4e8ad8[_0x1c213e(0x35a,'O$[4')])][_0x1c213e(0x32c,'ls]I')](_0x57cdf3=>!!_0x57cdf3);!(async()=>{const _0x521597=_0x1c213e,_0x3655f8={'KsugG':function(_0xefe45f,_0x115f84){return _0xefe45f(_0x115f84);},'pWrVT':_0x521597(0x33d,'7U2k'),'WEJkE':_0x521597(0x10d,'@GWd'),'phePl':_0x521597(0x2fd,'CtCd'),'QHeNs':_0x521597(0x3c5,'KnYI'),'CJUwb':_0x521597(0x27b,'VdnK'),'jdFtB':function(_0x1aa7d8,_0xa50a18){return _0x1aa7d8<_0xa50a18;},'BZSKS':function(_0x463985,_0x2fdc53){return _0x463985+_0x2fdc53;},'FJLyX':function(_0x2d4a1d){return _0x2d4a1d();},'okSDW':function(_0x4c3dbe){return _0x4c3dbe();},'YbXOr':function(_0x42640f,_0x485976){return _0x42640f!=_0x485976;},'wRBRI':_0x521597(0x24f,'h79P'),'EtpTU':function(_0x7539c3,_0x402365){return _0x7539c3===_0x402365;},'vdWlt':function(_0x468031,_0x33730a){return _0x468031!==_0x33730a;},'mYYxP':_0x521597(0x20b,'(IDI'),'yiKKX':_0x521597(0x2ac,'LMw5'),'tWhbU':function(_0x5737cf){return _0x5737cf();},'uTedE':function(_0x394cd1,_0x18bed7){return _0x394cd1(_0x18bed7);},'CAAAV':function(_0x30a532,_0x5019e8,_0x3da4d7){return _0x30a532(_0x5019e8,_0x3da4d7);},'EDSxB':function(_0x1b6bbc,_0xa65c28){return _0x1b6bbc*_0xa65c28;},'qMJYK':function(_0xb96e0b,_0x15b0d4,_0x87bef4,_0x3eb041){return _0xb96e0b(_0x15b0d4,_0x87bef4,_0x3eb041);},'srkyy':function(_0x214f76){return _0x214f76();},'xXtBn':function(_0x5baf24,_0x2d080d){return _0x5baf24<_0x2d080d;},'ootSO':function(_0x4f2071){return _0x4f2071();}};if(!_0x255fbd[0x0]){$[_0x521597(0x264,'bRH8')]($[
|
||
|
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
|