faker3/jd_super_zzj.js

12 lines
36 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
超级抓抓机
cron:15 3,15 * * * jd_super_zzj.js
*/
const $ = new Env('超级抓抓机')
var il='jsjiami.com.v7';const ll1lI=iii1II;function iii1II(_0x139029,_0x2b5500){const _0x566779=Iii11l();return iii1II=function(_0x126c12,_0x2c641a){_0x126c12=_0x126c12-0x156;let _0x7f9676=_0x566779[_0x126c12];if(iii1II['ZqfRfW']===undefined){var _0x5db071=function(_0x1cd231){const _0x4494e1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x6a1ac='',_0x308a98='';for(let _0x435330=0x0,_0x281411,_0x5ed3a2,_0x3ef599=0x0;_0x5ed3a2=_0x1cd231['charAt'](_0x3ef599++);~_0x5ed3a2&&(_0x281411=_0x435330%0x4?_0x281411*0x40+_0x5ed3a2:_0x5ed3a2,_0x435330++%0x4)?_0x6a1ac+=String['fromCharCode'](0xff&_0x281411>>(-0x2*_0x435330&0x6)):0x0){_0x5ed3a2=_0x4494e1['indexOf'](_0x5ed3a2);}for(let _0x12f970=0x0,_0x2ed77d=_0x6a1ac['length'];_0x12f970<_0x2ed77d;_0x12f970++){_0x308a98+='%'+('00'+_0x6a1ac['charCodeAt'](_0x12f970)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x308a98);};const _0x364b52=function(_0x53e7ba,_0x27c12d){let _0x5800cc=[],_0x4f7f96=0x0,_0x3a65e2,_0x3658bc='';_0x53e7ba=_0x5db071(_0x53e7ba);let _0xda80e7;for(_0xda80e7=0x0;_0xda80e7<0x100;_0xda80e7++){_0x5800cc[_0xda80e7]=_0xda80e7;}for(_0xda80e7=0x0;_0xda80e7<0x100;_0xda80e7++){_0x4f7f96=(_0x4f7f96+_0x5800cc[_0xda80e7]+_0x27c12d['charCodeAt'](_0xda80e7%_0x27c12d['length']))%0x100,_0x3a65e2=_0x5800cc[_0xda80e7],_0x5800cc[_0xda80e7]=_0x5800cc[_0x4f7f96],_0x5800cc[_0x4f7f96]=_0x3a65e2;}_0xda80e7=0x0,_0x4f7f96=0x0;for(let _0x25dd6d=0x0;_0x25dd6d<_0x53e7ba['length'];_0x25dd6d++){_0xda80e7=(_0xda80e7+0x1)%0x100,_0x4f7f96=(_0x4f7f96+_0x5800cc[_0xda80e7])%0x100,_0x3a65e2=_0x5800cc[_0xda80e7],_0x5800cc[_0xda80e7]=_0x5800cc[_0x4f7f96],_0x5800cc[_0x4f7f96]=_0x3a65e2,_0x3658bc+=String['fromCharCode'](_0x53e7ba['charCodeAt'](_0x25dd6d)^_0x5800cc[(_0x5800cc[_0xda80e7]+_0x5800cc[_0x4f7f96])%0x100]);}return _0x3658bc;};iii1II['NMhouv']=_0x364b52,_0x139029=arguments,iii1II['ZqfRfW']=!![];}const _0x3965fd=_0x566779[0x0],_0x18a40a=_0x126c12+_0x3965fd,_0x1a7ed5=_0x139029[_0x18a40a];return!_0x1a7ed5?(iii1II['iULibU']===undefined&&(iii1II['iULibU']=!![]),_0x7f9676=iii1II['NMhouv'](_0x7f9676,_0x2c641a),_0x139029[_0x18a40a]=_0x7f9676):_0x7f9676=_0x1a7ed5,_0x7f9676;},iii1II(_0x139029,_0x2b5500);}(function(lilii,l1iiI,ll1li,Illl1I,lliiiI,lilil,ll1ll){return lilii=lilii>>0x2,lilil='hs',ll1ll='hs',function(Illl11,ii1lI,I1ilIl,I11iII,I1ilIi){const liliI=iii1II;I11iII='tfi',lilil=I11iII+lilil,I1ilIi='up',ll1ll+=I1ilIi,lilil=I1ilIl(lilil),ll1ll=I1ilIl(ll1ll),I1ilIl=0x0;const IiiiI=Illl11();while(!![]&&--Illl1I+ii1lI){try{I11iII=parseInt(liliI(0x199,'EiBg'))/0x1+parseInt(liliI(0x24e,'DG^w'))/0x2*(-parseInt(liliI(0x23d,'oa@X'))/0x3)+parseInt(liliI(0x1d1,'DG^w'))/0x4*(parseInt(liliI(0x208,'DgR1'))/0x5)+parseInt(liliI(0x23f,'1@b5'))/0x6*(parseInt(liliI(0x192,'IWhz'))/0x7)+-parseInt(liliI(0x1e0,'!cLz'))/0x8+-parseInt(liliI(0x1f6,'dSox'))/0x9+parseInt(liliI(0x259,'64r4'))/0xa*(-parseInt(liliI(0x1e6,']wLU'))/0xb);}catch(llIlli){I11iII=I1ilIl;}finally{I1ilIi=IiiiI[lilil]();if(lilii<=Illl1I)I1ilIl?lliiiI?I11iII=I1ilIi:lliiiI=I1ilIi:I1ilIl=I1ilIi;else{if(I1ilIl==lliiiI['replace'](/[OAkFtJMYWLlUChVeETyg=]/g,'')){if(I11iII===ii1lI){IiiiI['un'+lilil](I1ilIi);break;}IiiiI[ll1ll](I1ilIi);}}}}}(ll1li,l1iiI,function(llIlll,lliii1,Iiii1,lIIili,IiiIil,IiiIii,IIlll){return lliii1='\x73\x70\x6c\x69\x74',llIlll=arguments[0x0],llIlll=llIlll[lliii1](''),Iiii1=`\x72\x65\x76\x65\x72\x73\x65`,llIlll=llIlll[Iiii1]('\x76'),lIIili=`\x6a\x6f\x69\x6e`,(0x16b7b9,llIlll[lIIili](''));});}(0x314,0x772b2,Iii11l,0xc7),Iii11l)&&(il=0x1fc3);function Iii11l(){const I11iIi=(function(){return[...[il,'khyejAVstTjgiFJaEOUmYCiJ.kcOoLm.gvOeW7Ml==','gIZcK8oiW5qaW6bWW5tcTWvaW6S','W63dNeC','W7eCW6NcICkE','W6ZdGeC','WQ/cM8okW6KJW6XZn8o2W6iZWQ3dNJ7cOrVcQtT3','xvddNJit','W7JdV8kZqq','edFcM8ovW7eb','WPldP8oFWPS','WRtcRmoig8k4W7pcGSo+','iSoQhMWJFSoEsmopgW','z0BdKqpcJSoMWRZcOa','WPvqWP/dSCkT','wfhdNq','zeZdOCor','WQ7cT8ojnmkIW7pcGG','W55uW5xdLCoF','WOJdKSoLbSop','W5rWWQSYg8otsG','b0LTWQnupa','a8kBFmkQE8oEW45DyNa','qLdcOmownW','W7ulhmkoWRC','WQpcGComW7ytW7G','nI7cTf0qW7q','WReIWRXD','WQH0WQxdSa','W65/DmkFwG','WQq
// 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