mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
Minor bug fixes to --privileges for PostgreSQL query (corner case)
This commit is contained in:
parent
1879a49506
commit
74ef1e53c7
|
@ -389,7 +389,7 @@ class Agent:
|
|||
fieldsToCastStr = fieldsNoSelect
|
||||
|
||||
# Function
|
||||
if re.search("\A\w+\(.*\)", fieldsToCastStr, re.I) or fieldsSelectCase or fieldsSubstr:
|
||||
if re.search("\A\w+\(.*\)", fieldsToCastStr, re.I) or (fieldsSelectCase and "WHEN use" not in query) or fieldsSubstr:
|
||||
fieldsToCastList = [fieldsToCastStr]
|
||||
else:
|
||||
fieldsToCastList = fieldsToCastStr.replace(", ", ",")
|
||||
|
|
|
@ -587,7 +587,7 @@ class Enumeration:
|
|||
|
||||
for priv in privs:
|
||||
if priv.isdigit() and int(priv) == 1:
|
||||
for position, pgsqlPriv in pgsqlPrivs:
|
||||
for position, pgsqlPriv in pgsqlPrivs.items():
|
||||
if position == i:
|
||||
privileges.add(pgsqlPriv)
|
||||
|
||||
|
@ -607,7 +607,7 @@ class Enumeration:
|
|||
|
||||
for priv in privs:
|
||||
if priv.upper() == "Y":
|
||||
for position, mysqlPriv in mysqlPrivs:
|
||||
for position, mysqlPriv in mysqlPrivs.items():
|
||||
if position == i:
|
||||
privileges.add(mysqlPriv)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user