From 153cd326ea3a57f37bf2224f583aa2761b2178b8 Mon Sep 17 00:00:00 2001 From: Sefinek Date: Mon, 10 Mar 2025 23:44:17 +0100 Subject: [PATCH] timestampMatch --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 8994fd5..8acc37a 100644 --- a/index.js +++ b/index.js @@ -36,7 +36,7 @@ const reportToAbuseIPDb = async (logData, categories, comment) => { const processLogLine = async line => { if (!line.includes('[UFW BLOCK]')) return log(0, `Ignoring line: ${line}`); - const timestampMatch = line.match(/\[(\d+\.\d+)\]/); + const timestampMatch = line.match(/\[(\d+\.\d+)]/); const logData = { timestampOld: line.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:[+-]\d{2}:\d{2})?/)?.[0] || null, timestampNew: (timestampMatch ? parseFloat(timestampMatch[1]) : null) || null,