mirror of https://github.com/KingRan/KR.git
19 lines
104 KiB
JavaScript
19 lines
104 KiB
JavaScript
|
/*
|
||
|
10.28-11.12 签到瓜分京豆
|
||
|
————————————————
|
||
|
|
||
|
无助力
|
||
|
|
||
|
cron:1 1 1 1 *
|
||
|
============Quantumultx===============
|
||
|
[task_local]
|
||
|
#10.28-11.12 签到瓜分京豆
|
||
|
1 1 1 1 * jd_dlgf.js, tag=10.28-11.12 签到瓜分京豆, enabled=true
|
||
|
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('10.28-11.12 签到瓜分京豆');
|
||
|
var version_='jsjiami.com.v7';const iIil111i=illl1ll1;(function(Ii11ii1l,iliii11,IiliIlIl,iiI11Il1,IiIIIll1,llil1I1l,i11iiI1i){return Ii11ii1l=Ii11ii1l>>0x9,llil1I1l='hs',i11iiI1i='hs',function(llIllil,I1iiii1,li1I11iI,IIIil11,II111Iil){const iliil1II=illl1ll1;IIIil11='tfi',llil1I1l=IIIil11+llil1I1l,II111Iil='up',i11iiI1i+=II111Iil,llil1I1l=li1I11iI(llil1I1l),i11iiI1i=li1I11iI(i11iiI1i),li1I11iI=0x0;const iiiiIlIl=llIllil();while(!![]&&--iiI11Il1+I1iiii1){try{IIIil11=parseInt(iliil1II(0x12a,'TFrl'))/0x1+-parseInt(iliil1II(0x1b5,'ieWl'))/0x2+-parseInt(iliil1II(0x29f,'&x4h'))/0x3+parseInt(iliil1II(0x2ff,'T*22'))/0x4+-parseInt(iliil1II(0x43f,'#45s'))/0x5+parseInt(iliil1II(0x120,'La)y'))/0x6*(parseInt(iliil1II(0x3db,'T*22'))/0x7)+-parseInt(iliil1II(0x4bf,'#yhl'))/0x8*(-parseInt(iliil1II(0x160,'moTu'))/0x9);}catch(l1l11iiI){IIIil11=li1I11iI;}finally{II111Iil=iiiiIlIl[llil1I1l]();if(Ii11ii1l<=iiI11Il1)li1I11iI?IiIIIll1?IIIil11=II111Iil:IiIIIll1=II111Iil:li1I11iI=II111Iil;else{if(li1I11iI==IiIIIll1['replace'](/[bPXDFKnqeWRASNpG=]/g,'')){if(IIIil11===I1iiii1){iiiiIlIl['un'+llil1I1l](II111Iil);break;}iiiiIlIl[i11iiI1i](II111Iil);}}}}}(IiliIlIl,iliii11,function(II1i1li,I1I1llli,III1iII,IIIII1Il,IiIlIlli,lI1l1l1,lIlI1Ill){return I1I1llli='\x73\x70\x6c\x69\x74',II1i1li=arguments[0x0],II1i1li=II1i1li[I1I1llli](''),III1iII=`\x72\x65\x76\x65\x72\x73\x65`,II1i1li=II1i1li[III1iII]('\x76'),IIIII1Il=`\x6a\x6f\x69\x6e`,(0x144ea9,II1i1li[IIIII1Il](''));});}(0x19800,0x4c820,IIiIlIII,0xce),IIiIlIII)&&(version_=iIil111i(0x1cb,'eNiw'));function IIiIlIII(){const I1Iii11I=(function(){return[...[version_,'PjDRpsejbKiaFWmeiPA.ScNnoKGqmWX.Rv7RpSKq==','WR0UW4LhwHa1WPrm','5zYH5zYb5Aow5yAk5OQG5yMy77+r6lY85zIY77+3','W4XOCmkAqCoMwW','WOv6WRVcO8onW6NdUSoiW7u','WQ4mfCodWQbHW6hdLmoBWO/cUmkQWPq','WODAWQq','W5rdWQ7dK2xdQ2q','W6ZcUCk2Da','lEwsK+w4VCo4jaOsfZNdTSkcxGC','y3TQ','W4JdRCo2fCoMpMu','i8k7mSktamkxW7ldOthcSYZdKLe9dCorW7i','W4eIW5W','W7TpWRRdRu8','B1/cVq','WPRdMmo8fSoe','44gh5O2e56sZ44gz6k2i5yEy6i2e5yYsr8olWOfAdmkwWRZNMlRMJ7RKV7ZNLllcQcxdNJHCW4tNMBNKU6ZKUlZNRitLIzROJiNLJO0','5zcL6z2I55Ql5yYE6ykJ5l+S5yMs5yI9bG','hq7cTqhdHW','WROVW4TsAaCGWPbkycFdJCoyWRO','sJTkvvy','yJfowMi','W65RC8oqvx0HAmkxW45Bkq','tLNcOSkjamoiW6FdVW','W4zyW5fdWR/cHCoL','WRJdKSoYn8oUW6tcVCodW694WO7dQIbsW4e','W6ZdQSoTn8o6owVcTa','WRz+ofJcUSoZW4G','yLtcT8kngSoeW6i','nGtcJaNdOHlcL8k1q3tdNmoC','W5FcM8o0wSks','nSkDW5ldUfC','WOvCW78QdG','WO5AWQdcIa','WO/cQCkJDSkICcpdQIHFW7NcRCoAbbqMW63dNIy5WOfRW6mJW6dcHSowlmkDymocW4VcJConkZVcIHTgF8oYW7r8cSkgWPbWoSo1es0DWOG','WQa9xmol','W6n0Fq','W6yCdCkpEq','WQj1WOdcTSoW','WPpdVZlcGCoRW63cJmkb','WOLKWQNcOSoaW5ldRq','aSoQWRKlqW','W7dMJ5pLJ5hLK6RLU5hMLPxMJOJOP5xMNQBLPiNOTlvRWOu','W6enWPS/W5mBW7a','pHNdUKq','W4imW6KQvW','WPNcNhGpW6u','mbpcSbhdKG','lSkxAIfnWPJdKv4xiW','WPvSW4uokg7cGXO2WPJdVhm','WQjVWQVcLSoK','DeRcNW','nmo4ECkte8kbW4VdO2m','W4tOR7RMSPJOTztMLz/VVRhORBtMOBJMNBxNVQBNUBNPHlxORP8','w2f9WPO7','W4RdT8ogd8oT','W4KWmSk5sW','W5lcV8kLwCou','W4hcKCosW7ldIW','hmk0AIXO','WOLAh8kc','W4PFWR7dG2NdT3K','FNnQWPSqWPFcLSod','tgj8rSo/WO55W5S','W4ldVCo4nCog','sCo7WOhcRr5wWPiQWONdMxqX','BSopqN8','vg1KsSo0','hSoib8oiFIa','uHnMBMKd','WO9vWQi','vSkHbaDp','ENFcUI7dRW','W6xcSCkXzSoSW43cG8k0','W7RcVCkSySoWW47cHmo2wSk8','sCkZfWDe','eHqb','WOjybCkwWOG','WRP9W70PiW','W5nqwSkIWOu','w8k4c0lcP8kno8obcW','e8oLpSkeiIddGcdcKmo+W4/dRa','WOjKWRBcPComW48','vXDIEW','W6ukWOWPW4i7W7JdPtvEma','iSoNoCk5nq','fSogfmoS','W5PDW4LSWQC','W7D0uSkjuG','mCoidSo5AtWOBaVdPSklWPm','AbBdU1X/frddOmkdW44','W57cLmo2qSk8W5JcKmoLWPtcPG','DxtcIX7dJG','rSklirfLkCoLW4lcU8kFW4dcVa','W51XgmksWOdcPJRcPCktjZpcRCklf8knFb0SELD1vCoVimkMW5XcW4/cQg4/lCo6W6qsWQddU8kqW7xcQCkJy8oxW7O4W4RcUSoKW6vVW68LW4q','W708FL/cQ8osW4PbA14aFdfidmoxdCoivCodw8kFFSoDkfJdPSoyWPBcTsrIDmk+W7xdOSk3zNlcLmkJc8kzWRtdVZJcPCotW6ZcJmk9W57cQmk2W55NWQ3cNWPAW4FdUupdIhC','W6zOvmkrxdy','W43cHmo2wmkQW4tcPSoN','A3v5zW','hWNdL1/cSq','WR5pWQdcRgK','x8o4qhlcVa','W595tmkoCW','W4XAWRNdGxJdOuSujGNcSuOH','lgnTWO3cQW','A8kJsq','EcJdIuhdGW','xmkNnxlcSq','WRqsaeiNWOtcHWnsxxrKWPeNWPZcRCk3DhpcTSkaWORdPWVcSCk1WQeLWRRcLmkkW5a','cmo9qb7dRmoYzCkt','WRxdH8o2nW','WRtdJCo6kCoHW6dcU
|
||
|
// 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
|