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

Skip to content

Commit b0ad102

Browse files
committed
Better fingerprint technique for Microsoft SQL Server
1 parent 79c8d63 commit b0ad102

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

doc/ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ sqlmap (0.6.4-1) stable; urgency=low
77
manipulation statements, etc from user in SQL query and SQL shell if
88
stacked queries are supported by the web application technology in
99
use;
10+
* Major speed increase in DBMS basic fingerprint;
1011
* Minor enhancement to support an option (--is-dba) to show if the
1112
current user is a database management system administrator;
1213
* Minor enhancement to support an option (--union-tech) to specify the

plugins/dbms/mssqlserver.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,13 @@ def checkDbms(self):
176176
logMsg = "testing Microsoft SQL Server"
177177
logger.info(logMsg)
178178

179-
randInt = str(randomInt(1))
180-
181-
payload = agent.fullPayload(" AND LTRIM(STR(LEN(%s)))='%s'" % (randInt, randInt))
179+
payload = agent.fullPayload(" AND LEN(@@version)=LEN(@@version)")
182180
result = Request.queryPage(payload)
183181

184182
if result == True:
183+
logMsg = "confirming Microsoft SQL Server"
184+
logger.info(logMsg)
185+
185186
for version in ( 0, 5, 8 ):
186187
payload = agent.fullPayload(" AND SUBSTRING((@@VERSION), 25, 1)='%d'" % version)
187188
result = Request.queryPage(payload)

0 commit comments

Comments
 (0)