mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 02:53:46 +03:00
Minor bug fix
This commit is contained in:
parent
3977be9c9e
commit
f1dbe9e388
|
@ -20,7 +20,7 @@ from thirdparty import six
|
|||
from thirdparty.six import unichr as _unichr
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.5.8.3"
|
||||
VERSION = "1.5.8.4"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
|
|
@ -363,8 +363,8 @@ class Databases(object):
|
|||
singleTimeLogMessage(infoMsg)
|
||||
continue
|
||||
|
||||
for query, count in ((rootQuery.blind.query, rootQuery.blind.count), (getattr(rootQuery.blind, "query2", None), getattr(rootQuery.blind, "count2", None))):
|
||||
if query is None:
|
||||
for _query, _count in ((rootQuery.blind.query, rootQuery.blind.count), (getattr(rootQuery.blind, "query2", None), getattr(rootQuery.blind, "count2", None))):
|
||||
if _query is None:
|
||||
break
|
||||
|
||||
infoMsg = "fetching number of tables for "
|
||||
|
@ -372,9 +372,11 @@ class Databases(object):
|
|||
logger.info(infoMsg)
|
||||
|
||||
if Backend.getIdentifiedDbms() not in (DBMS.SQLITE, DBMS.FIREBIRD, DBMS.MAXDB, DBMS.ACCESS, DBMS.MCKOI, DBMS.EXTREMEDB):
|
||||
count = count % unsafeSQLIdentificatorNaming(db)
|
||||
query = _count % unsafeSQLIdentificatorNaming(db)
|
||||
else:
|
||||
query = _count
|
||||
|
||||
count = inject.getValue(count, union=False, error=False, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS)
|
||||
count = inject.getValue(query, union=False, error=False, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS)
|
||||
|
||||
if count == 0:
|
||||
warnMsg = "database '%s' " % unsafeSQLIdentificatorNaming(db)
|
||||
|
@ -395,15 +397,15 @@ class Databases(object):
|
|||
|
||||
for index in indexRange:
|
||||
if Backend.isDbms(DBMS.SYBASE):
|
||||
query = query % (db, (kb.data.cachedTables[-1] if kb.data.cachedTables else " "))
|
||||
query = _query % (db, (kb.data.cachedTables[-1] if kb.data.cachedTables else " "))
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.MAXDB, DBMS.ACCESS, DBMS.MCKOI, DBMS.EXTREMEDB):
|
||||
query = query % (kb.data.cachedTables[-1] if kb.data.cachedTables else " ")
|
||||
query = _query % (kb.data.cachedTables[-1] if kb.data.cachedTables else " ")
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.SQLITE, DBMS.FIREBIRD):
|
||||
query = query % index
|
||||
query = _query % index
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.HSQLDB, DBMS.INFORMIX, DBMS.FRONTBASE, DBMS.VIRTUOSO):
|
||||
query = query % (index, unsafeSQLIdentificatorNaming(db))
|
||||
query = _query % (index, unsafeSQLIdentificatorNaming(db))
|
||||
else:
|
||||
query = query % (unsafeSQLIdentificatorNaming(db), index)
|
||||
query = _query % (unsafeSQLIdentificatorNaming(db), index)
|
||||
|
||||
table = unArrayizeValue(inject.getValue(query, union=False, error=False))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user