@@ -86,7 +86,7 @@ def dumpTable(self, foundData=None):
8686 singleTimeLogMessage (infoMsg )
8787 return
8888
89- conf .db = safeSQLIdentificatorNaming (conf .db )
89+ conf .db = safeSQLIdentificatorNaming (conf .db ) or ""
9090
9191 if conf .tbl :
9292 if Backend .getIdentifiedDbms () in UPPER_CASE_DBMSES :
@@ -101,7 +101,7 @@ def dumpTable(self, foundData=None):
101101
102102 if tblList and isListLike (tblList [0 ]):
103103 tblList = tblList [0 ]
104- elif not conf .search :
104+ elif conf . db and not conf .search :
105105 errMsg = "unable to retrieve the tables "
106106 errMsg += "in database '%s'" % unsafeSQLIdentificatorNaming (conf .db )
107107 raise SqlmapNoneDataException (errMsg )
@@ -190,7 +190,7 @@ def dumpTable(self, foundData=None):
190190 elif Backend .getIdentifiedDbms () in (DBMS .SYBASE , DBMS .MSSQL ):
191191 # Partial inband and error
192192 if not (isTechniqueAvailable (PAYLOAD .TECHNIQUE .UNION ) and kb .injection .data [PAYLOAD .TECHNIQUE .UNION ].where == PAYLOAD .WHERE .ORIGINAL ):
193- table = "%s.%s" % (conf .db , tbl )
193+ table = "%s.%s" % (conf .db , tbl ) if conf . db else tbl
194194
195195 if Backend .isDbms (DBMS .MSSQL ) and not conf .forcePivoting :
196196 warnMsg = "in case of table dumping problems (e.g. column entry order) "
@@ -297,7 +297,7 @@ def dumpTable(self, foundData=None):
297297 elif Backend .getIdentifiedDbms () in (DBMS .SQLITE , DBMS .MAXDB , DBMS .ACCESS , DBMS .FIREBIRD , DBMS .MCKOI , DBMS .EXTREMEDB , DBMS .RAIMA ):
298298 query = rootQuery .blind .count % tbl
299299 elif Backend .getIdentifiedDbms () in (DBMS .SYBASE , DBMS .MSSQL ):
300- query = rootQuery .blind .count % ("%s.%s" % (conf .db , tbl ))
300+ query = rootQuery .blind .count % ("%s.%s" % (conf .db , tbl )) if conf . db else tbl
301301 elif Backend .isDbms (DBMS .INFORMIX ):
302302 query = rootQuery .blind .count % (conf .db , tbl )
303303 else :
@@ -334,9 +334,9 @@ def dumpTable(self, foundData=None):
334334 if Backend .getIdentifiedDbms () in (DBMS .ACCESS , DBMS .MCKOI , DBMS .RAIMA ):
335335 table = tbl
336336 elif Backend .getIdentifiedDbms () in (DBMS .SYBASE , DBMS .MSSQL , DBMS .MAXDB ):
337- table = "%s.%s" % (conf .db , tbl )
337+ table = "%s.%s" % (conf .db , tbl ) if conf . db else tbl
338338 elif Backend .isDbms (DBMS .INFORMIX ):
339- table = "%s:%s" % (conf .db , tbl )
339+ table = "%s:%s" % (conf .db , tbl ) if conf . db else tbl
340340
341341 if Backend .isDbms (DBMS .MSSQL ) and not conf .forcePivoting :
342342 warnMsg = "in case of table dumping problems (e.g. column entry order) "
0 commit comments