Skip to content

Commit 22dc46c

Browse files
committed
Minor improvement
1 parent 9b3ed89 commit 22dc46c

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

data/txt/sha256sums.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ eed1db5da17eca4c65a8f999166e2246eef84397687ae820bbe4984ef65a09df extra/vulnserv
168168
fbba89420acafcdb9ba1a95428cf2161b13cfa2d1a7ad7d5e70c14b0e04861f0 lib/core/bigarray.py
169169
e56ab9dafa97b1bff42a04bf50ec558ecbe0703cbdcc59d22ced05f82955024d lib/core/common.py
170170
11c748cc96ea2bc507bc6c1930a17fe4bc6fdd2dd2a80430df971cb21428eb00 lib/core/compat.py
171-
243b00de18909561af2af2d73cac14491b010b5ffea94ea208bab2bc1d8035b4 lib/core/convert.py
171+
c0127b4dd18fefb2b0970b45e360b5fad43b86450f71590a00b2e18dd3f2bba4 lib/core/convert.py
172172
ae500647c4074681749735a4f3b17b7eca44868dd3f39f9cab0a575888ba04a1 lib/core/data.py
173173
ffae7cfe9f9afb92e887b9a8dbc1630d0063e865f35984ae417b04a4513e5024 lib/core/datatype.py
174174
38d30ecb10783f0ff58a255c801db8324ef2ac23516c7600a9e177b459d99750 lib/core/decorators.py
@@ -188,7 +188,7 @@ c4bfb493a03caf84dd362aec7c248097841de804b7413d0e1ecb8a90c8550bc0 lib/core/readl
188188
d1bd70c1a55858495c727fbec91e30af267459c8f64d50fabf9e4ee2c007e920 lib/core/replication.py
189189
1d0f80b0193ac5204527bfab4bde1a7aee0f693fd008e86b4b29f606d1ef94f3 lib/core/revision.py
190190
d2eb8e4b05ac93551272b3d4abfaf5b9f2d3ac92499a7704c16ed0b4f200db38 lib/core/session.py
191-
bdf38a5e9fde95faf82005bbed7187e568430a2d57f93f2f56173f4fdf0c466f lib/core/settings.py
191+
12ba306fc4c73d088aea7dbfb5345c49194246c2ebf7f0dba8e6790c3fa72ebf lib/core/settings.py
192192
1c5eab9494eb969bc9ce118a2ea6954690c6851cbe54c18373c723b99734bf09 lib/core/shell.py
193193
4eea6dcf023e41e3c64b210cb5c2efc7ca893b727f5e49d9c924f076bb224053 lib/core/subprocessng.py
194194
cdd352e1331c6b535e780f6edea79465cb55af53aa2114dcea0e8bf382e56d1a lib/core/target.py

lib/core/convert.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,29 +81,28 @@ def base64unpickle(value):
8181

8282
def htmlUnescape(value):
8383
"""
84-
Returns (basic conversion) HTML unescaped value
84+
Returns HTML unescaped value
8585
8686
>>> htmlUnescape('a&lt;b') == 'a<b'
8787
True
8888
>>> htmlUnescape('a&lt;b') == 'a<b'
8989
True
9090
>>> htmlUnescape('&#x66;&#x6f;&#x6f;&#x62;&#x61;&#x72;') == 'foobar'
9191
True
92+
>>> htmlUnescape('&#102;&#111;&#111;&#98;&#97;&#114;') == 'foobar'
93+
True
94+
>>> htmlUnescape('&copy;&euro;') == htmlUnescape('&#xA9;&#x20AC;')
95+
True
9296
"""
9397

94-
retVal = value
95-
9698
if value and isinstance(value, six.string_types):
97-
replacements = (("&lt;", '<'), ("&gt;", '>'), ("&quot;", '"'), ("&nbsp;", ' '), ("&amp;", '&'), ("&apos;", "'"))
98-
for code, value in replacements:
99-
retVal = retVal.replace(code, value)
100-
101-
try:
102-
retVal = re.sub(r"&#x([0-9a-fA-F]+);", lambda match: _unichr(int(match.group(1), 16)), retVal)
103-
except (ValueError, OverflowError):
104-
pass
105-
106-
return retVal
99+
if six.PY3:
100+
import html
101+
return html.unescape(value)
102+
else:
103+
from six.moves import html_parser
104+
return html_parser.HTMLParser().unescape(value)
105+
return value
107106

108107
def singleTimeWarnMessage(message): # Cross-referenced function
109108
sys.stdout.write(message)

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from thirdparty import six
2020

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

0 commit comments

Comments
 (0)