mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 14:11:29 +00:00
fix for Feature #136
This commit is contained in:
@@ -68,16 +68,6 @@ class Enumeration(GenericEnumeration):
|
||||
|
||||
return []
|
||||
|
||||
def getColumns(self, onlyColNames=False):
|
||||
errMsg = "on SQLite it is not possible to enumerate database "
|
||||
errMsg += "table columns"
|
||||
|
||||
if conf.dumpTable or conf.dumpAll:
|
||||
errMsg += ", provide them with -C option"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
logger.warn(errMsg)
|
||||
|
||||
def dumpAll(self):
|
||||
errMsg = "on SQLite you must specify the table and columns to dump"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
@@ -871,15 +871,21 @@ class Enumeration:
|
||||
conf.db, conf.db,
|
||||
conf.db, conf.tbl)
|
||||
query += condQuery.replace("[DB]", conf.db)
|
||||
elif kb.dbms == "SQLite":
|
||||
query = rootQuery["inband"]["query"] % conf.tbl
|
||||
|
||||
value = inject.getValue(query, blind=False)
|
||||
|
||||
if value:
|
||||
table = {}
|
||||
columns = {}
|
||||
|
||||
for column, colType in value:
|
||||
columns[column] = colType
|
||||
|
||||
if kb.dbms == "SQLite":
|
||||
for match in re.finditer(r"(\w+) ([A-Z]+)[,\r\n]", value):
|
||||
columns[match.group(1)] = match.group(2)
|
||||
else:
|
||||
for column, colType in value:
|
||||
columns[column] = colType
|
||||
|
||||
table[conf.tbl] = columns
|
||||
kb.data.cachedColumns[conf.db] = table
|
||||
|
||||
Reference in New Issue
Block a user