doublepulsar-detection-script icon indicating copy to clipboard operation
doublepulsar-detection-script copied to clipboard

Add exception handling when the --ip option is used

Open bontchev opened this issue 8 years ago • 0 comments

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) 

bontchev avatar Jun 05 '17 11:06 bontchev