tools.py doesn't depend on ipaddress's IPv4Address
tools.py explain try: except: a little further