mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-10-20 18:54:02 +00:00
Patch related to the #5700
This commit is contained in:
parent
163a5f374a
commit
9bbf70790c
3 changed files with 9 additions and 9 deletions
|
|
@ -914,12 +914,6 @@ class Connect(object):
|
|||
raise SqlmapConnectionException(warnMsg)
|
||||
|
||||
finally:
|
||||
if isinstance(page, six.binary_type):
|
||||
if HTTP_HEADER.CONTENT_TYPE in (responseHeaders or {}) and not re.search(TEXT_CONTENT_TYPE_REGEX, responseHeaders[HTTP_HEADER.CONTENT_TYPE]):
|
||||
page = six.text_type(page, errors="ignore")
|
||||
else:
|
||||
page = getUnicode(page)
|
||||
|
||||
for function in kb.postprocessFunctions:
|
||||
try:
|
||||
page, responseHeaders, code = function(page, responseHeaders, code)
|
||||
|
|
@ -928,6 +922,12 @@ class Connect(object):
|
|||
errMsg += "function '%s' ('%s')" % (function.__name__, getSafeExString(ex))
|
||||
raise SqlmapGenericException(errMsg)
|
||||
|
||||
if isinstance(page, six.binary_type):
|
||||
if HTTP_HEADER.CONTENT_TYPE in (responseHeaders or {}) and not re.search(TEXT_CONTENT_TYPE_REGEX, responseHeaders[HTTP_HEADER.CONTENT_TYPE]):
|
||||
page = six.text_type(page, errors="ignore")
|
||||
else:
|
||||
page = getUnicode(page)
|
||||
|
||||
for _ in (getattr(conn, "redcode", None), code):
|
||||
if _ is not None and _ in conf.abortCode:
|
||||
errMsg = "aborting due to detected HTTP code '%d'" % _
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue