diff --git a/modules/security/bot-analyzer.sh b/modules/security/bot-analyzer.sh index de0bac8..448ac5d 100755 --- a/modules/security/bot-analyzer.sh +++ b/modules/security/bot-analyzer.sh @@ -2352,6 +2352,7 @@ generate_report() { echo "" echo "Bot Traffic Timeline (hourly):" max_bot_traffic=$(awk '{print $1}' "$TEMP_DIR/hourly_bot_traffic.txt" | sort -rn | head -1) + max_bot_traffic=${max_bot_traffic:-1} # Prevent division by zero while read -r line; do count=$(echo "$line" | awk '{print $1}') hour=$(echo "$line" | awk '{print $2}')