Fixing --dump for Derby

This commit is contained in:
Miroslav Štampar 2026-07-27 14:03:19 +02:00
parent 534f873660
commit 762650db07
2 changed files with 4 additions and 1 deletions

View file

@ -530,6 +530,9 @@ class Agent(object):
elif Backend.isDbms(DBMS.MYSQL) and kb.get("mysqlUtf8mb4"):
# NCHAR (utf8mb3) downgrades 4-byte chars (emoji) to '?'; utf8mb4 preserves them
nulledCastedField = "CAST(%s AS CHAR CHARACTER SET utf8mb4)" % field
elif Backend.isDbms(DBMS.DERBY) and re.search(r"(?i)\bCOUNT\(", field):
# Derby rejects CAST(INTEGER AS VARCHAR); route the numeric COUNT through a CHAR intermediate
nulledCastedField = rootQuery.cast.query % ("CAST(%s AS CHAR(254))" % field)
elif not (Backend.isDbms(DBMS.SQLITE) and not isDBMSVersionAtLeast('3')):
nulledCastedField = rootQuery.cast.query % field

View file

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