mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
6 lines
47 KiB
JavaScript
6 lines
47 KiB
JavaScript
|
/*
|
||
|
7 7 7 7 * jd_fanfanka.js
|
||
|
*/
|
||
|
const $ = new Env('翻翻卡贏豆');
|
||
|
var _0xodk='jsjiami.com.v7';const _0x39ab98=_0x16cb;if(function(_0x46129d,_0x11df3c,_0x19373a,_0x271963,_0xd5777c,_0x2dfed3,_0x30a4e1){return _0x46129d=_0x46129d>>0x3,_0x2dfed3='hs',_0x30a4e1='hs',function(_0x545ab7,_0xa746fd,_0x1e9da6,_0x2edbbe,_0x10a6ee){const _0x15c392=_0x16cb;_0x2edbbe='tfi',_0x2dfed3=_0x2edbbe+_0x2dfed3,_0x10a6ee='up',_0x30a4e1+=_0x10a6ee,_0x2dfed3=_0x1e9da6(_0x2dfed3),_0x30a4e1=_0x1e9da6(_0x30a4e1),_0x1e9da6=0x0;const _0xa50c86=_0x545ab7();while(!![]&&--_0x271963+_0xa746fd){try{_0x2edbbe=parseInt(_0x15c392(0x2b3,'2Cps'))/0x1*(parseInt(_0x15c392(0x341,'trt6'))/0x2)+-parseInt(_0x15c392(0x1c2,'^)Gq'))/0x3+parseInt(_0x15c392(0x31a,'@tko'))/0x4+-parseInt(_0x15c392(0x1f5,']tRa'))/0x5*(-parseInt(_0x15c392(0x356,'8sY]'))/0x6)+parseInt(_0x15c392(0x2c8,'aR7g'))/0x7*(parseInt(_0x15c392(0x348,'Gr$Y'))/0x8)+parseInt(_0x15c392(0x30d,'NiX1'))/0x9+-parseInt(_0x15c392(0x2d3,'eyq1'))/0xa;}catch(_0x44f282){_0x2edbbe=_0x1e9da6;}finally{_0x10a6ee=_0xa50c86[_0x2dfed3]();if(_0x46129d<=_0x271963)_0x1e9da6?_0xd5777c?_0x2edbbe=_0x10a6ee:_0xd5777c=_0x10a6ee:_0x1e9da6=_0x10a6ee;else{if(_0x1e9da6==_0xd5777c['replace'](/[eTWCdLhRQqJxKNHVFOyIY=]/g,'')){if(_0x2edbbe===_0xa746fd){_0xa50c86['un'+_0x2dfed3](_0x10a6ee);break;}_0xa50c86[_0x30a4e1](_0x10a6ee);}}}}}(_0x19373a,_0x11df3c,function(_0xd0f612,_0x4a18f5,_0x806f1f,_0x52fd01,_0x460120,_0x24b55e,_0x1890e5){return _0x4a18f5='\x73\x70\x6c\x69\x74',_0xd0f612=arguments[0x0],_0xd0f612=_0xd0f612[_0x4a18f5](''),_0x806f1f=`\x72\x65\x76\x65\x72\x73\x65`,_0xd0f612=_0xd0f612[_0x806f1f]('\x76'),_0x52fd01=`\x6a\x6f\x69\x6e`,(0x152a74,_0xd0f612[_0x52fd01](''));});}(0x640,0x5a8b5,_0x7c8d,0xca),_0x7c8d){}const _0x2f32fd=$[_0x39ab98(0x28f,'lM!Z')]()?require(_0x39ab98(0x1eb,'MZJ1')):'',_0x465bda=$[_0x39ab98(0x226,'z4YZ')]()?require(_0x39ab98(0x190,'XF9g')):'',_0x246185=require(_0x39ab98(0x2de,'wLe]'));let _0x1cccbe=!![],_0x497823=[],_0x4ef24d='',_0x1ab8a8='';if($[_0x39ab98(0x273,'%Qld')]()){Object[_0x39ab98(0x2d2,'A$Kv')](_0x465bda)[_0x39ab98(0x1fb,'A$Kv')](_0x7a1896=>{const _0x5aa795=_0x39ab98;_0x497823[_0x5aa795(0x272,'wLe]')](_0x465bda[_0x7a1896]);});if(process[_0x39ab98(0x210,'j$%y')][_0x39ab98(0x183,'A$Kv')]&&process[_0x39ab98(0x302,'kMV*')][_0x39ab98(0x32b,'kMV*')]===_0x39ab98(0x339,'PEd8'))console[_0x39ab98(0x326,'XkAc')]=()=>{};}else _0x497823=[$[_0x39ab98(0x212,'@tko')](_0x39ab98(0x283,'NPM@')),$[_0x39ab98(0x1b2,'aR7g')](_0x39ab98(0x234,'[Cyy')),..._0x3f0939($[_0x39ab98(0x212,'@tko')](_0x39ab98(0x358,'8sY]'))||'[]')[_0x39ab98(0x2c4,'pr^h')](_0x3fdb6a=>_0x3fdb6a[_0x39ab98(0x33c,'9ozh')])][_0x39ab98(0x27b,'DJkO')](_0x2bf133=>!!_0x2bf133);!(async()=>{const _0x3ea24d=_0x39ab98,_0x16bebf={'qHVEq':function(_0x24348b,_0x55574e){return _0x24348b!==_0x55574e;},'tthGw':_0x3ea24d(0x28d,'RE7O'),'Rxqud':_0x3ea24d(0x241,'qzf]'),'uOeGh':_0x3ea24d(0x1fa,'A$Kv'),'IekWO':function(_0x3f9ef0,_0x3dcd87){return _0x3f9ef0<_0x3dcd87;},'lOOzC':function(_0x22d773,_0x34ec3b){return _0x22d773(_0x34ec3b);},'cgHpq':function(_0x345674,_0x48ba33){return _0x345674+_0x48ba33;},'jQbUh':function(_0x4c00a9){return _0x4c00a9();},'alPgC':function(_0x3cda3b,_0x126421){return _0x3cda3b===_0x126421;},'aHJZs':_0x3ea24d(0x32a,'eqrC'),'KdCSR':_0x3ea24d(0x1ca,'NPM@'),'hgtoN':_0x3ea24d(0x344,'MOyl'),'OBMwt':function(_0x80d061,_0x1b44e8,_0x5e045e,_0x3518f7,_0x8f8fef){return _0x80d061(_0x1b44e8,_0x5e045e,_0x3518f7,_0x8f8fef);}};if(!_0x497823[0x0]){if(_0x16bebf[_0x3ea24d(0x1e0,'mJC]')](_0x16bebf[_0x3ea24d(0x1ab,'NiX1')],_0x16bebf[_0x3ea24d(0x1a3,'r#]8')]))return!![];else{$[_0x3ea24d(0x19b,'pr^h')]($[_0x3ea24d(0x2a6,'NPM@')],_0x16bebf[_0x3ea24d(0x1f8,'eyq1')],_0x16bebf[_0x3ea24d(0x336,'8sY]')],{'open-url':_0x16bebf[_0x3ea24d(0x2b4,'eUf^')]});return;}}for(let _0x5235d0=0x0;_0x16bebf[_0x3ea24d(0x254,'XF9g')](_0x5235d0,_0x497823[_0x3ea24d(0x2b2,'pr^h')]);_0x5235d0++){if(_0x497823[_0x5235d0]){_0x4ef24d=_0x497823[_0x5235d0],$[_0x3ea24d(0x18d,'RE7O')]=_0x16bebf[_0x3ea24d(0x204,'z4YZ')](decodeURIComponent,_0x4ef24d[_0x3ea24d(0x359,']tRa')](/pt_pin=([^; ]+)(?=;?)/)&&_0x4ef24d[_0x3ea24d(0x354,'Gr$Y')](/pt_pin=([^; ]+)(?=;?)/)[0x1]),$[_0x3ea24d(0
|
||
|
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
|