diff --git a/lib/core/settings.py b/lib/core/settings.py index 6de7dce16..cac50d621 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.4.1.2" +VERSION = "1.4.1.3" 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) diff --git a/lib/core/testing.py b/lib/core/testing.py index 4685c6bae..295bc3ebc 100644 --- a/lib/core/testing.py +++ b/lib/core/testing.py @@ -192,6 +192,15 @@ def smokeTest(): dirtyPatchRandom() + content = open(paths.ERRORS_XML, "r").read() + for regex in re.findall(r'', content): + try: + re.compile(regex) + except re.error: + errMsg = "smoke test failed at compiling '%s'" % regex + logger.error(errMsg) + return False + retVal = True count, length = 0, 0 diff --git a/lib/parse/html.py b/lib/parse/html.py index 8af2067ce..9357ab39f 100644 --- a/lib/parse/html.py +++ b/lib/parse/html.py @@ -57,6 +57,12 @@ def htmlParser(page): """ This function calls a class that parses the input HTML page to fingerprint the back-end database management system + + >>> from lib.core.enums import DBMS + >>> htmlParser("Warning: mysql_fetch_array() expects parameter 1 to be resource") == DBMS.MYSQL + True + >>> threadData = getCurrentThreadData() + >>> threadData.lastErrorPage = None """ xmlfile = paths.ERRORS_XML