fix(crowdsec): Count all mitmproxy scenarios in WAF bans
Changed waf_bans_today to count all mitmproxy-* scenarios instead of only mitmproxy-waf (which doesn't exist). Now correctly counts mitmproxy-scanner, mitmproxy-botscan, etc. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f424ec72c1
commit
b02503eac4
@ -2464,8 +2464,8 @@ refresh_overview_cache() {
|
|||||||
[ -z "$sc2" ] && sc2=0
|
[ -z "$sc2" ] && sc2=0
|
||||||
scenario_count=$((sc1 + sc2))
|
scenario_count=$((sc1 + sc2))
|
||||||
|
|
||||||
# WAF bans count from decisions file
|
# WAF bans count from decisions (mitmproxy-scanner, mitmproxy-botscan, etc.)
|
||||||
waf_bans_today=$(grep -c "mitmproxy-waf" "$decisions_file" 2>/dev/null)
|
waf_bans_today=$(grep -c "mitmproxy-" "$decisions_file" 2>/dev/null)
|
||||||
[ -z "$waf_bans_today" ] && waf_bans_today=0
|
[ -z "$waf_bans_today" ] && waf_bans_today=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user