mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
22 lines
35 KiB
JavaScript
22 lines
35 KiB
JavaScript
|
/*
|
|||
|
活动名称:账号健康检查 · 超级无线/超级会员
|
|||
|
|
|||
|
用于检测账号是否黑了,没有变量直接运行即可不适用一般活动
|
|||
|
|
|||
|
⚠ 请勿定时或频繁运行!
|
|||
|
|
|||
|
7 7 7 7 *
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('账号健康检查(超级无线/超级会员)')
|
|||
|
const jdCookie = require('./jdCookie')
|
|||
|
const common = require('./function/jdCommon')
|
|||
|
const notify = require('./function/sendJDNotify')
|
|||
|
const getToken = require('./function/getToken')
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';const IIiii11l=iIii1iiI;function iIii1iiI(_0x553d04,_0x3205f5){const _0xf03b8c=i1IIIl11();return iIii1iiI=function(_0x491b35,_0x121d3d){_0x491b35=_0x491b35-0x14c;let _0x4ff889=_0xf03b8c[_0x491b35];if(iIii1iiI['eSwiqK']===undefined){var _0x3339c6=function(_0x598876){const _0xae0ae0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x20157f='',_0x1bfae8='';for(let _0x2d478b=0x0,_0x59f2fe,_0x1e15e4,_0x74ae7f=0x0;_0x1e15e4=_0x598876['charAt'](_0x74ae7f++);~_0x1e15e4&&(_0x59f2fe=_0x2d478b%0x4?_0x59f2fe*0x40+_0x1e15e4:_0x1e15e4,_0x2d478b++%0x4)?_0x20157f+=String['fromCharCode'](0xff&_0x59f2fe>>(-0x2*_0x2d478b&0x6)):0x0){_0x1e15e4=_0xae0ae0['indexOf'](_0x1e15e4);}for(let _0x109875=0x0,_0x4a120f=_0x20157f['length'];_0x109875<_0x4a120f;_0x109875++){_0x1bfae8+='%'+('00'+_0x20157f['charCodeAt'](_0x109875)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1bfae8);};iIii1iiI['cXoMCQ']=_0x3339c6,_0x553d04=arguments,iIii1iiI['eSwiqK']=!![];}const _0x63b9b6=_0xf03b8c[0x0],_0x5556ca=_0x491b35+_0x63b9b6,_0x2db445=_0x553d04[_0x5556ca];return!_0x2db445?(_0x4ff889=iIii1iiI['cXoMCQ'](_0x4ff889),_0x553d04[_0x5556ca]=_0x4ff889):_0x4ff889=_0x2db445,_0x4ff889;},iIii1iiI(_0x553d04,_0x3205f5);}(function(iiIIii1l,iI11l1I,llIililI,l11iIli,Il1llii1,ilIii,i1ll11l){return iiIIii1l=iiIIii1l>>0x1,ilIii='hs',i1ll11l='hs',function(IiIliii,IlilIIl1,iillIlII,I11i11li,IliiiII){const l1I1ii1I=iIii1iiI;I11i11li='tfi',ilIii=I11i11li+ilIii,IliiiII='up',i1ll11l+=IliiiII,ilIii=iillIlII(ilIii),i1ll11l=iillIlII(i1ll11l),iillIlII=0x0;const lli1Il11=IiIliii();while(!![]&&--l11iIli+IlilIIl1){try{I11i11li=-parseInt(l1I1ii1I(0x219))/0x1*(parseInt(l1I1ii1I(0x1b7))/0x2)+parseInt(l1I1ii1I(0x183))/0x3+parseInt(l1I1ii1I(0x215))/0x4*(parseInt(l1I1ii1I(0x1f1))/0x5)+parseInt(l1I1ii1I(0x195))/0x6+parseInt(l1I1ii1I(0x23e))/0x7*(-parseInt(l1I1ii1I(0x1b4))/0x8)+-parseInt(l1I1ii1I(0x23c))/0x9+-parseInt(l1I1ii1I(0x166))/0xa*(-parseInt(l1I1ii1I(0x1d9))/0xb);}catch(iIiIl1i1){I11i11li=iillIlII;}finally{IliiiII=lli1Il11[ilIii]();if(iiIIii1l<=l11iIli)iillIlII?Il1llii1?I11i11li=IliiiII:Il1llii1=IliiiII:iillIlII=IliiiII;else{if(iillIlII==Il1llii1['replace'](/[JeDgAQWRnIkfNVGOTMyF=]/g,'')){if(I11i11li===IlilIIl1){lli1Il11['un'+ilIii](IliiiII);break;}lli1Il11[i1ll11l](IliiiII);}}}}}(llIililI,iI11l1I,function(iIIil11i,II1lI1i1,li1l11lI,l1Iilil,lIi1I1,il1iIliI,lil1IIli){return II1lI1i1='\x73\x70\x6c\x69\x74',iIIil11i=arguments[0x0],iIIil11i=iIIil11i[II1lI1i1](''),li1l11lI=`\x72\x65\x76\x65\x72\x73\x65`,iIIil11i=iIIil11i[li1l11lI]('\x76'),l1Iilil=`\x6a\x6f\x69\x6e`,(0x138deb,iIIil11i[l1Iilil](''));});}(0x184,0xe9886,i1IIIl11,0xc4),i1IIIl11)&&(version_=i1IIIl11);let cookie='',activityCookie='',originCookie='';const cookiesArr=Object[IIiii11l(0x237)](jdCookie)[IIiii11l(0x151)](I11I1i11=>jdCookie[I11I1i11])[IIiii11l(0x153)](ii1i1Il=>ii1i1Il);!cookiesArr[0x0]&&($[IIiii11l(0x240)]($[IIiii11l(0x171)],IIiii11l(0x1f0)),process[IIiii11l(0x1c2)](0x1));!(async()=>{const i11lIIiI=IIiii11l,lI1lIli={'QObUt':i11lIIiI(0x1ba),'DqmOl':function(IlIilII1,lIII1lII){return IlIilII1<lIII1lII;},'hUrRg':function(iII1iIli,lI1I1l1l){return iII1iIli===lI1I1l1l;},'bwDTH':i11lIIiI(0x14d),'Sroue':function(II1IlIli,i11II1l1){return II1IlIli+i11II1l1;},'bVCKS':function(Il1lil1I,l11I111i){return Il1lil1I(l11I111i);},'ppEFo':i11lIIiI(0x1dc),'JOHDa':function(llIl1iil){return llIl1iil();},'QHOKQ':i11lIIiI(0x241)};notify[i11lIIiI(0x244)]({'title':$[i11lIIiI(0x171)]}),console[i11lIIiI(0x1c8)](lI1lIli[i11lIIiI(0x160)]);for(let iI1iiiI=0x0;lI1lIli[i11lIIiI(0x19b)](iI1iiiI,cookiesArr[i11lIIiI(0x185)]);iI1iiiI++){if(lI1lIli[i11lIIiI(0x1de)](lI1lIli[i11lIIiI(0x1b6)],lI1lIli[i11lIIiI(0x1b6)])){$[i11lIIiI(0x25c)]=lI1lIli[i11lIIiI(0x18f)](iI1iiiI,0x1),cookie=cookiesArr[iI1iiiI],originCookie=cookiesArr[iI1iiiI],$[i11lIIiI(0x25a)]=lI1lIli[i11lIIiI(0x1a4)](decodeURIComponent,common[i11lIIiI(0x17f)](cookie,lI1lIli[i11lIIiI(0x150)])),$['UA']=common[i11lIIiI(0x190)]($[i11lIIiI(0x25a)]),$[i11lIIiI(0x243)]=notify[i11lIIiI(0x1a6)]($[i11lIIiI(0x25c)],$[i11lIIiI(0x25a)]),$[i11lIIiI(0x1ac)
|
|||
|
|
|||
|
// 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
|