Considerable improvement of --parse-errors (and patch)

This commit is contained in:
Miroslav Stampar 2019-06-06 12:13:30 +02:00
parent 0e409d4479
commit 677dd20d6c
2 changed files with 5 additions and 2 deletions

View File

@ -2651,12 +2651,15 @@ def extractErrorMessage(page):
retVal = None
if isinstance(page, six.string_types):
if wasLastResponseDBMSError():
page = re.sub(r"<[^>]+>", "", page)
for regex in ERROR_PARSING_REGEXES:
match = re.search(regex, page, re.IGNORECASE)
if match:
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
break

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr
# 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_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)