Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d931583

Browse files
committed
Less problematic regex for MsSQL errors
1 parent 2e2c62b commit d931583

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/core/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.revision import getRevisionNumber
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.7.5"
22+
VERSION = "1.0.7.6"
2323
REVISION = getRevisionNumber()
2424
STABLE = VERSION.count('.') <= 2
2525
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")
@@ -612,7 +612,7 @@
612612
MAX_CONNECT_RETRIES = 100
613613

614614
# Strings for detecting formatting errors
615-
FORMAT_EXCEPTION_STRINGS = ("Type mismatch", "Error converting", "Conversion failed", "String or binary data would be truncated", "Failed to convert", "unable to interpret text value", "Input string was not in a correct format", "System.FormatException", "java.lang.NumberFormatException", "ValueError: invalid literal", "DataTypeMismatchException", "CF_SQL_INTEGER", "InvalidParamTypeException", "Invalid parameter type")
615+
FORMAT_EXCEPTION_STRINGS = ("Type mismatch", "Error converting", "Conversion failed", "String or binary data would be truncated", "Failed to convert", "unable to interpret text value", "Input string was not in a correct format", "System.FormatException", "java.lang.NumberFormatException", "ValueError: invalid literal", "DataTypeMismatchException", "CF_SQL_INTEGER", "InvalidParamTypeException", "Invalid parameter type", "<cfif Not IsNumeric(")
616616

617617
# Regular expression used for extracting ASP.NET view state values
618618
VIEWSTATE_REGEX = r'(?i)(?P<name>__VIEWSTATE[^"]*)[^>]+value="(?P<result>[^"]+)'

xml/errors.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<dbms value="Microsoft SQL Server">
2828
<error regexp="Driver.* SQL[\-\_\ ]*Server"/>
2929
<error regexp="OLE DB.* SQL Server"/>
30-
<error regexp="\bSQL Server.*Driver"/>
30+
<error regexp="\bSQL Server[^&lt;&quot;]+Driver"/>
3131
<error regexp="Warning.*(mssql|sqlsrv)_"/>
3232
<error regexp="\bSQL Server.*[0-9a-fA-F]{8}"/>
3333
<error regexp="(?s)Exception.*\WSystem\.Data\.SqlClient\."/>

0 commit comments

Comments
 (0)