From 4c869817d4e73ef973bedc7765dbd1dd0e3b0b9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0tampar?= Date: Sun, 28 Jun 2026 19:03:21 +0200 Subject: [PATCH] Fixing CI/CD pipeline --- data/txt/sha256sums.txt | 18 +++++++++--------- lib/core/settings.py | 2 +- tests/test_common.py | 5 +++-- tests/test_deps.py | 5 ++++- tests/test_fingerprint.py | 2 +- tests/test_generic_takeover.py | 1 + tests/test_hash_crack.py | 5 ++++- tests/test_payload_marking.py | 3 ++- tests/test_request_basic.py | 2 +- tests/test_sgmllib.py | 20 +++++++++++++++----- 10 files changed, 41 insertions(+), 22 deletions(-) diff --git a/data/txt/sha256sums.txt b/data/txt/sha256sums.txt index 02cb904bc..f8337e8c8 100644 --- a/data/txt/sha256sums.txt +++ b/data/txt/sha256sums.txt @@ -189,7 +189,7 @@ e033b20a0f7821797a10f4bf4235723f38c7db551c611fbb713faa621b123c4a lib/core/optio 9bf174058f15d14e24e94f9aaf42df045119d3617c6c54bd2f3af79b462f331d lib/core/replication.py 0b8c38a01bb01f843d94a6c5f2075ee47520d0c4aa799cecea9c3e2c5a4a23a6 lib/core/revision.py 888daba83fd4a34e9503fe21f01fef4cc730e5cde871b1d40e15d4cbc847d56c lib/core/session.py -bb908144ffaf055c67bb06da7f914d77cad00f84839c63ae2f83fea62cdacfe2 lib/core/settings.py +e9aae7dacf83a4d7054862eeb0a96ed695731cd87f8b03836a8a41c7454d0f5f lib/core/settings.py c7804223319e18eb0b8e2cbf0a8b6896d1cefb7b0b1a2e9f1cf826a8a3b56750 lib/core/shell.py a2e98a94b231432736d6b304fc75525c8b5fdb4768c418387c5b4c1a610dad64 lib/core/subprocessng.py 19f1e3c5e3ba703d28d510cd7a9ab8284d5fbe9df5ce7e77c86e5931571364b7 lib/core/target.py @@ -587,7 +587,7 @@ feb763ddcbf4f32822372ca53f8c71c754af7b72510ef06e1e9c77927fc90b10 tests/test_big c99b77cc5d85334f147a1a6d4b2867af396f70e9f2609f8587344e084910e893 tests/test_checks.py 9e678a56e16211c49ab4995b6c658d3f122bfa3b357d9e17ff38f5a489ace6ad tests/test_cloak.py 2ec894f49ca9bd750a23ead16dae176bcbc57d18ec5847fa4a5eeb886d75c1bd tests/test_common_helpers.py -058c6b13f2f9ce7798f4106eb4f2a0eaf290eab6b3f9aff2f46553f80c872d29 tests/test_common.py +cdacb37cbe5667fded00abe62a822e11c917e9cb5c3f664b7aa1a8d738412ed4 tests/test_common.py 899bc085e96d68f8a8cbe0d7e55863e98ef37b73ab0e4234f7d969e31ea2d23a tests/test_comparison_json.py 7b72d4f850bbd059b8e95fceb45a58470354cb7270c99b0e9981aaa189af20d1 tests/test_comparison.py a7c3cf9f7820f377ebfdecf9383ebebc2932dd4a2a531a2b4496071f9d973c1c tests/test_compat.py @@ -597,7 +597,7 @@ c17544be5e945dc8c4fbb5c3b922da8eceec30b0fb239c32fb5f40e1660a197f tests/test_dat 9c240d4f796e56376374d4ce46f358ceb7d48cc6a7427760c5bfb89ff01cb545 tests/test_datatypes.py 8a1edb6dbc000e412ba5cc598e024b669fc76ec0a8fc32136808e6325a018f70 tests/test_dbms_enum.py 3804eb2d730220360f9dc07d5994eb64e9f65acf3b0d8648df8df2a2177ba8fd tests/test_decodepage.py -cf480e241746fdbbe071c2dfd25ec5fd186a79dcb4522f034f661b9f55a2c4ea tests/test_deps.py +180e5fd3f75fadf7ac1135f99797314e2cf1f8ae6dced02edfb18ccba43c0148 tests/test_deps.py b01343eb8aa42ea5c2c483ec028a24f6451aa6f668fdc0c289d5ff9554c277d7 tests/test_dialectdbms.py e40a49cfa73c45b3c3c6d1d1d00738861e270cb7a07b28f5a5356f9c7c800cf2 tests/test_dialect.py 993a2d4d87c4fbaf261663b069629acc95ee4405aa0c42cf5a8f39649fdb0fff tests/test_dicts.py @@ -609,12 +609,12 @@ ec58ba0849d90d2bb7580fe2b8b96cd8299ddfc25f14dc27d9de9d41f152c78a tests/test_dns fe1211ce43a51cd8ec7dd3395aafda8d7313ff60e2ef013072ce9fa49ca4a242 tests/test_entries.py bb6991260a994fcbe79e05febaa34affd5631d02299fbc626820addd5f6ea4f4 tests/test_error_engine.py 26730151abea598f193131c5d64ef92b531941972f3d6236f9951c3116030b1c tests/test_filesystem.py -6a9d95f64c7892957742534a14e8f094c6ed9ebc91b7059f4f1665049228a5a6 tests/test_fingerprint.py -de477d585396596556f7020d39bad3577f4d73336c19c1ee14e4158c45dbd924 tests/test_generic_takeover.py +16fba97cba6afe8af11aa30bcc4266f53b00f2530161e010af10b51db1509703 tests/test_fingerprint.py +20844dfc758e99b2f757906c51ef32aca0f699283ec5aa629158d3dc0fd279ea tests/test_generic_takeover.py bde97a4781c4ee84e0fe86f7a33206f114167eb14b704013ecf1c26b838193d7 tests/test_graphql.py 50b71422ee91b9a4864f4d5ce6c9bdf169dc5f57ed1db05c152eb010c282136b tests/test_gui_helpers.py 92648f2fe81e22c5726b198bbbda14961cd4d3294a0d9139dcea808b324142ac tests/test_har.py -da2efd1b7457ff619d98a2ae5045f072fdd34be2aa1c18f17d74d7518eeb6707 tests/test_hash_crack.py +70919c6ee8fbb3d619873489c819fa37d9035beb2e9b658cc5aa531d86a40380 tests/test_hash_crack.py 0336c875dd2b6554bff6eafd746229e38c69ca8070cd933d45cf27c82ef3e05f tests/test_hashdb.py c04e8358fb6df45f69f2f26435c971acde280535bf304e84d30cf2681158c6a7 tests/test_hash.py d539d0ae758b5bb91e314ab82ab4fe03d6fb2f8b377d16aefa6d7d1d77a7d5a9 tests/test_identifiers_output.py @@ -626,18 +626,18 @@ caa06fed7323b2bb6d0f2443ce343de94f75bf8ad012c055d5e07741d908ebad tests/test_mis 6e63ed05db0490148d1c8428d785a23b0d5d5a0f566cd397c9c4a8fe8a6ed7dc tests/test_option.py cde0bea1263ae857561f91ed2bd515e972b716743f017d31b1718a8546c72759 tests/test_pagecontent.py 7554a918309cf0f2cd8a63a3bb7659708f13beffbcd5ce498ece9f9167d55c97 tests/test_parse_modules.py -57fa7b742aa0859ae166cea49dd6daac36d21aae05fe3ba6c73f42c4c56d7a3c tests/test_payload_marking.py +0d52bf4b96eea2330553fdf7f875ed571e596d2f7a4b3648a2b53e44666f0c70 tests/test_payload_marking.py 6bfc8201724078bd9d6d559916ef73c9ff97e19b0f2948f37e588a49b027795f tests/test_payloads_structure.py d6ffa83bd56ae98e7f55307b72dd7ea4802bccea9a85bb8f062619fb0a88913e tests/test_progress.py a6d013104601c0414628aff3d8b5b69bee3e6733781d8f8da880457d8b44bd3a tests/test_property.py c4c6f500bb71c3e430da343a49e8c8b8b3c919f438b6e6130597ce68dd856487 tests/test_purge.py 2dfefb4bfaee3868152835502ec43da317c4f274b1d55cd2ef21e4f7390c9bea tests/test_replication.py 67a5241aeebc20eb1c20cfc490422a59af5179040824e5731bd785db2e6bf750 tests/test_report.py -f7478deabe9d117c60d597859510a168c81e71f60981503dcd798ef2311b30a1 tests/test_request_basic.py +4723d3bdf9623a49972e1d7378168ae8efbeaa31fb11c35d83bb40cc135fa0a8 tests/test_request_basic.py cec98d72992c0799229a780fa7f0d7f3fb01ec2d708187ce0e4a05c8612f291b tests/test_safe2bin.py 5b6ce95dddbd07d0126224f4f066643938476e536e18b700ea5d916e1052a715 tests/test_search_enum.py a1c6cda1e5b483f61e6a4f8ddd0b06a15ddaa3fd2119bfb9dbd9cc970d7a751d tests/test_settings_regex.py -d6bcba7232fff834737c094679c92e7a69cab5721bc87cb10bcab868c6a8115f tests/test_sgmllib.py +29d0278e3718b0fee422d3f6bb85ca02560138d48cd76f9fe1f35ac19d96071b tests/test_sgmllib.py d3d991331096e16e5019de3d652e9fff92c09bd9f97c50b1c2c3ceb0ed49b17e tests/test_sqlparse.py 8bcbf1091134dd0a62f6201f8b3645ed87b5ff2f7ba40a87231a29dac412591f tests/test_strings.py 8f1c5f0f337ecd26d35c5551060034e0aa33a62cce5385fc1227fdc485f6383e tests/test_tamper.py diff --git a/lib/core/settings.py b/lib/core/settings.py index 0600930ca..f2d89666b 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.10.6.187" +VERSION = "1.10.6.188" 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) diff --git a/tests/test_common.py b/tests/test_common.py index 40f578ec8..87369fe42 100644 --- a/tests/test_common.py +++ b/tests/test_common.py @@ -455,6 +455,7 @@ class TestParseRequestFileBurp(unittest.TestCase): self._method = conf.method self._headers = conf.headers conf.scope = None + conf.method = None # avoid a leaked conf.method overriding the parsed verb def tearDown(self): conf.scope = self._scope @@ -974,7 +975,7 @@ class TestGetPageWordSet(unittest.TestCase): class TestNormalizeUnicode(unittest.TestCase): def test_accents_stripped(self): # normalizeUnicode collapses accented chars to their ASCII base - self.assertEqual(normalizeUnicode(u"éè"), "ee") + self.assertEqual(normalizeUnicode(u"\xe9\xe8"), "ee") def test_plain_ascii_unchanged(self): self.assertEqual(normalizeUnicode(u"abc123"), "abc123") @@ -1342,7 +1343,7 @@ class TestCommonDecodeIntToUnicode(unittest.TestCase): from lib.core.common import decodeIntToUnicode set_dbms(DBMS.PGSQL) # value > 255 on PGSQL takes the _unichr(value) branch - self.assertEqual(decodeIntToUnicode(0x2122), u"™") + self.assertEqual(decodeIntToUnicode(0x2122), u"\u2122") class TestCommonDecodeDbmsHex(unittest.TestCase): diff --git a/tests/test_deps.py b/tests/test_deps.py index 91cabb5d6..5dfab5b50 100644 --- a/tests/test_deps.py +++ b/tests/test_deps.py @@ -74,7 +74,10 @@ class TestCheckDependencies(unittest.TestCase): def test_all_present_emits_all_installed_info(self): # force every __import__ to succeed so no library is ever recorded as # missing; the empty-missing-set branch must emit the summary info line. - import builtins + try: + import __builtin__ as builtins # py2 real builtin module + except ImportError: + import builtins # py3 class _FakeModule(object): __version__ = "999.0.0" diff --git a/tests/test_fingerprint.py b/tests/test_fingerprint.py index 879420feb..0aefbd3da 100644 --- a/tests/test_fingerprint.py +++ b/tests/test_fingerprint.py @@ -153,7 +153,7 @@ class TestFingerprint(unittest.TestCase): def test_fingerprint_extensive(self): # conf.extensiveFp drives the deeper comment-/version-/dbms-check cascades - # (getFingerprint past the early return) — much more code per dialect. + # (getFingerprint past the early return) - much more code per dialect. # In this mode every dialect's output is built around an # "active fingerprint: " line, so that header is the # real content proof; the version "1.0" rides along for the ACTVER set. diff --git a/tests/test_generic_takeover.py b/tests/test_generic_takeover.py index f78aaa697..89449adf4 100644 --- a/tests/test_generic_takeover.py +++ b/tests/test_generic_takeover.py @@ -328,6 +328,7 @@ class TestMisc(_GenericBase): # An explicit Windows-style drive path flips Backend OS to Windows. set_dbms("MySQL") conf.tmpPath = "C:\\Temp" + kb.os = None # let getRemoteTempPath detect Windows from the drive path m = _TestMisc() out = m.getRemoteTempPath() self.assertTrue(Backend.isOs(OS.WINDOWS)) diff --git a/tests/test_hash_crack.py b/tests/test_hash_crack.py index f23838e0e..4e9e067ff 100644 --- a/tests/test_hash_crack.py +++ b/tests/test_hash_crack.py @@ -30,7 +30,10 @@ from lib.utils import hash as H from lib.core.data import conf, kb from lib.core.enums import MKSTEMP_PREFIX -SCRATCH = "/tmp/claude-1000/-tmp-tmp-oUnlQJzlQN/fcd55d25-6313-49ed-817e-dcbe7fc2bf22/scratchpad" +import atexit +import shutil +SCRATCH = tempfile.mkdtemp(prefix="sqlmap_test_hashcrack_") +atexit.register(lambda: shutil.rmtree(SCRATCH, ignore_errors=True)) # known plaintext / hashes shared across tests PW = "testpass" diff --git a/tests/test_payload_marking.py b/tests/test_payload_marking.py index 13ccdf2ee..04f97941a 100644 --- a/tests/test_payload_marking.py +++ b/tests/test_payload_marking.py @@ -208,7 +208,8 @@ def _drive_hpp(payload, name="id"): kb.postSpaceToPlus = False value = "%s=%s%s%s" % (name, PAYLOAD_DELIMITER, payload, PAYLOAD_DELIMITER) try: - Connect.queryPage(value=value, place=PLACE.GET, disableTampering=True) + _qp = getattr(Connect.queryPage, "__func__", Connect.queryPage) + _qp(value=value, place=PLACE.GET, disableTampering=True) except _Sentinel: pass finally: diff --git a/tests/test_request_basic.py b/tests/test_request_basic.py index 153f1bac6..14977489b 100644 --- a/tests/test_request_basic.py +++ b/tests/test_request_basic.py @@ -75,7 +75,7 @@ class TestBasicDecodePage(unittest.TestCase): def test_unicode_entity(self): from lib.request.basic import decodePage conf.encoding = None - self.assertEqual(decodePage(b"™", None, "text/html; charset=utf-8"), u"™") + self.assertEqual(decodePage(b"™", None, "text/html; charset=utf-8"), u"\u2122") def test_empty_page(self): from lib.request.basic import decodePage diff --git a/tests/test_sgmllib.py b/tests/test_sgmllib.py index 3d6ff1c1f..5343ef952 100644 --- a/tests/test_sgmllib.py +++ b/tests/test_sgmllib.py @@ -9,8 +9,6 @@ sqlmap for page content analysis. Exercises the parser with valid SGML/HTML constructs and verifies the event stream. """ -import contextlib -import io import os import sys import unittest @@ -241,11 +239,23 @@ class TestVerbose(unittest.TestCase): def _run(self, verbose): p = self._Parser() p.verbose = verbose - buf = io.StringIO() - with contextlib.redirect_stdout(buf): + _captured = [] + + class _Cap(object): + def write(self, s): + _captured.append(s) + + def flush(self): + pass + + _saved = sys.stdout + sys.stdout = _Cap() + try: p.feed("") # unbalanced end tag -> report_unbalanced() p.close() - return buf.getvalue() + finally: + sys.stdout = _saved + return "".join(_captured) def test_verbose_mode_emits_debug(self): out = self._run(1)