File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,15 +158,16 @@ def getTables(self):
158158 return kb .data .cachedTables
159159
160160 def searchTable (self ):
161- rootQuery = queries [Backend .getIdentifiedDbms ()].search_table
162161 foundTbls = {}
163162 tblList = conf .tbl .split ("," )
163+ rootQuery = queries [Backend .getIdentifiedDbms ()].search_table
164164 tblCond = rootQuery .inband .condition
165165 #dbCond = rootQuery.inband.condition2
166-
167166 tblConsider , tblCondParam = self .likeOrExact ("table" )
168167
169- if not len (kb .data .cachedDbs ):
168+ if conf .db and conf .db != CURRENT_DB :
169+ enumDbs = conf .db .split ("," )
170+ elif not len (kb .data .cachedDbs ):
170171 enumDbs = self .getDbs ()
171172 else :
172173 enumDbs = kb .data .cachedDbs
@@ -247,7 +248,13 @@ def searchTable(self):
247248 if len (tbls ) == 0 :
248249 foundTbls .pop (db )
249250
250- return foundTbls
251+ if not foundTbls :
252+ warnMsg = "no databases contain any of the provided tables"
253+ logger .warn (warnMsg )
254+ return
255+
256+ conf .dumper .dbTables (foundTbls )
257+ self .dumpFoundTables (foundTbls )
251258
252259 def searchColumn (self ):
253260 rootQuery = queries [Backend .getIdentifiedDbms ()].search_column
Original file line number Diff line number Diff line change @@ -154,12 +154,10 @@ def searchTable(self):
154154
155155 foundTbls = {}
156156 tblList = conf .tbl .split ("," )
157-
158157 rootQuery = queries [Backend .getIdentifiedDbms ()].search_table
159158 tblCond = rootQuery .inband .condition
160159 dbCond = rootQuery .inband .condition2
161160 whereDbsQuery = ""
162-
163161 tblConsider , tblCondParam = self .likeOrExact ("table" )
164162
165163 for tbl in tblList :
You can’t perform that action at this time.
0 commit comments