mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-14 15:14:31 +03:00
Fixes #4017
This commit is contained in:
parent
9c87671e3a
commit
6e46624fe0
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user