From b6761e1825030911b878a767b92c2c516b0aaf33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0tampar?= Date: Thu, 12 Nov 2026 16:25:58 +0100 Subject: [PATCH] Fix for --dump-file with multiple tables and --start/--stop mixing tables --- lib/core/dump.py | 5 ++++- lib/core/settings.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/core/dump.py b/lib/core/dump.py index 0f8571d31..4bbe1c431 100644 --- a/lib/core/dump.py +++ b/lib/core/dump.py @@ -75,6 +75,7 @@ class Dump(object): self._outputFile = None self._outputFP = None self._lock = threading.Lock() + self._dumpFiles = {} # Note: dump file -> table (written during this run) def _write(self, data, newline=True, console=True, content_type=None): text = "%s%s" % (data, "\n" if newline else " ") @@ -513,7 +514,8 @@ class Dump(object): else: dumpFileName = os.path.join(dumpDbPath, "%s.%s" % (safeTable, conf.dumpFormat.lower())) else: - appendToFile = any((conf.limitStart, conf.limitStop)) + # Note: appending (e.g. of --start/--stop ranges) only to the same table's file (i.e. not to a --dump-file shared among multiple tables) + appendToFile = any((conf.limitStart, conf.limitStop)) and self._dumpFiles.get(dumpFileName, table) == table if not appendToFile: count = 1 @@ -528,6 +530,7 @@ class Dump(object): else: count += 1 + self._dumpFiles[dumpFileName] = table dumpFP = openFile(dumpFileName, 'w' if not appendToFile else 'a', buffering=DUMP_FILE_BUFFER_SIZE) count = int(tableValues["__infos__"]["count"]) diff --git a/lib/core/settings.py b/lib/core/settings.py index 0da7d33d7..116f2bfd6 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.10.11.55" +VERSION = "1.10.11.56" 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)