faker3/jd_sign.js

12 lines
30 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
小豆签到
cron: 35 9 * * * jd_sign.js
*/
const $ = new Env('小豆签到')
var version_='jsjiami.com.v7';const Ill11Ili=lI11li1l;(function(iIliIiIl,IiI11i1l,iil1ii,I1ilIIli,l1lIIlll,llllillI,liIIIl11){return iIliIiIl=iIliIiIl>>0x3,llllillI='hs',liIIIl11='hs',function(lIlilIII,ilIIl1I,iII1Il,II1IIi1I,IllIIIil){const I1illil=lI11li1l;II1IIi1I='tfi',llllillI=II1IIi1I+llllillI,IllIIIil='up',liIIIl11+=IllIIIil,llllillI=iII1Il(llllillI),liIIIl11=iII1Il(liIIIl11),iII1Il=0x0;const lIII1ill=lIlilIII();while(!![]&&--I1ilIIli+ilIIl1I){try{II1IIi1I=-parseInt(I1illil(0x21a,'TfX#'))/0x1+-parseInt(I1illil(0x1dd,'Ti7e'))/0x2*(-parseInt(I1illil(0x28e,'s@Cy'))/0x3)+-parseInt(I1illil(0x25f,'RpXr'))/0x4+-parseInt(I1illil(0x1fc,'SnC%'))/0x5*(-parseInt(I1illil(0x1e8,'8a#H'))/0x6)+parseInt(I1illil(0x1fe,'7Hf3'))/0x7*(-parseInt(I1illil(0x21f,'D9dD'))/0x8)+-parseInt(I1illil(0x289,'#ZUu'))/0x9*(parseInt(I1illil(0x2a6,'7Hf3'))/0xa)+parseInt(I1illil(0x292,'s@Cy'))/0xb*(parseInt(I1illil(0x1f3,'Ti7e'))/0xc);}catch(l1lI1I){II1IIi1I=iII1Il;}finally{IllIIIil=lIII1ill[llllillI]();if(iIliIiIl<=I1ilIIli)iII1Il?l1lIIlll?II1IIi1I=IllIIIil:l1lIIlll=IllIIIil:iII1Il=IllIIIil;else{if(iII1Il==l1lIIlll['replace'](/[xNIlwQtFSfeTqCgEHBO=]/g,'')){if(II1IIi1I===ilIIl1I){lIII1ill['un'+llllillI](IllIIIil);break;}lIII1ill[liIIIl11](IllIIIil);}}}}}(iil1ii,IiI11i1l,function(lii1illi,II1ilI,i1iiIi1,II11iI1,l1i1llI,ll1Iill,Iiili1l){return II1ilI='\x73\x70\x6c\x69\x74',lii1illi=arguments[0x0],lii1illi=lii1illi[II1ilI](''),i1iiIi1=`\x72\x65\x76\x65\x72\x73\x65`,lii1illi=lii1illi[i1iiIi1]('\x76'),II11iI1=`\x6a\x6f\x69\x6e`,(0x14304c,lii1illi[II11iI1](''));});}(0x610,0x3b671,iIIlIiIl,0xc4),iIIlIiIl)&&(version_=iIIlIiIl);const ilIi1ill=require(Ill11Ili(0x213,'#ZUu')),li1ll=require('./function/sendJDNotify'),IiIil111=require(Ill11Ili(0x22a,'Zr]C')),i1IIli1l=![];let iIIlil1I='';const iI1liIli=Object[Ill11Ili(0x290,'^]VQ')](ilIi1ill)[Ill11Ili(0x223,'@^#w')](IIiIliiI=>ilIi1ill[IIiIliiI])['filter'](II1il1Il=>II1il1Il);!iI1liIli[0x0]&&($[Ill11Ili(0x2b6,'hJeS')]($[Ill11Ili(0x2bb,'#ZUu')],Ill11Ili(0x1e3,'iHbm')),process[Ill11Ili(0x20c,'s@Cy')](0x1));function iIIlIiIl(){const lii111il=(function(){return[...[version_,'TxqjlQsBjIEiOamSfi.ItcQBoemCTw.QCv7NOHFg==','ASo/khyMWOBdQSkRWQa','t8kjWRGnla','BgpcTIVdRaX/n0mT','k8olW5RcIaW','BMJcSdFcTaL2lq','cSoWW7lcMXRdUWRcVq','WQ1DD8oAlq','WPnSgXFdSq','hCoZWPRcH2FcHam','WOzTWOiZWOi','W71Ccq','F3ndWQ1IWRiq','reVdQshdKG','W7jcWPNcTmo3','lmkkca','qvdcSsVcRW','WO98cbNdQW','WPChWQqSW4ZdQblcVZhdNCohvSo6','sM3dOaRdOCkcpq','dSk5C8kgpeSXFCoP','W4yLk8kgsJJdG2fEWQTwWOTY','eSk3CJP5W4/cISo1W6RcICk8WPDhW48zW5ZcMCkmWRqeW6mZwenqWRaBW6ddP8oHWOdcG1LlDCozCmkfWROfrI3dSmknW53dICk1ArxcPK3dR8oO','k2NdLLrLW4LTcgi','cSkbWOq','hCkRESoH','t3ZdPWNdS8oFDYb+eSkwySkCv8kLW4S+huSZvMCVivTbESo0W7tcKH7dOCoMW6xdLNLPWOZdUCkkWP3dVCoUW4FcKdldLSoek3ldHCo6lCotsIxcKtSKh1BdJhz9W5WFdCoDWR/dN1xdMW','lM/dKZqWW6zjnMbqbW','vY1KW7Go','W5NdU8kGqJNdJxa9WPKA','jmoPWQZcUmoEW58D','gmkKW5/dHGK','W5vuWR/cRmoEWQ8buq','WP9HcWldUq','cCoQW7y','e8o5WOFcGgpcJri','DCoPoa','W7rNW5BdVffEnCkJ','5PEN5zol5BMh5PsR5O6V','aSoQWQRcPSov','CuRdImkLW6a','pSkHxJ7cKSk+','gCk7D8ouDb4y','fmkWW7a','fCkZW5ddTwK','oCk3sGJdMfBcHSkX','oCkeFSkxka','tSoSFSkKcf0Yrq','W6zjWO4','eNhdUCkegtRdQ2Snx8oNf8ocWPddJYddGWi','W5nIua93u8kcW5nVnJBcKCkIW5u','f3xdPmktfdJdJa','eSoxE8o4pdT15B635Ase44k35lM25lQq6lsE5y6t','bCoMWO3cLxlcHIvsW7u+WOZdSCkP','BYH+W4q5','W69SW4ldSvzEhCkJCW','cSoMW5ZdPCkT','W6/ORAhMS5NLP7hOT5CoC8oMW6m','xoISQ+AXHUwqQUw7MG8','WQxcHgRdG8kYaCowAL0','44k15O+M56AT44cf6kYm5yAs6i6r5yYfaSo6W6nnW6uY','WOvrWQq','WPPiiJRdTCksWOqppCkuW61EW5PcW6aNWQW0W4tcGWBcSe7cSmoKWQ7cK8khpxqLWOjX','WPSxyq','iSkVW4xdLrmz','DCkonG','W6vyWP8N','WQ7cRe3dVmkv','W4TxW7PX','ASoBk8kjWOpdLLKIDmkU','fmo4W6pcGZe','imoiy8oIyKSkW6/cPCoD','p8knz8o9WOtdI0aJzSkWWR0+W7NdOG','D3TaWQP6','u8owzCoaWPe'],...(function(){return[...['56+k5yI35Asv6lwP77Yu','WQrUW6L1W7y','44gC5OYe56sk44gQ6kYl5yAs6iY05y6MW4/cSSkzWPKMiG','WOrnWQq','W5WdWRtcLsW','WPtOR7dMSABPHihNVBBLJ77MLPNPLQpOR6xVVAZORQdOGQNNSkZLVRdLJR3OGOpOV5lOOiJLJ5JPPAVVVjtdGgBcGa7cINdcU0/cK3bPWO7cHLi','WOtdLXS','W48jAM/cPmktWOOCoSkqW6G','5lIf5PwZ5BwP566+','kCkrW5hdIeG','WPuqr8o0uG','wv/dMSoaxG','W7K5WPy'
// 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