Fix remaining AWK-UNINIT issues in bot-analyzer and network analysis
modules/security/bot-analyzer.sh: - Line 863: Initialize ip="" for rapid fire IP analysis - Line 1564: Initialize variables in bot detection awk modules/performance/network-bandwidth-analyzer.sh: - Line 237: Initialize sum=0 for bandwidth calculation modules/security/optimize-ct-limit.sh: - Line 244: Initialize s=0 for request aggregation Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -241,7 +241,7 @@ analyze_per_site_traffic() {
|
||||
if [ -n "$domain_data" ]; then
|
||||
max_conn=$(echo "$domain_data" | cut -d'|' -f3 | sort -rn | head -1)
|
||||
total_ips=$(echo "$domain_data" | cut -d'|' -f1 | sort -u | wc -l)
|
||||
total_requests=$(echo "$domain_data" | cut -d'|' -f4 | awk '{s+=$1} END {print s}')
|
||||
total_requests=$(echo "$domain_data" | cut -d'|' -f4 | awk 'BEGIN {s=0} {s+=$1} END {print s}')
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user