This commit is contained in:
Sefinek 2024-11-19 04:44:53 +01:00
parent 7128e99d23
commit 2a2629cd3a

View file

@ -172,7 +172,7 @@ determine_categories() {
process_log_line() { process_log_line() {
local line="$1" local line="$1"
if [[ "$line" == *"[UFW BLOCK]"* ]]; then if [[ "$line" == *"[UFW BLOCK]"* ]]; then
local timestamp src_ip proto spt dpt ttl len tos categories warsaw_time local timestamp src_ip proto spt dpt ttl len tos categories
timestamp=$(echo "$line" | awk '{print $1, $2, $3}') timestamp=$(echo "$line" | awk '{print $1, $2, $3}')
[[ -z "$timestamp" ]] && timestamp=$(date '+%Y-%m-%d %H:%M:%S') [[ -z "$timestamp" ]] && timestamp=$(date '+%Y-%m-%d %H:%M:%S')