mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-13 19:34:43 +00:00
Fix for SQLite --columns with multiple tables (-T a,b)
This commit is contained in:
parent
04e1162d5a
commit
d49202eaf1
3 changed files with 8 additions and 8 deletions
|
|
@ -3634,7 +3634,7 @@ def isDBMSVersionAtLeast(minimum):
|
|||
|
||||
return retVal
|
||||
|
||||
def parseSqliteTableSchema(value):
|
||||
def parseSqliteTableSchema(value, tbl=None):
|
||||
"""
|
||||
Parses table column names and types from specified SQLite table schema
|
||||
|
||||
|
|
@ -3675,7 +3675,7 @@ def parseSqliteTableSchema(value):
|
|||
|
||||
columns[safeSQLIdentificatorNaming(column)] = match.group(3) or "TEXT" # Note: stored escaped, as by all other column enumeration paths (e.g. 'my col' -> '`my col`')
|
||||
|
||||
table[safeSQLIdentificatorNaming(conf.tbl, True)] = columns
|
||||
table[safeSQLIdentificatorNaming(tbl or conf.tbl, True)] = columns
|
||||
if conf.db in kb.data.cachedColumns:
|
||||
kb.data.cachedColumns[conf.db].update(table)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from lib.core.enums import OS
|
|||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.11.31"
|
||||
VERSION = "1.10.11.32"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
|
|
|||
|
|
@ -704,9 +704,9 @@ class Databases(object):
|
|||
if dumpMode and colList:
|
||||
if conf.db not in kb.data.cachedColumns:
|
||||
kb.data.cachedColumns[conf.db] = {}
|
||||
kb.data.cachedColumns[conf.db][safeSQLIdentificatorNaming(conf.tbl, True)] = dict((_, None) for _ in colList)
|
||||
kb.data.cachedColumns[conf.db][safeSQLIdentificatorNaming(tbl, True)] = dict((_, None) for _ in colList)
|
||||
else:
|
||||
parseSqliteTableSchema(unArrayizeValue(values))
|
||||
parseSqliteTableSchema(unArrayizeValue(values), tbl)
|
||||
|
||||
elif not isNoneValue(values):
|
||||
table = {}
|
||||
|
|
@ -813,13 +813,13 @@ class Databases(object):
|
|||
if dumpMode and colList:
|
||||
if conf.db not in kb.data.cachedColumns:
|
||||
kb.data.cachedColumns[conf.db] = {}
|
||||
kb.data.cachedColumns[conf.db][safeSQLIdentificatorNaming(conf.tbl, True)] = dict((_, None) for _ in colList)
|
||||
kb.data.cachedColumns[conf.db][safeSQLIdentificatorNaming(tbl, True)] = dict((_, None) for _ in colList)
|
||||
else:
|
||||
query = rootQuery.blind.query % unsafeSQLIdentificatorNaming(tbl)
|
||||
value = unArrayizeValue(inject.getValue(query, union=False, error=False))
|
||||
parseSqliteTableSchema(unArrayizeValue(value))
|
||||
parseSqliteTableSchema(unArrayizeValue(value), tbl)
|
||||
|
||||
return kb.data.cachedColumns
|
||||
continue
|
||||
|
||||
table = {}
|
||||
columns = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue