mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
made --search -D on MSSQL consistent with other DBMSes - issue #81
This commit is contained in:
parent
7f10b01265
commit
60242f92c5
|
@ -158,15 +158,16 @@ class Enumeration(GenericEnumeration):
|
|||
return kb.data.cachedTables
|
||||
|
||||
def searchTable(self):
|
||||
rootQuery = queries[Backend.getIdentifiedDbms()].search_table
|
||||
foundTbls = {}
|
||||
tblList = conf.tbl.split(",")
|
||||
rootQuery = queries[Backend.getIdentifiedDbms()].search_table
|
||||
tblCond = rootQuery.inband.condition
|
||||
#dbCond = rootQuery.inband.condition2
|
||||
|
||||
tblConsider, tblCondParam = self.likeOrExact("table")
|
||||
|
||||
if not len(kb.data.cachedDbs):
|
||||
if conf.db and conf.db != CURRENT_DB:
|
||||
enumDbs = conf.db.split(",")
|
||||
elif not len(kb.data.cachedDbs):
|
||||
enumDbs = self.getDbs()
|
||||
else:
|
||||
enumDbs = kb.data.cachedDbs
|
||||
|
@ -247,7 +248,13 @@ class Enumeration(GenericEnumeration):
|
|||
if len(tbls) == 0:
|
||||
foundTbls.pop(db)
|
||||
|
||||
return foundTbls
|
||||
if not foundTbls:
|
||||
warnMsg = "no databases contain any of the provided tables"
|
||||
logger.warn(warnMsg)
|
||||
return
|
||||
|
||||
conf.dumper.dbTables(foundTbls)
|
||||
self.dumpFoundTables(foundTbls)
|
||||
|
||||
def searchColumn(self):
|
||||
rootQuery = queries[Backend.getIdentifiedDbms()].search_column
|
||||
|
|
|
@ -154,12 +154,10 @@ class Search:
|
|||
|
||||
foundTbls = {}
|
||||
tblList = conf.tbl.split(",")
|
||||
|
||||
rootQuery = queries[Backend.getIdentifiedDbms()].search_table
|
||||
tblCond = rootQuery.inband.condition
|
||||
dbCond = rootQuery.inband.condition2
|
||||
whereDbsQuery = ""
|
||||
|
||||
tblConsider, tblCondParam = self.likeOrExact("table")
|
||||
|
||||
for tbl in tblList:
|
||||
|
|
Loading…
Reference in New Issue
Block a user