This commit is contained in:
Miroslav Stampar 2019-11-22 15:20:45 +01:00
parent 9c87671e3a
commit 6e46624fe0
3 changed files with 10 additions and 5 deletions

View File

@ -4360,11 +4360,16 @@ def asciifyUrl(url, forceQuote=False):
if all(char in string.printable for char in url):
return getText(url)
hostname = parts.hostname
if isinstance(hostname, six.binary_type):
hostname = getUnicode(hostname)
# idna-encode domain
try:
hostname = parts.hostname.encode("idna")
except LookupError:
hostname = parts.hostname.encode("punycode")
hostname = hostname.encode("idna")
except:
hostname = hostname.encode("punycode")
# UTF8-quote the other parts. We check each part individually if
# if needs to be quoted - that should catch some additional user

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.11.94"
VERSION = "1.3.11.95"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -170,7 +170,7 @@ class SmartRedirectHandler(_urllib.request.HTTPRedirectHandler):
threadData.lastRedirectURL = (threadData.lastRequestUID, redurl)
result.redcode = code
result.redurl = redurl
result.redurl = getUnicode(redurl)
return result
http_error_301 = http_error_303 = http_error_307 = http_error_302