mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-29 10:59:03 +00:00
update regarding error parsing (and reporting)
This commit is contained in:
@@ -11,7 +11,7 @@ import re
|
||||
|
||||
from difflib import SequenceMatcher
|
||||
|
||||
from lib.core.common import wasLastRequestError
|
||||
from lib.core.common import wasLastRequestDBMSError
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
@@ -54,7 +54,7 @@ def comparison(page, headers=None, getSeqMatcher=False, pageLength=None):
|
||||
return re.search(conf.regexp, page, re.I | re.M) is not None
|
||||
|
||||
# In case of an DBMS error page return None
|
||||
if wasLastRequestError():
|
||||
if wasLastRequestDBMSError():
|
||||
return None
|
||||
|
||||
# Dynamic content lines to be excluded before comparison
|
||||
|
||||
@@ -17,10 +17,11 @@ import traceback
|
||||
|
||||
from lib.contrib import multipartpost
|
||||
from lib.core.agent import agent
|
||||
from lib.core.common import readInput
|
||||
from lib.core.common import extractErrorMessage
|
||||
from lib.core.common import getFilteredPageContent
|
||||
from lib.core.common import getUnicode
|
||||
from lib.core.common import logHTTPTraffic
|
||||
from lib.core.common import readInput
|
||||
from lib.core.convert import urlencode
|
||||
from lib.core.common import urlEncodeCookieValues
|
||||
from lib.core.data import conf
|
||||
@@ -219,6 +220,10 @@ class Connect:
|
||||
responseHeaders = conn.info()
|
||||
page = decodePage(page, responseHeaders.get("Content-Encoding"), responseHeaders.get("Content-Type"))
|
||||
|
||||
msg = extractErrorMessage(page)
|
||||
if msg and conf.parseErrors:
|
||||
logger.error("error message: '%s'" % msg)
|
||||
|
||||
except urllib2.HTTPError, e:
|
||||
code = e.code
|
||||
status = e.msg
|
||||
|
||||
Reference in New Issue
Block a user