mirror of https://github.com/KingRan/KR.git
16 lines
29 KiB
JavaScript
16 lines
29 KiB
JavaScript
|
/*
|
||
|
粉丝福利videofangrowth
|
||
|
|
||
|
看到线板直接运行即可
|
||
|
|
||
|
cron:1 1 1 1 *
|
||
|
============Quantumultx===============
|
||
|
[task_local]
|
||
|
#粉丝福利红包fansvideo
|
||
|
1 1 1 1 * jd_fans_videofangrowth.js, tag=粉丝福利videofangrowth, enabled=true
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('粉丝福利videofangrowth');
|
||
|
var version_='jsjiami.com.v7';const _0x1e7949=_0x4b35;(function(_0x2e5d60,_0x4570cc,_0x266d49,_0x23df14,_0x58389b,_0x2fc223,_0x4713e5){return _0x2e5d60=_0x2e5d60>>0x5,_0x2fc223='hs',_0x4713e5='hs',function(_0x500cb4,_0x8b89e7,_0x2a8b57,_0x464245,_0x340d62){const _0x9c5d1a=_0x4b35;_0x464245='tfi',_0x2fc223=_0x464245+_0x2fc223,_0x340d62='up',_0x4713e5+=_0x340d62,_0x2fc223=_0x2a8b57(_0x2fc223),_0x4713e5=_0x2a8b57(_0x4713e5),_0x2a8b57=0x0;const _0x51af55=_0x500cb4();while(!![]&&--_0x23df14+_0x8b89e7){try{_0x464245=-parseInt(_0x9c5d1a(0x179,'TpkP'))/0x1+-parseInt(_0x9c5d1a(0x17a,'iFEQ'))/0x2*(-parseInt(_0x9c5d1a(0x1a9,'%lVI'))/0x3)+parseInt(_0x9c5d1a(0x1f1,'Uy$E'))/0x4+-parseInt(_0x9c5d1a(0x1d8,'N2O#'))/0x5+-parseInt(_0x9c5d1a(0x163,'L09H'))/0x6+-parseInt(_0x9c5d1a(0x1d0,'iFEQ'))/0x7*(parseInt(_0x9c5d1a(0x173,'T&(u'))/0x8)+-parseInt(_0x9c5d1a(0x150,'Kt2g'))/0x9*(-parseInt(_0x9c5d1a(0x169,'IMvr'))/0xa);}catch(_0x5f3246){_0x464245=_0x2a8b57;}finally{_0x340d62=_0x51af55[_0x2fc223]();if(_0x2e5d60<=_0x23df14)_0x2a8b57?_0x58389b?_0x464245=_0x340d62:_0x58389b=_0x340d62:_0x2a8b57=_0x340d62;else{if(_0x2a8b57==_0x58389b['replace'](/[GuPtgBeFyQfHpqOnDIxJ=]/g,'')){if(_0x464245===_0x8b89e7){_0x51af55['un'+_0x2fc223](_0x340d62);break;}_0x51af55[_0x4713e5](_0x340d62);}}}}}(_0x266d49,_0x4570cc,function(_0x3ac2cd,_0x3cf063,_0x3f36ce,_0x162068,_0x30a1cb,_0x1d9ace,_0x1b85c3){return _0x3cf063='\x73\x70\x6c\x69\x74',_0x3ac2cd=arguments[0x0],_0x3ac2cd=_0x3ac2cd[_0x3cf063](''),_0x3f36ce='\x72\x65\x76\x65\x72\x73\x65',_0x3ac2cd=_0x3ac2cd[_0x3f36ce]('\x76'),_0x162068='\x6a\x6f\x69\x6e',(0x139f9e,_0x3ac2cd[_0x162068](''));});}(0x1940,0x68230,_0xebb4,0xcc),_0xebb4)&&(version_=_0xebb4);const _0x4c6d97=$['isNode']()?require(_0x1e7949(0x160,'B4Gn')):'',_0x203bc0=$[_0x1e7949(0x190,'YQf[')]()?require(_0x1e7949(0x1da,'Mb5F')):'';CryptoJS=$[_0x1e7949(0x161,'9[ln')]()?require('crypto-js'):CryptoJS;let _0x1637bc=[],_0x2e00b4='';if($[_0x1e7949(0x14f,'IMvr')]()){Object[_0x1e7949(0x1de,'Kt2g')](_0x203bc0)[_0x1e7949(0x1ac,'awMP')](_0x4f4f18=>{const _0x506219=_0x1e7949;_0x1637bc[_0x506219(0x1c2,'5Wll')](_0x203bc0[_0x4f4f18]);});if(process['env'][_0x1e7949(0x152,'B4Gn')]&&process[_0x1e7949(0x1b4,'T&(u')][_0x1e7949(0x149,'ZNjx')]==='false')console[_0x1e7949(0x182,'5Wll')]=()=>{};}else _0x1637bc=[$[_0x1e7949(0x185,'&ENt')](_0x1e7949(0x17f,'5Wll')),$[_0x1e7949(0x158,'L09H')](_0x1e7949(0x1a7,'$Kh4')),..._0x1cd87d($[_0x1e7949(0x1b5,'IMvr')](_0x1e7949(0x1ee,'[&5d'))||'[]')['map'](_0x4acd67=>_0x4acd67[_0x1e7949(0x171,'&ENt')])][_0x1e7949(0x178,'vRIT')](_0x12cb50=>!!_0x12cb50);let _0x233563=_0x1e7949(0x1cb,'0MGT'),_0x25879d=Date['now'](),_0x41fbf8='';!(async()=>{const _0x49b6f8=_0x1e7949,_0x51bcb4={'mCfdu':'请勿随意在BoxJs输入框修改内容\x0a建议通过脚本去获取cookie','gMKDB':_0x49b6f8(0x1c0,'IMvr'),'irhNa':'CookieJD2','fquEZ':function(_0x48ab50,_0x51ecfb){return _0x48ab50(_0x51ecfb);},'ndCyh':_0x49b6f8(0x15d,'7VzP'),'gxfFg':_0x49b6f8(0x1e5,'IMvr'),'xtkdP':_0x49b6f8(0x1ef,'ZNjx'),'VAuHO':function(_0x2293f0,_0x5c238c){return _0x2293f0<_0x5c238c;},'NQFAt':function(_0x1d2959,_0xaa62fb){return _0x1d2959!==_0xaa62fb;},'PXhOp':_0x49b6f8(0x1bc,'4Pdh'),'zFMZS':function(_0xa4e398,_0xc50a7c){return _0xa4e398+_0xc50a7c;},'OPxnQ':_0x49b6f8(0x162,'99rd')};if(!_0x1637bc[0x0]){$[_0x49b6f8(0x15f,'%lVI')]($['name'],_0x49b6f8(0x1e7,'WGTl'),_0x51bcb4[_0x49b6f8(0x1bb,'J&tM')],{'open-url':_0x49b6f8(0x191,'GYdl')});return;}console['log'](_0x51bcb4[_0x49b6f8(0x1f5,'L09H')]);for(let _0x390e24=0x0;_0x51bcb4['VAuHO'](_0x390e24,_0x1637bc[_0x49b6f8(0x1e4,'5Wll')]);_0x390e24++){if(_0x1637bc[_0x390e24]){if(_0x51bcb4['NQFAt'](_0x51bcb4['PXhOp'],_0x51bcb4[_0x49b6f8(0x1c1,'YQf[')]))try{return _0xcb5619['parse'](_0x115624);}catch(_0x3de1bc){return _0x16c444[_0x49b6f8(0x187,'4Pdh')](_0x3de1bc),_0x443dfb[_0x49b6f8(0x146,'QEpR')](_0x583c92[_0x49b6f8(0x189,'iFEQ')],'',_0x51bcb4[_0x49b6f8(0x1b2,'73Z7')]),[];}else{_0x2e00b4=_0x1637bc[_0x390e24],$['UserName']=_0x51bcb4['fquEZ'](decodeURIComponent,_0x2e00b4[_0x49b6f8(0x1e6,'Wd0O')](/pt_pin=([^; ]+)(?=;?)/)&&_0x2e00b4[_0x49b6f8(0x1ce,'99rd')](/pt_p
|
||
|
// 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
|