mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-28 18:39:04 +00:00
Minor improvement
This commit is contained in:
@@ -81,7 +81,7 @@ def base64unpickle(value):
|
||||
|
||||
def htmlUnescape(value):
|
||||
"""
|
||||
Returns (basic conversion) HTML unescaped value
|
||||
Returns HTML unescaped value
|
||||
|
||||
>>> htmlUnescape('a<b') == 'a<b'
|
||||
True
|
||||
@@ -89,21 +89,20 @@ def htmlUnescape(value):
|
||||
True
|
||||
>>> htmlUnescape('foobar') == 'foobar'
|
||||
True
|
||||
>>> htmlUnescape('foobar') == 'foobar'
|
||||
True
|
||||
>>> htmlUnescape('©€') == htmlUnescape('©€')
|
||||
True
|
||||
"""
|
||||
|
||||
retVal = value
|
||||
|
||||
if value and isinstance(value, six.string_types):
|
||||
replacements = (("<", '<'), (">", '>'), (""", '"'), (" ", ' '), ("&", '&'), ("'", "'"))
|
||||
for code, value in replacements:
|
||||
retVal = retVal.replace(code, value)
|
||||
|
||||
try:
|
||||
retVal = re.sub(r"&#x([0-9a-fA-F]+);", lambda match: _unichr(int(match.group(1), 16)), retVal)
|
||||
except (ValueError, OverflowError):
|
||||
pass
|
||||
|
||||
return retVal
|
||||
if six.PY3:
|
||||
import html
|
||||
return html.unescape(value)
|
||||
else:
|
||||
from six.moves import html_parser
|
||||
return html_parser.HTMLParser().unescape(value)
|
||||
return value
|
||||
|
||||
def singleTimeWarnMessage(message): # Cross-referenced function
|
||||
sys.stdout.write(message)
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.9.12.20"
|
||||
VERSION = "1.9.12.21"
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user