mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Fixes #4727
This commit is contained in:
parent
69c679cf06
commit
1f3a1410f2
2 changed files with 5 additions and 3 deletions
|
|
@ -10,7 +10,9 @@ import re
|
|||
import string
|
||||
import sys
|
||||
|
||||
if sys.version_info >= (3, 0):
|
||||
PY3 = sys.version_info >= (3, 0)
|
||||
|
||||
if PY3:
|
||||
xrange = range
|
||||
text_type = str
|
||||
string_types = (str,)
|
||||
|
|
@ -92,7 +94,7 @@ def safechardecode(value, binary=False):
|
|||
|
||||
if binary:
|
||||
if isinstance(retVal, text_type):
|
||||
retVal = retVal.encode("utf8")
|
||||
retVal = retVal.encode("utf8", errors="surrogatepass" if PY3 else "strict")
|
||||
|
||||
elif isinstance(value, (list, tuple)):
|
||||
for i in xrange(len(value)):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue