mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 19:55:47 +03:00
fix for Feature #136
This commit is contained in:
parent
e810fe7b0b
commit
c4040ab297
|
@ -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,6 +871,8 @@ 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)
|
||||
|
||||
|
@ -878,6 +880,10 @@ class Enumeration:
|
|||
table = {}
|
||||
columns = {}
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -320,7 +320,9 @@
|
|||
<inband query="SELECT tbl_name FROM sqlite_master WHERE type='table' ORDER BY 1"/>
|
||||
<blind query="SELECT tbl_name FROM sqlite_master WHERE type='table' LIMIT %d, 1" count="SELECT COUNT(tbl_name) FROM sqlite_master WHERE type='table'"/>
|
||||
</tables>
|
||||
<columns/>
|
||||
<columns>
|
||||
<inband query="SELECT sql FROM sqlite_master WHERE tbl_name='%s'"/>
|
||||
</columns>
|
||||
<dump_table>
|
||||
<inband query="SELECT %s FROM %s"/>
|
||||
<blind query="SELECT %s FROM %s LIMIT %d, 1" count="SELECT COUNT(*) FROM %s"/>
|
||||
|
|
Loading…
Reference in New Issue
Block a user