mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Minor patches
This commit is contained in:
parent
39d22d26c3
commit
3a680be4eb
11 changed files with 42 additions and 28 deletions
|
|
@ -333,7 +333,9 @@ class Entries(object):
|
|||
kb.data.dumpedTable[column] = {"length": len(column), "values": BigArray()}
|
||||
|
||||
for entry in entries:
|
||||
if entry is None or len(entry) == 0:
|
||||
# skip a missing/empty ROW container, but NOT an empty-string CELL value
|
||||
# (single-column dumps yield bare strings; len("")==0 must not drop the row)
|
||||
if entry is None or (isListLike(entry) and len(entry) == 0):
|
||||
continue
|
||||
|
||||
if isinstance(entry, six.string_types):
|
||||
|
|
|
|||
|
|
@ -135,8 +135,9 @@ class Search(object):
|
|||
query = agent.limitQuery(index, query, dbCond)
|
||||
|
||||
value = unArrayizeValue(inject.getValue(query, union=False, error=False))
|
||||
value = safeSQLIdentificatorNaming(value)
|
||||
foundDbs.append(value)
|
||||
if not isNoneValue(value): # guard (mirrors searchTable) so a failed retrieval can't push a None/garbage name
|
||||
value = safeSQLIdentificatorNaming(value)
|
||||
foundDbs.append(value)
|
||||
|
||||
conf.dumper.lister("found databases", foundDbs)
|
||||
|
||||
|
|
|
|||
|
|
@ -627,17 +627,18 @@ class Users(object):
|
|||
elif Backend.isDbms(DBMS.DB2):
|
||||
privs = privilege.split(',')
|
||||
privilege = privs[0]
|
||||
privs = privs[1]
|
||||
privs = list(privs.strip())
|
||||
i = 1
|
||||
if len(privs) > 1: # guard a comma-less privilege value (mirrors the inband path)
|
||||
privs = privs[1]
|
||||
privs = list(privs.strip())
|
||||
i = 1
|
||||
|
||||
for priv in privs:
|
||||
if priv.upper() in ('Y', 'G'):
|
||||
for position, db2Priv in DB2_PRIVS.items():
|
||||
if position == i:
|
||||
privilege += ", " + db2Priv
|
||||
for priv in privs:
|
||||
if priv.upper() in ('Y', 'G'):
|
||||
for position, db2Priv in DB2_PRIVS.items():
|
||||
if position == i:
|
||||
privilege += ", " + db2Priv
|
||||
|
||||
i += 1
|
||||
i += 1
|
||||
|
||||
privileges.add(privilege)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue