Add exception handling when the --ip option is used
bontchev opened this issue · comments
Vesselin Bontchev commented
Both scripts barf badly if an exception occurs (e.g., a timeout) when scanning a single IP address using the --ip
option. The reason is because while the check is surrounded by proper exception handling when scanning multiple IPs via the --file
option, this exception handling is missing when scanning a single IP. Please add it; it's trivial.
if ip:
# check_ip(ip)
try:
check_ip(ip)
except Exception as e:
with print_lock:
print "[ERROR] [%s] - %s" % (ip, e)