Skip to content

Commit 762650d

Browse files
committed
Fixing --dump for Derby
1 parent 534f873 commit 762650d

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

lib/core/agent.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,9 @@ def nullAndCastField(self, field):
530530
elif Backend.isDbms(DBMS.MYSQL) and kb.get("mysqlUtf8mb4"):
531531
# NCHAR (utf8mb3) downgrades 4-byte chars (emoji) to '?'; utf8mb4 preserves them
532532
nulledCastedField = "CAST(%s AS CHAR CHARACTER SET utf8mb4)" % field
533+
elif Backend.isDbms(DBMS.DERBY) and re.search(r"(?i)\bCOUNT\(", field):
534+
# Derby rejects CAST(INTEGER AS VARCHAR); route the numeric COUNT through a CHAR intermediate
535+
nulledCastedField = rootQuery.cast.query % ("CAST(%s AS CHAR(254))" % field)
533536
elif not (Backend.isDbms(DBMS.SQLITE) and not isDBMSVersionAtLeast('3')):
534537
nulledCastedField = rootQuery.cast.query % field
535538

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty import six
2121

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

0 commit comments

Comments
 (0)