Fix for --count skipping empty tables

This commit is contained in:
Miroslav Štampar 2026-11-12 17:31:14 +01:00
parent c0e75fa98d
commit 26cb5cdc31
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@ from lib.core.enums import OS
from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.10.11.69"
VERSION = "1.10.11.70"
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)

View file

@ -1058,7 +1058,7 @@ class Databases(object):
query = agent.whereQuery(query)
count = inject.getValue(query, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS)
if isNumPosStrValue(count):
if isNumPosStrValue(count) or count in (0, "0"): # Note: including empty tables (i.e. 0 entries)
if safeSQLIdentificatorNaming(db) not in kb.data.cachedCounts:
kb.data.cachedCounts[safeSQLIdentificatorNaming(db)] = {}