diff --git a/lib/controller/checks.py b/lib/controller/checks.py index 69e03c5cd..aee960b62 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -1530,7 +1530,7 @@ def checkConnection(suppressOutput=False): except socket.gaierror: errMsg = "host '%s' does not exist" % conf.hostname raise SqlmapConnectionException(errMsg) - except socket.error, ex: + except (socket.error, UnicodeError), ex: errMsg = "problem occurred while " errMsg += "resolving a host name '%s' ('%s')" % (conf.hostname, getSafeExString(ex)) raise SqlmapConnectionException(errMsg)