Skip to content

Commit 6054090

Browse files
committed
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.
1 parent a8d57bb commit 6054090

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

doc/THANKS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ Sumit Siddharth <sid@notsosecure.com>
126126
M Simkin <mlsimkin@cox.net>
127127
for suggesting a feature
128128

129+
Konrads Smelkovs <konrads@smelkovs.com>
130+
for reporting two bugs in --sql-shell and --sql-query
131+
129132
Jason Swan <jasoneswan@gmail.com>
130133
for reporting a bug when enumerating columns on Microsoft SQL Server
131134
for suggesting a couple of improvements

lib/core/common.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,11 @@ def cleanQuery(query):
498498

499499
for sqlStatements in SQL_STATEMENTS.values():
500500
for sqlStatement in sqlStatements:
501-
upperQuery = upperQuery.replace(sqlStatement, sqlStatement.upper())
501+
sqlStatementEsc = sqlStatement.replace("(", "\\(")
502+
queryMatch = re.search("(%s)" % sqlStatementEsc, query, re.I)
503+
504+
if queryMatch:
505+
upperQuery = upperQuery.replace(queryMatch.group(1), sqlStatement.upper())
502506

503507
return upperQuery
504508

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131

3232
# sqlmap version and site
33-
VERSION = "0.6.4-rc4"
33+
VERSION = "0.6.4-rc5"
3434
VERSION_STRING = "sqlmap/%s" % VERSION
3535
SITE = "http://sqlmap.sourceforge.net"
3636

0 commit comments

Comments
 (0)