mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-28 20:43:49 +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
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# 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 = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
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)
|
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)
|
singleTimeLogMessage(infoMsg)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for query, count in ((rootQuery.blind.query, rootQuery.blind.count), (getattr(rootQuery.blind, "query2", None), getattr(rootQuery.blind, "count2", 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:
|
if _query is None:
|
||||||
break
|
break
|
||||||
|
|
||||||
infoMsg = "fetching number of tables for "
|
infoMsg = "fetching number of tables for "
|
||||||
|
@ -372,9 +372,11 @@ class Databases(object):
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
if Backend.getIdentifiedDbms() not in (DBMS.SQLITE, DBMS.FIREBIRD, DBMS.MAXDB, DBMS.ACCESS, DBMS.MCKOI, DBMS.EXTREMEDB):
|
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:
|
if count == 0:
|
||||||
warnMsg = "database '%s' " % unsafeSQLIdentificatorNaming(db)
|
warnMsg = "database '%s' " % unsafeSQLIdentificatorNaming(db)
|
||||||
|
@ -395,15 +397,15 @@ class Databases(object):
|
||||||
|
|
||||||
for index in indexRange:
|
for index in indexRange:
|
||||||
if Backend.isDbms(DBMS.SYBASE):
|
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):
|
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):
|
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):
|
elif Backend.getIdentifiedDbms() in (DBMS.HSQLDB, DBMS.INFORMIX, DBMS.FRONTBASE, DBMS.VIRTUOSO):
|
||||||
query = query % (index, unsafeSQLIdentificatorNaming(db))
|
query = _query % (index, unsafeSQLIdentificatorNaming(db))
|
||||||
else:
|
else:
|
||||||
query = query % (unsafeSQLIdentificatorNaming(db), index)
|
query = _query % (unsafeSQLIdentificatorNaming(db), index)
|
||||||
|
|
||||||
table = unArrayizeValue(inject.getValue(query, union=False, error=False))
|
table = unArrayizeValue(inject.getValue(query, union=False, error=False))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user