mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
Fixes #4197
This commit is contained in:
parent
3c36b186ad
commit
a8c3d17583
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.4.5.10"
|
VERSION = "1.4.5.11"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
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)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
18
thirdparty/clientform/clientform.py
vendored
18
thirdparty/clientform/clientform.py
vendored
|
@ -237,9 +237,9 @@ def unescape(data, entities, encoding=DEFAULT_ENCODING):
|
||||||
|
|
||||||
repl = entities.get(ent)
|
repl = entities.get(ent)
|
||||||
if repl is not None:
|
if repl is not None:
|
||||||
if type(repl) != type("") and encoding is not None:
|
if hasattr(repl, "decode") and encoding is not None:
|
||||||
try:
|
try:
|
||||||
repl = repl.encode(encoding)
|
repl = repl.decode(encoding)
|
||||||
except UnicodeError:
|
except UnicodeError:
|
||||||
repl = ent
|
repl = ent
|
||||||
else:
|
else:
|
||||||
|
@ -255,15 +255,11 @@ def unescape_charref(data, encoding):
|
||||||
name, base= name[1:], 16
|
name, base= name[1:], 16
|
||||||
elif not name.isdigit():
|
elif not name.isdigit():
|
||||||
base = 16
|
base = 16
|
||||||
uc = _unichr(int(name, base))
|
|
||||||
if encoding is None:
|
try:
|
||||||
return uc
|
return _unichr(int(name, base))
|
||||||
else:
|
except:
|
||||||
try:
|
return data
|
||||||
repl = uc.encode(encoding)
|
|
||||||
except UnicodeError:
|
|
||||||
repl = "&#%s;" % data
|
|
||||||
return repl
|
|
||||||
|
|
||||||
def get_entitydefs():
|
def get_entitydefs():
|
||||||
from codecs import latin_1_decode
|
from codecs import latin_1_decode
|
||||||
|
|
Loading…
Reference in New Issue
Block a user