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

Skip to content

Commit 7ad49f4

Browse files
committed
Less problematic regexes for MsSQL errors
1 parent d931583 commit 7ad49f4

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
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.6"
22+
VERSION = "1.0.7.7"
2323
REVISION = getRevisionNumber()
2424
STABLE = VERSION.count('.') <= 2
2525
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

lib/parse/html.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ def startElement(self, name, attrs):
4242

4343
elif name == "error":
4444
regexp = attrs.get("regexp")
45+
if "SQL" in regexp:
46+
print regexp
4547
if regexp not in kb.cache.regex:
4648
keywords = re.findall("\w+", re.sub(r"\\.", " ", regexp))
4749
keywords = sorted(keywords, key=len)

xml/errors.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
<error regexp="OLE DB.* SQL Server"/>
3030
<error regexp="\bSQL Server[^&lt;&quot;]+Driver"/>
3131
<error regexp="Warning.*(mssql|sqlsrv)_"/>
32-
<error regexp="\bSQL Server.*[0-9a-fA-F]{8}"/>
32+
<error regexp="\bSQL Server[^&lt;&quot;]+[0-9a-fA-F]{8}"/>
3333
<error regexp="(?s)Exception.*\WSystem\.Data\.SqlClient\."/>
3434
<error regexp="(?s)Exception.*\WRoadhouse\.Cms\."/>
35-
<error regexp="Microsoft SQL Native Client.*[0-9a-fA-F]{8}"/>
35+
<error regexp="Microsoft SQL Native Client error '[0-9a-fA-F]{8}"/>
3636
<error regexp="com\.microsoft\.sqlserver\.jdbc\.SQLServerException"/>
3737
<error regexp="ODBC SQL Server Driver"/>
3838
<error regexp="SQLServer JDBC Driver"/>

0 commit comments

Comments
 (0)