mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 03:23:48 +03:00
gready regex bastard :)
This commit is contained in:
parent
9579a97039
commit
b2b521fc8a
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user