diff --git a/ddos-mitigator.sh b/ddos-mitigator.sh index 7fda27e..80ade70 100755 --- a/ddos-mitigator.sh +++ b/ddos-mitigator.sh @@ -317,16 +317,22 @@ Found '${blue}${addr}${reset}' ${hilite}${count}${reset} times." echo -en "Ban [y/N/s=No, and skip remaining]? " read banaction else - echo -en "\n${red}Autopilot active.${reset} " if [[ ${country_cn} -eq 0 && ${source_apnic} -eq 0 ]] ; then if [[ $count -ge $autopilot ]] ; then + echo -en "\n${red}Autopilot active. ${reset}" banaction=y else - echo -en "${yellow}Ignoring because count ${count} is below specified limit of ${autopilot}.${reset} " - banaction=n + echo -e "\n${yellow}Autopilot active. Ignoring remaining addresses due to limit of ${autopilot}.${reset}" + return fi else - banaction=n + if [[ $count -ge $autopilot ]] ; then + echo -en "\n${green}Autopilot active. ${reset}" + banaction=n + else + echo -e "\n${green}Autopilot active.${reset} ${yellow}Ignoring remaining addresses due to limit of ${autopilot}.${reset}" + return + fi fi fi