Skip to content

Add exception handling when the --ip option is used #22

@bontchev

Description

@bontchev

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) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions