mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Minor patches and updates
This commit is contained in:
parent
eec048daf8
commit
422b1a6f95
9 changed files with 106 additions and 45 deletions
|
|
@ -5,6 +5,7 @@ Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
|
|||
See the file 'LICENSE' for copying permission
|
||||
"""
|
||||
|
||||
from lib.core.common import isListLike
|
||||
from lib.core.common import readInput
|
||||
from lib.core.common import safeSQLIdentificatorNaming
|
||||
from lib.core.common import unsafeSQLIdentificatorNaming
|
||||
|
|
@ -48,7 +49,7 @@ class Enumeration(GenericEnumeration):
|
|||
retVal = pivotDumpTable("(%s) AS %s" % (query, kb.aliasName), ['%s.schemaname' % kb.aliasName], blind=True)
|
||||
|
||||
if retVal:
|
||||
kb.data.cachedDbs = retVal[0].values()[0]
|
||||
kb.data.cachedDbs = list(retVal[0].values())[0]
|
||||
|
||||
if kb.data.cachedDbs:
|
||||
kb.data.cachedDbs.sort()
|
||||
|
|
@ -83,7 +84,7 @@ class Enumeration(GenericEnumeration):
|
|||
retVal = pivotDumpTable("(%s) AS %s" % (query, kb.aliasName), ['%s.tablename' % kb.aliasName], blind=True)
|
||||
|
||||
if retVal:
|
||||
for table in retVal[0].values()[0]:
|
||||
for table in list(retVal[0].values())[0]:
|
||||
if db not in kb.data.cachedTables:
|
||||
kb.data.cachedTables[db] = [table]
|
||||
else:
|
||||
|
|
@ -131,9 +132,9 @@ class Enumeration(GenericEnumeration):
|
|||
self.getTables()
|
||||
|
||||
if len(kb.data.cachedTables) > 0:
|
||||
tblList = kb.data.cachedTables.values()
|
||||
tblList = list(kb.data.cachedTables.values())
|
||||
|
||||
if isinstance(tblList[0], (set, tuple, list)):
|
||||
if isListLike(tblList[0]):
|
||||
tblList = tblList[0]
|
||||
else:
|
||||
errMsg = "unable to retrieve the tables "
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ See the file 'LICENSE' for copying permission
|
|||
"""
|
||||
|
||||
from lib.core.common import filterPairValues
|
||||
from lib.core.common import isListLike
|
||||
from lib.core.common import isTechniqueAvailable
|
||||
from lib.core.common import readInput
|
||||
from lib.core.common import safeSQLIdentificatorNaming
|
||||
|
|
@ -47,7 +48,7 @@ class Enumeration(GenericEnumeration):
|
|||
retVal = pivotDumpTable("(%s) AS %s" % (query, kb.aliasName), ['%s.name' % kb.aliasName], blind=blind, alias=kb.aliasName)
|
||||
|
||||
if retVal:
|
||||
kb.data.cachedUsers = retVal[0].values()[0]
|
||||
kb.data.cachedUsers = list(retVal[0].values())[0]
|
||||
break
|
||||
|
||||
return kb.data.cachedUsers
|
||||
|
|
@ -102,7 +103,7 @@ class Enumeration(GenericEnumeration):
|
|||
retVal = pivotDumpTable("(%s) AS %s" % (query, kb.aliasName), ['%s.name' % kb.aliasName], blind=blind, alias=kb.aliasName)
|
||||
|
||||
if retVal:
|
||||
kb.data.cachedDbs = retVal[0].values()[0]
|
||||
kb.data.cachedDbs = list(retVal[0].values())[0]
|
||||
break
|
||||
|
||||
if kb.data.cachedDbs:
|
||||
|
|
@ -146,7 +147,7 @@ class Enumeration(GenericEnumeration):
|
|||
retVal = pivotDumpTable("(%s) AS %s" % (query, kb.aliasName), ['%s.name' % kb.aliasName], blind=blind, alias=kb.aliasName)
|
||||
|
||||
if retVal:
|
||||
for table in retVal[0].values()[0]:
|
||||
for table in list(retVal[0].values())[0]:
|
||||
if db not in kb.data.cachedTables:
|
||||
kb.data.cachedTables[db] = [table]
|
||||
else:
|
||||
|
|
@ -195,9 +196,9 @@ class Enumeration(GenericEnumeration):
|
|||
self.getTables()
|
||||
|
||||
if len(kb.data.cachedTables) > 0:
|
||||
tblList = kb.data.cachedTables.values()
|
||||
tblList = list(kb.data.cachedTables.values())
|
||||
|
||||
if isinstance(tblList[0], (set, tuple, list)):
|
||||
if isListLike(tblList[0]):
|
||||
tblList = tblList[0]
|
||||
else:
|
||||
errMsg = "unable to retrieve the tables "
|
||||
|
|
|
|||
|
|
@ -478,9 +478,9 @@ class Databases:
|
|||
if conf.db in kb.data.cachedTables:
|
||||
tblList = kb.data.cachedTables[conf.db]
|
||||
else:
|
||||
tblList = kb.data.cachedTables.values()
|
||||
tblList = list(kb.data.cachedTables.values())
|
||||
|
||||
if isinstance(tblList[0], (set, tuple, list)):
|
||||
if isListLike(tblList[0]):
|
||||
tblList = tblList[0]
|
||||
|
||||
tblList = list(tblList)
|
||||
|
|
|
|||
|
|
@ -93,9 +93,9 @@ class Entries:
|
|||
self.getTables()
|
||||
|
||||
if len(kb.data.cachedTables) > 0:
|
||||
tblList = kb.data.cachedTables.values()
|
||||
tblList = list(kb.data.cachedTables.values())
|
||||
|
||||
if isinstance(tblList[0], (set, tuple, list)):
|
||||
if isListLike(tblList[0]):
|
||||
tblList = tblList[0]
|
||||
elif not conf.search:
|
||||
errMsg = "unable to retrieve the tables "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue