File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818from thirdparty .six import unichr as _unichr
1919
2020# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21- VERSION = "1.4.1.2 "
21+ VERSION = "1.4.1.3 "
2222TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2323TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2424VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
Original file line number Diff line number Diff line change @@ -192,6 +192,15 @@ def smokeTest():
192192
193193 dirtyPatchRandom ()
194194
195+ content = open (paths .ERRORS_XML , "r" ).read ()
196+ for regex in re .findall (r'<error regexp="(.+?)"/>' , content ):
197+ try :
198+ re .compile (regex )
199+ except re .error :
200+ errMsg = "smoke test failed at compiling '%s'" % regex
201+ logger .error (errMsg )
202+ return False
203+
195204 retVal = True
196205 count , length = 0 , 0
197206
Original file line number Diff line number Diff line change @@ -57,6 +57,12 @@ def htmlParser(page):
5757 """
5858 This function calls a class that parses the input HTML page to
5959 fingerprint the back-end database management system
60+
61+ >>> from lib.core.enums import DBMS
62+ >>> htmlParser("Warning: mysql_fetch_array() expects parameter 1 to be resource") == DBMS.MYSQL
63+ True
64+ >>> threadData = getCurrentThreadData()
65+ >>> threadData.lastErrorPage = None
6066 """
6167
6268 xmlfile = paths .ERRORS_XML
You can’t perform that action at this time.
0 commit comments