mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 21:24:13 +03:00
Considerable improvement of --parse-errors (and patch)
This commit is contained in:
parent
0e409d4479
commit
677dd20d6c
|
@ -2651,12 +2651,15 @@ def extractErrorMessage(page):
|
||||||
retVal = None
|
retVal = None
|
||||||
|
|
||||||
if isinstance(page, six.string_types):
|
if isinstance(page, six.string_types):
|
||||||
|
if wasLastResponseDBMSError():
|
||||||
|
page = re.sub(r"<[^>]+>", "", page)
|
||||||
|
|
||||||
for regex in ERROR_PARSING_REGEXES:
|
for regex in ERROR_PARSING_REGEXES:
|
||||||
match = re.search(regex, page, re.IGNORECASE)
|
match = re.search(regex, page, re.IGNORECASE)
|
||||||
|
|
||||||
if match:
|
if match:
|
||||||
candidate = htmlUnescape(match.group("result")).replace("<br>", "\n").strip()
|
candidate = htmlUnescape(match.group("result")).replace("<br>", "\n").strip()
|
||||||
if re.search(r"\b([a-z]+ ){5}", candidate) is None: # check for legitimate (e.g. Warning:...) text
|
if re.search(r"\b([a-z]+ ){5}", candidate) is not None: # check for legitimate (e.g. Warning:...) text
|
||||||
retVal = candidate
|
retVal = candidate
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.3.6.22"
|
VERSION = "1.3.6.23"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user