mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
minor cosmetics
This commit is contained in:
@@ -1519,11 +1519,12 @@ def extractErrorMessage(page):
|
||||
|
||||
retVal = None
|
||||
|
||||
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)
|
||||
if match:
|
||||
retVal = htmlunescape(match.group("result"))
|
||||
break
|
||||
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>"):
|
||||
match = re.search(regex, page, re.DOTALL | re.IGNORECASE)
|
||||
if match:
|
||||
retVal = htmlunescape(match.group("result")).replace("<br>", "\n").strip()
|
||||
break
|
||||
|
||||
return retVal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user