From 3c597b2fb01bebc0d51d8afa3da3de5a263efe49 Mon Sep 17 00:00:00 2001 From: hackgsl <3710pmmm@163.com> Date: Tue, 26 Oct 2021 06:15:34 +0000 Subject: [PATCH] =?UTF-8?q?update=20panel/server.js.=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- panel/server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panel/server.js b/panel/server.js index ae78fda..e2684de 100755 --- a/panel/server.js +++ b/panel/server.js @@ -467,7 +467,7 @@ app.use(express.static(path.join(__dirname, 'public'))); app.get('/', function (request, response) { let OldIPContent = getFileContentByName(logPath + 'panel.txt'); let date = new Date(); - let bakConfFile = '时间为:' + date.getFullYear() + '-' + date.getMonth() + '-' + date.getDay() + '-' + date.getHours() + '-' + date.getMinutes() + '-' + date.getMilliseconds(); + let bakConfFile = '时间为:' + date.getFullYear() + '-' + (date.getMonth()+1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds(); OldIPContent = OldIPContent + '\n' + '访问您【首页】的IP为' + getClientIP(request) + bakConfFile + '\n'; fs.writeFileSync(logPath + 'panel.txt', OldIPContent); if (request.session.loggedin) { @@ -811,7 +811,7 @@ app.post('/login', function (request, response) { //setTimeout(function() { callback(null); }, 8000); ErrorTimes = ErrorTimes + 1; let date = new Date(); - let bakConfFile = '时间为:' + date.getFullYear() + '-' + date.getMonth() + '-' + date.getDay() + '-' + date.getHours() + '-' + date.getMinutes() + '-' + date.getMilliseconds(); + let bakConfFile = '时间为:' + date.getFullYear() + '-' + (date.getMonth()+1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds(); OldIPContent = OldIPContent + '\n' + '【输入密码错误】,访问IP为' + getClientIP(request) + bakConfFile + '\n'; if (ErrorTimes > 29) { OldIPContent = OldIPContent + '面板检测到有暴力破解的行为,已关闭登入系统' + '\n'; -- Gitee