mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Trivial update
This commit is contained in:
@@ -161,7 +161,7 @@ class Users:
|
||||
conf.user = conf.user.upper()
|
||||
|
||||
if conf.user:
|
||||
users = conf.user.split(",")
|
||||
users = conf.user.split(',')
|
||||
|
||||
if Backend.isDbms(DBMS.MYSQL):
|
||||
for user in users:
|
||||
@@ -429,7 +429,7 @@ class Users:
|
||||
# In DB2 we get Y or G if the privilege is
|
||||
# True, N otherwise
|
||||
elif Backend.isDbms(DBMS.DB2):
|
||||
privs = privilege.split(",")
|
||||
privs = privilege.split(',')
|
||||
privilege = privs[0]
|
||||
if len(privs) > 1:
|
||||
privs = privs[1]
|
||||
@@ -537,8 +537,8 @@ class Users:
|
||||
# In PostgreSQL we get 1 if the privilege is True,
|
||||
# 0 otherwise
|
||||
if Backend.isDbms(DBMS.PGSQL) and ", " in privilege:
|
||||
privilege = privilege.replace(", ", ",")
|
||||
privs = privilege.split(",")
|
||||
privilege = privilege.replace(", ", ',')
|
||||
privs = privilege.split(',')
|
||||
i = 1
|
||||
|
||||
for priv in privs:
|
||||
@@ -557,12 +557,12 @@ class Users:
|
||||
# In MySQL < 5.0 we get Y if the privilege is
|
||||
# True, N otherwise
|
||||
elif Backend.isDbms(DBMS.MYSQL) and not kb.data.has_information_schema:
|
||||
privilege = privilege.replace(", ", ",")
|
||||
privs = privilege.split(",")
|
||||
privilege = privilege.replace(", ", ',')
|
||||
privs = privilege.split(',')
|
||||
i = 1
|
||||
|
||||
for priv in privs:
|
||||
if priv.upper() == "Y":
|
||||
if priv.upper() == 'Y':
|
||||
for position, mysqlPriv in MYSQL_PRIVS.items():
|
||||
if position == i:
|
||||
privileges.add(mysqlPriv)
|
||||
@@ -580,14 +580,14 @@ class Users:
|
||||
# In DB2 we get Y or G if the privilege is
|
||||
# True, N otherwise
|
||||
elif Backend.isDbms(DBMS.DB2):
|
||||
privs = privilege.split(",")
|
||||
privs = privilege.split(',')
|
||||
privilege = privs[0]
|
||||
privs = privs[1]
|
||||
privs = list(privs.strip())
|
||||
i = 1
|
||||
|
||||
for priv in privs:
|
||||
if priv.upper() in ("Y", "G"):
|
||||
if priv.upper() in ('Y', 'G'):
|
||||
for position, db2Priv in DB2_PRIVS.items():
|
||||
if position == i:
|
||||
privilege += ", " + db2Priv
|
||||
|
||||
Reference in New Issue
Block a user