Nicer output formatting and early abort when the autopilot limit is reached.

This commit is contained in:
Manuel Friedli 2020-07-23 21:36:50 +02:00
parent 4ef0b60ed1
commit 771531167c

View file

@ -317,16 +317,22 @@ Found '${blue}${addr}${reset}' ${hilite}${count}${reset} times."
echo -en "Ban [y/N/s=No, and skip remaining]? " echo -en "Ban [y/N/s=No, and skip remaining]? "
read banaction read banaction
else else
echo -en "\n${red}Autopilot active.${reset} "
if [[ ${country_cn} -eq 0 && ${source_apnic} -eq 0 ]] ; then if [[ ${country_cn} -eq 0 && ${source_apnic} -eq 0 ]] ; then
if [[ $count -ge $autopilot ]] ; then if [[ $count -ge $autopilot ]] ; then
echo -en "\n${red}Autopilot active. ${reset}"
banaction=y banaction=y
else else
echo -en "${yellow}Ignoring because count ${count} is below specified limit of ${autopilot}.${reset} " echo -e "\n${yellow}Autopilot active. Ignoring remaining addresses due to limit of ${autopilot}.${reset}"
banaction=n return
fi fi
else 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
fi fi