sqlmap 0.6-rc5: major bug fix to make --sql-shell and --sql-query work properly also with mixed case statements (i.e oRDeR bY). Thanks Konrads Smelkovs to notifying.

This commit is contained in:
Bernardo Damele 2009-01-28 14:53:11 +00:00
parent a8d57bb031
commit 6054090191
3 changed files with 9 additions and 2 deletions

View File

@ -126,6 +126,9 @@ Sumit Siddharth <sid@notsosecure.com>
M Simkin <mlsimkin@cox.net> M Simkin <mlsimkin@cox.net>
for suggesting a feature for suggesting a feature
Konrads Smelkovs <konrads@smelkovs.com>
for reporting two bugs in --sql-shell and --sql-query
Jason Swan <jasoneswan@gmail.com> Jason Swan <jasoneswan@gmail.com>
for reporting a bug when enumerating columns on Microsoft SQL Server for reporting a bug when enumerating columns on Microsoft SQL Server
for suggesting a couple of improvements for suggesting a couple of improvements

View File

@ -498,7 +498,11 @@ def cleanQuery(query):
for sqlStatements in SQL_STATEMENTS.values(): for sqlStatements in SQL_STATEMENTS.values():
for sqlStatement in sqlStatements: for sqlStatement in sqlStatements:
upperQuery = upperQuery.replace(sqlStatement, sqlStatement.upper()) sqlStatementEsc = sqlStatement.replace("(", "\\(")
queryMatch = re.search("(%s)" % sqlStatementEsc, query, re.I)
if queryMatch:
upperQuery = upperQuery.replace(queryMatch.group(1), sqlStatement.upper())
return upperQuery return upperQuery

View File

@ -30,7 +30,7 @@ import sys
# sqlmap version and site # sqlmap version and site
VERSION = "0.6.4-rc4" VERSION = "0.6.4-rc5"
VERSION_STRING = "sqlmap/%s" % VERSION VERSION_STRING = "sqlmap/%s" % VERSION
SITE = "http://sqlmap.sourceforge.net" SITE = "http://sqlmap.sourceforge.net"