3939from lib .core .enums import PAYLOAD
4040from lib .core .exception import SqlmapNoneDataException
4141from lib .core .exception import SqlmapUserQuitException
42+ from lib .core .settings import CURRENT_USER
4243from lib .core .threads import getCurrentThreadData
4344from lib .request import inject
4445from lib .utils .hash import attackCachedUsersPasswords
@@ -153,7 +154,7 @@ def getPasswordHashes(self):
153154
154155 rootQuery = queries [Backend .getIdentifiedDbms ()].passwords
155156
156- if conf .user == "CU" :
157+ if conf .user == CURRENT_USER :
157158 infoMsg += " for current user"
158159 conf .user = self .getCurrentUser ()
159160
@@ -362,7 +363,7 @@ def getPrivileges(self, query2=False):
362363
363364 rootQuery = queries [Backend .getIdentifiedDbms ()].privileges
364365
365- if conf .user == "CU" :
366+ if conf .user == CURRENT_USER :
366367 infoMsg += " for current user"
367368 conf .user = self .getCurrentUser ()
368369
@@ -410,7 +411,7 @@ def getPrivileges(self, query2=False):
410411 values = inject .getValue (query , blind = False , time = False )
411412
412413 if not values and Backend .isDbms (DBMS .ORACLE ) and not query2 :
413- infoMsg = "trying with table USER_SYS_PRIVS"
414+ infoMsg = "trying with table ' USER_SYS_PRIVS' "
414415 logger .info (infoMsg )
415416
416417 return self .getPrivileges (query2 = True )
@@ -446,7 +447,7 @@ def getPrivileges(self, query2=False):
446447 # In MySQL < 5.0 we get Y if the privilege is
447448 # True, N otherwise
448449 elif Backend .isDbms (DBMS .MYSQL ) and not kb .data .has_information_schema :
449- if privilege .upper () == "Y" :
450+ if privilege .upper () == 'Y' :
450451 privileges .add (MYSQL_PRIVS [count ])
451452
452453 # In Firebird we get one letter for each privilege
@@ -465,7 +466,7 @@ def getPrivileges(self, query2=False):
465466 i = 1
466467
467468 for priv in privs :
468- if priv .upper () in ("Y" , "G" ):
469+ if priv .upper () in ('Y' , 'G' ):
469470 for position , db2Priv in DB2_PRIVS .items ():
470471 if position == i :
471472 privilege += ", " + db2Priv
@@ -525,7 +526,7 @@ def getPrivileges(self, query2=False):
525526
526527 if not isNumPosStrValue (count ):
527528 if not retrievedUsers and Backend .isDbms (DBMS .ORACLE ) and not query2 :
528- infoMsg = "trying with table USER_SYS_PRIVS"
529+ infoMsg = "trying with table ' USER_SYS_PRIVS' "
529530 logger .info (infoMsg )
530531
531532 return self .getPrivileges (query2 = True )
0 commit comments