mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
gready regex bastard :)
This commit is contained in:
@@ -1539,7 +1539,7 @@ def extractErrorMessage(page):
|
|||||||
retVal = None
|
retVal = None
|
||||||
|
|
||||||
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()
|
||||||
|
|||||||
Reference in New Issue
Block a user