Skip to content

Commit 9a6acd2

Browse files
committed
1 parent 387020e commit 9a6acd2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.5.4.6"
21+
VERSION = "1.5.4.7"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

plugins/generic/entries.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)