diff --git a/Backend/fail2ban_log2json.sh b/Backend/fail2ban_log2json.sh index 2751180..c763ef2 100644 --- a/Backend/fail2ban_log2json.sh +++ b/Backend/fail2ban_log2json.sh @@ -13,7 +13,7 @@ mkdir -p "$OUTPUT_JSON_DIR" # === Processing === echo "[" > "$OUTPUT_JSON_FILE" -grep -E "Ban |Unban " "$LOGFILE" | awk -v today="$TODAY" ' +grep -E "(^|[^A-Za-z])(Ban|Unban) " "$LOGFILE" | awk -v today="$TODAY" ' { timestamp = $1 " " $2;