File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020from thirdparty import six
2121
2222# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23- VERSION = "1.10.7.102 "
23+ VERSION = "1.10.7.103 "
2424TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2525TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2626VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
Original file line number Diff line number Diff line change @@ -204,8 +204,8 @@ def getPasswordHashes(self):
204204 condition = rootQuery .inband .condition
205205
206206 if conf .user :
207- query + = " WHERE "
208- query += " OR " . join ( " %s = '%s' " % (condition , user ) for user in sorted ( users ) )
207+ userCondition = " OR " . join ( "%s = '%s'" % ( condition , user ) for user in sorted ( users ))
208+ query += " %s (%s) " % ("AND" if re . search ( r"(?i)\bWHERE\b" , query ) else "WHERE" , userCondition )
209209
210210 if Backend .isDbms (DBMS .SYBASE ):
211211 getCurrentThreadData ().disableStdOut = True
@@ -417,12 +417,12 @@ def getPrivileges(self, query2=False):
417417 condition = rootQuery .inband .condition
418418
419419 if conf .user :
420- query += " WHERE "
421-
422420 if Backend .isDbms (DBMS .MYSQL ) and kb .data .has_information_schema :
423- query + = " OR " .join ("%s LIKE '%%%s%%'" % (condition , user ) for user in sorted (users ))
421+ userCondition = " OR " .join ("%s LIKE '%%%s%%'" % (condition , user ) for user in sorted (users ))
424422 else :
425- query += " OR " .join ("%s = '%s'" % (condition , user ) for user in sorted (users ))
423+ userCondition = " OR " .join ("%s = '%s'" % (condition , user ) for user in sorted (users ))
424+
425+ query += " %s (%s)" % ("AND" if re .search (r"(?i)\bWHERE\b" , query ) else "WHERE" , userCondition )
426426
427427 values = inject .getValue (query , blind = False , time = False )
428428
You can’t perform that action at this time.
0 commit comments