Skip to content

Commit 750d57e

Browse files
committed
Fixed bug reported privately via email
1 parent 9a86365 commit 750d57e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.1.1.4"
22+
VERSION = "1.1.1.5"
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)

lib/request/basic.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,12 @@ def decodePage(page, contentEncoding, contentType):
314314
page = re.sub(r"&([^;]+);", lambda _: chr(htmlEntities[_.group(1)]) if htmlEntities.get(_.group(1), 256) < 256 else _.group(0), page)
315315

316316
kb.pageEncoding = kb.pageEncoding or checkCharEncoding(getHeuristicCharEncoding(page))
317+
318+
if kb.pageEncoding and kb.pageEncoding.lower() == "utf-8-sig":
319+
kb.pageEncoding = "utf-8"
320+
if page and page.startswith("\xef\xbb\xbf"): # Reference: https://docs.python.org/2/library/codecs.html (Note: noticed problems when "utf-8-sig" is left to Python for handling)
321+
page = page[3:]
322+
317323
page = getUnicode(page, kb.pageEncoding)
318324

319325
# e.g. &#8217;&#8230;&#8482;

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ e544108e2238d756c94a240e8a1ce061 lib/core/optiondict.py
4545
d8e9250f3775119df07e9070eddccd16 lib/core/replication.py
4646
785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py
4747
40c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py
48-
1c232d93b0109a56f3af1c02cf454455 lib/core/settings.py
48+
c0f283aee64a229f44dc3a525a7f86fa lib/core/settings.py
4949
d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py
5050
2ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py
5151
afd0636d2e93c23f4f0a5c9b6023ea17 lib/core/target.py
@@ -65,7 +65,7 @@ ad74fc58fc7214802fd27067bce18dd2 lib/core/unescaper.py
6565
0b010b7cdb2e42b5aa0caa59607279ad lib/parse/payloads.py
6666
a0444cc351cd6d29015ad16d9eb46ff4 lib/parse/sitemap.py
6767
403d873f1d2fd0c7f73d83f104e41850 lib/request/basicauthhandler.py
68-
f67a2dddbe397758dae143f97639e728 lib/request/basic.py
68+
6d04ee525e75bf0082e9f1f6d8506546 lib/request/basic.py
6969
4e89d0e13de2eb3576f5412b21e9b648 lib/request/comparison.py
7070
30d7b0df341762c5aa7aab537878ce05 lib/request/connect.py
7171
fb6b788d0016ab4ec5e5f661f0f702ad lib/request/direct.py

0 commit comments

Comments
 (0)