mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +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
|
return kb.data.cachedTables
|
||||||
|
|
||||||
def searchTable(self):
|
def searchTable(self):
|
||||||
rootQuery = queries[Backend.getIdentifiedDbms()].search_table
|
|
||||||
foundTbls = {}
|
foundTbls = {}
|
||||||
tblList = conf.tbl.split(",")
|
tblList = conf.tbl.split(",")
|
||||||
|
rootQuery = queries[Backend.getIdentifiedDbms()].search_table
|
||||||
tblCond = rootQuery.inband.condition
|
tblCond = rootQuery.inband.condition
|
||||||
#dbCond = rootQuery.inband.condition2
|
#dbCond = rootQuery.inband.condition2
|
||||||
|
|
||||||
tblConsider, tblCondParam = self.likeOrExact("table")
|
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()
|
enumDbs = self.getDbs()
|
||||||
else:
|
else:
|
||||||
enumDbs = kb.data.cachedDbs
|
enumDbs = kb.data.cachedDbs
|
||||||
|
@ -247,7 +248,13 @@ class Enumeration(GenericEnumeration):
|
||||||
if len(tbls) == 0:
|
if len(tbls) == 0:
|
||||||
foundTbls.pop(db)
|
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):
|
def searchColumn(self):
|
||||||
rootQuery = queries[Backend.getIdentifiedDbms()].search_column
|
rootQuery = queries[Backend.getIdentifiedDbms()].search_column
|
||||||
|
|
|
@ -154,12 +154,10 @@ class Search:
|
||||||
|
|
||||||
foundTbls = {}
|
foundTbls = {}
|
||||||
tblList = conf.tbl.split(",")
|
tblList = conf.tbl.split(",")
|
||||||
|
|
||||||
rootQuery = queries[Backend.getIdentifiedDbms()].search_table
|
rootQuery = queries[Backend.getIdentifiedDbms()].search_table
|
||||||
tblCond = rootQuery.inband.condition
|
tblCond = rootQuery.inband.condition
|
||||||
dbCond = rootQuery.inband.condition2
|
dbCond = rootQuery.inband.condition2
|
||||||
whereDbsQuery = ""
|
whereDbsQuery = ""
|
||||||
|
|
||||||
tblConsider, tblCondParam = self.likeOrExact("table")
|
tblConsider, tblCondParam = self.likeOrExact("table")
|
||||||
|
|
||||||
for tbl in tblList:
|
for tbl in tblList:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user