mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-03 22:31:34 +00:00
minor cosmetics
This commit is contained in:
parent
3640dbf745
commit
3487429eac
2 changed files with 11 additions and 16 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue