mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-18 04:20:35 +03:00
fix for a bug "ordinal not in range(128)" reported by bugtrace
This commit is contained in:
parent
f83dd2251b
commit
697b32554c
|
@ -1095,7 +1095,7 @@ def sanitizeAsciiString(subject):
|
||||||
if ord(subject[i]) >= 128:
|
if ord(subject[i]) >= 128:
|
||||||
index = i
|
index = i
|
||||||
break
|
break
|
||||||
if not index:
|
if index is None:
|
||||||
return subject
|
return subject
|
||||||
else:
|
else:
|
||||||
return subject[:index] + "".join(subject[i] if ord(subject[i]) < 128 else '?' for i in xrange(index, len(subject)))
|
return subject[:index] + "".join(subject[i] if ord(subject[i]) < 128 else '?' for i in xrange(index, len(subject)))
|
||||||
|
|
|
@ -279,6 +279,7 @@ class Connect:
|
||||||
socket.setdefaulttimeout(conf.timeout)
|
socket.setdefaulttimeout(conf.timeout)
|
||||||
|
|
||||||
page = sanitizeAsciiString(page)
|
page = sanitizeAsciiString(page)
|
||||||
|
page = getUnicode(page)
|
||||||
parseResponse(page, responseHeaders)
|
parseResponse(page, responseHeaders)
|
||||||
|
|
||||||
responseMsg += "[#%d] (%d %s):\n" % (requestID, code, status)
|
responseMsg += "[#%d] (%d %s):\n" % (requestID, code, status)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user