File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2703,6 +2703,12 @@ def extractErrorMessage(page):
27032703 retVal = candidate
27042704 break
27052705
2706+ if not retVal and wasLastResponseDBMSError ():
2707+ match = re .search (r"[^\n]*SQL[^\n:]*:[^\n]*" , page , re .IGNORECASE )
2708+
2709+ if match :
2710+ retVal = match .group (0 )
2711+
27062712 return retVal
27072713
27082714def findLocalPort (ports ):
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.2.5 "
21+ VERSION = "1.4.2.6 "
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 @@ -73,6 +73,10 @@ def htmlParser(page):
7373 handler = HTMLHandler (page )
7474 key = hash (page )
7575
76+ # generic SQL warning/error messages
77+ if re .search (r"SQL (warning|error|syntax)" , page , re .I ):
78+ handler ._markAsErrorPage ()
79+
7680 if key in kb .cache .parsedDbms :
7781 retVal = kb .cache .parsedDbms [key ]
7882 if retVal :
@@ -89,8 +93,4 @@ def htmlParser(page):
8993
9094 kb .cache .parsedDbms [key ] = handler .dbms
9195
92- # generic SQL warning/error messages
93- if re .search (r"SQL (warning|error|syntax)" , page , re .I ):
94- handler ._markAsErrorPage ()
95-
9696 return handler .dbms
You can’t perform that action at this time.
0 commit comments