Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6e46624

Browse files
committed
Fixes #4017
1 parent 9c87671 commit 6e46624

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

lib/core/common.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4360,11 +4360,16 @@ def asciifyUrl(url, forceQuote=False):
43604360
if all(char in string.printable for char in url):
43614361
return getText(url)
43624362

4363+
hostname = parts.hostname
4364+
4365+
if isinstance(hostname, six.binary_type):
4366+
hostname = getUnicode(hostname)
4367+
43634368
# idna-encode domain
43644369
try:
4365-
hostname = parts.hostname.encode("idna")
4366-
except LookupError:
4367-
hostname = parts.hostname.encode("punycode")
4370+
hostname = hostname.encode("idna")
4371+
except:
4372+
hostname = hostname.encode("punycode")
43684373

43694374
# UTF8-quote the other parts. We check each part individually if
43704375
# if needs to be quoted - that should catch some additional user

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.11.94"
21+
VERSION = "1.3.11.95"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/request/redirecthandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def _(self, length=None):
170170
threadData.lastRedirectURL = (threadData.lastRequestUID, redurl)
171171

172172
result.redcode = code
173-
result.redurl = redurl
173+
result.redurl = getUnicode(redurl)
174174
return result
175175

176176
http_error_301 = http_error_303 = http_error_307 = http_error_302

0 commit comments

Comments
 (0)