KR/jd_car_sign.js

11 lines
28 KiB
JavaScript
Raw Normal View History

2023-12-26 09:42:13 +08:00
/*
车管家签到
cron "55 12 * * *" script-path=jd_car_sign.js, tag=车管家签到
*/
const $ = new Env('车管家签到')
var il='jsjiami.com.v7';const li1i1I=iii1II;function iii1II(_0x50ddcc,_0x216a08){const _0x69f7a7=Iii11l();return iii1II=function(_0x51b356,_0xe3e38c){_0x51b356=_0x51b356-0x128;let _0x142bb7=_0x69f7a7[_0x51b356];if(iii1II['TYzvfp']===undefined){var _0x588c85=function(_0x44dcc9){const _0x9a3f3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x458387='',_0x488e75='';for(let _0x4d0529=0x0,_0x58e894,_0x4ed1c9,_0x2f112e=0x0;_0x4ed1c9=_0x44dcc9['charAt'](_0x2f112e++);~_0x4ed1c9&&(_0x58e894=_0x4d0529%0x4?_0x58e894*0x40+_0x4ed1c9:_0x4ed1c9,_0x4d0529++%0x4)?_0x458387+=String['fromCharCode'](0xff&_0x58e894>>(-0x2*_0x4d0529&0x6)):0x0){_0x4ed1c9=_0x9a3f3['indexOf'](_0x4ed1c9);}for(let _0x4d6d55=0x0,_0x4de01b=_0x458387['length'];_0x4d6d55<_0x4de01b;_0x4d6d55++){_0x488e75+='%'+('00'+_0x458387['charCodeAt'](_0x4d6d55)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x488e75);};const _0x4c57ee=function(_0x381db2,_0x284b10){let _0x520a55=[],_0x48cc26=0x0,_0x31b54f,_0x472812='';_0x381db2=_0x588c85(_0x381db2);let _0x3ce687;for(_0x3ce687=0x0;_0x3ce687<0x100;_0x3ce687++){_0x520a55[_0x3ce687]=_0x3ce687;}for(_0x3ce687=0x0;_0x3ce687<0x100;_0x3ce687++){_0x48cc26=(_0x48cc26+_0x520a55[_0x3ce687]+_0x284b10['charCodeAt'](_0x3ce687%_0x284b10['length']))%0x100,_0x31b54f=_0x520a55[_0x3ce687],_0x520a55[_0x3ce687]=_0x520a55[_0x48cc26],_0x520a55[_0x48cc26]=_0x31b54f;}_0x3ce687=0x0,_0x48cc26=0x0;for(let _0xd7c546=0x0;_0xd7c546<_0x381db2['length'];_0xd7c546++){_0x3ce687=(_0x3ce687+0x1)%0x100,_0x48cc26=(_0x48cc26+_0x520a55[_0x3ce687])%0x100,_0x31b54f=_0x520a55[_0x3ce687],_0x520a55[_0x3ce687]=_0x520a55[_0x48cc26],_0x520a55[_0x48cc26]=_0x31b54f,_0x472812+=String['fromCharCode'](_0x381db2['charCodeAt'](_0xd7c546)^_0x520a55[(_0x520a55[_0x3ce687]+_0x520a55[_0x48cc26])%0x100]);}return _0x472812;};iii1II['tvqJAY']=_0x4c57ee,_0x50ddcc=arguments,iii1II['TYzvfp']=!![];}const _0x109e86=_0x69f7a7[0x0],_0x348bc4=_0x51b356+_0x109e86,_0x3b95bd=_0x50ddcc[_0x348bc4];return!_0x3b95bd?(iii1II['VkUeEB']===undefined&&(iii1II['VkUeEB']=!![]),_0x142bb7=iii1II['tvqJAY'](_0x142bb7,_0xe3e38c),_0x50ddcc[_0x348bc4]=_0x142bb7):_0x142bb7=_0x3b95bd,_0x142bb7;},iii1II(_0x50ddcc,_0x216a08);}(function(iIiIl,iiilii,li1i1i,IlIli1,illIiI,lI1lli,Ill1l){return iIiIl=iIiIl>>0x5,lI1lli='hs',Ill1l='hs',function(llI1Il,ii1iii,i11iil,Ill1i,ii1iil){const iiiliI=iii1II;Ill1i='tfi',lI1lli=Ill1i+lI1lli,ii1iil='up',Ill1l+=ii1iil,lI1lli=i11iil(lI1lli),Ill1l=i11iil(Ill1l),i11iil=0x0;const lllI1l=llI1Il();while(!![]&&--IlIli1+ii1iii){try{Ill1i=-parseInt(iiiliI(0x1cf,'SOx7'))/0x1*(-parseInt(iiiliI(0x12f,'DGef'))/0x2)+-parseInt(iiiliI(0x140,'P7Z['))/0x3+-parseInt(iiiliI(0x1ad,'HUng'))/0x4+-parseInt(iiiliI(0x148,'IdWq'))/0x5+-parseInt(iiiliI(0x1b3,'*Fis'))/0x6+-parseInt(iiiliI(0x1c0,'^[jv'))/0x7+parseInt(iiiliI(0x132,'cPz7'))/0x8*(parseInt(iiiliI(0x164,'uqg1'))/0x9);}catch(i11iii){Ill1i=i11iil;}finally{ii1iil=lllI1l[lI1lli]();if(iIiIl<=IlIli1)i11iil?illIiI?Ill1i=ii1iil:illIiI=ii1iil:i11iil=ii1iil;else{if(i11iil==illIiI['replace'](/[CEqOgtYNHyQWbwTeLSPn=]/g,'')){if(Ill1i===ii1iii){lllI1l['un'+lI1lli](ii1iil);break;}lllI1l[Ill1l](ii1iil);}}}}}(li1i1i,iiilii,function(llI1Ii,lllI1i,li1i1l,II1i1,lI1lll,iIiII,iil1lI){return lllI1i='\x73\x70\x6c\x69\x74',llI1Ii=arguments[0x0],llI1Ii=llI1Ii[lllI1i](''),li1i1l=`\x72\x65\x76\x65\x72\x73\x65`,llI1Ii=llI1Ii[li1i1l]('\x76'),II1i1=`\x6a\x6f\x69\x6e`,(0x14d595,llI1Ii[II1i1](''));});}(0x1840,0x82baf,Iii11l,0xc4),Iii11l)&&(il=0x1517);const l1llIi=$['isNode']()?require(li1i1I(0x130,'cDrM')):'',II1llI=$['isNode']()?require('./jdCookie'):'',i11I11=require(li1i1I(0x149,'gFnl')),l1llIl=require('./function/jdCommon');let ii1I1l=!![],ii1I1i=[],llI='',llliI;if($[li1i1I(0x1f2,'SOx7')]()){Object[li1i1I(0x13a,'VM($')](II1llI)[li1i1I(0x133,'v6i!')](iI1liI=>{ii1I1i['push'](II1llI[iI1liI]);});if(process['env'][li1i1I(0x128,'*Fis')]&&process[li1i1I(0x1bb,'O5Z5')][li1i1I(0x16f,']7rg')]===li1i1I(0x193,'0Jei'))console[li1i1I(0x185,'BM)U')]=()=>{};}else ii1I1i=[$[li1i1I(0x1d9,'acZu')](li1i1I(0x14c,'cPz7')),$[li1i1I(0x138,'HUng')](li1i1I(0x174,'uqg1')),.
// 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