mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
paranoid cosmetics
This commit is contained in:
@@ -1541,6 +1541,7 @@ def extractErrorMessage(page):
|
|||||||
if isinstance(page, basestring):
|
if isinstance(page, basestring):
|
||||||
for regex in (r"<b>[^<]*(fatal|error|warning|exception)[^<]*</b>:?\s+(?P<result>.+?)<br\s*/?\s*>", r"<li>Error Type:<br>(?P<result>.+?)</li>"):
|
for regex in (r"<b>[^<]*(fatal|error|warning|exception)[^<]*</b>:?\s+(?P<result>.+?)<br\s*/?\s*>", r"<li>Error Type:<br>(?P<result>.+?)</li>"):
|
||||||
match = re.search(regex, page, re.DOTALL | re.IGNORECASE)
|
match = re.search(regex, page, re.DOTALL | re.IGNORECASE)
|
||||||
|
|
||||||
if match:
|
if match:
|
||||||
retVal = htmlunescape(match.group("result")).replace("<br>", "\n").strip()
|
retVal = htmlunescape(match.group("result")).replace("<br>", "\n").strip()
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -310,6 +310,7 @@ class Connect:
|
|||||||
|
|
||||||
if conf.parseErrors:
|
if conf.parseErrors:
|
||||||
msg = extractErrorMessage(page)
|
msg = extractErrorMessage(page)
|
||||||
|
|
||||||
if msg:
|
if msg:
|
||||||
logger.info("parsed error message: '%s'" % msg)
|
logger.info("parsed error message: '%s'" % msg)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user