From caccfe85ed55fcc2119c30278acb0c2b0f279d23 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 28 Jan 2026 18:06:53 +0100 Subject: [PATCH] Minor patch for DNS cache --- data/txt/sha256sums.txt | 4 ++-- lib/core/option.py | 11 ++++++----- lib/core/settings.py | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/data/txt/sha256sums.txt b/data/txt/sha256sums.txt index b245cd729..3f26518e3 100644 --- a/data/txt/sha256sums.txt +++ b/data/txt/sha256sums.txt @@ -181,14 +181,14 @@ a033f92d136c707a25927c2383125ddb004d4283db62c004dcd67c3fc242bb1c lib/core/dump. 1966ca704961fb987ab757f0a4afddbf841d1a880631b701487c75cef63d60c3 lib/core/__init__.py 914a13ee21fd610a6153a37cbe50830fcbd1324c7ebc1e7fc206d5e598b0f7ad lib/core/log.py 02a2264324caa249154e024a01bcd7cc40dbca4d647d5d10a50654b4415a6d77 lib/core/optiondict.py -4dc6383b5d9cfff5b1bf8ffa8b0b02a7dbd8df8624b76030f8925c2dbdee9bf9 lib/core/option.py +86070b96d28df6caa55e56f8fb16ba162524cab92a2d70eb110ae30f25099866 lib/core/option.py 8171f6ee33e7742f06bb3014a28324496374beddee7b378ace10a26414a97762 lib/core/patch.py 49c0fa7e3814dfda610d665ee02b12df299b28bc0b6773815b4395514ddf8dec lib/core/profiling.py 03db48f02c3d07a047ddb8fe33a757b6238867352d8ddda2a83e4fec09a98d04 lib/core/readlineng.py 48797d6c34dd9bb8a53f7f3794c85f4288d82a9a1d6be7fcf317d388cb20d4b3 lib/core/replication.py 0b8c38a01bb01f843d94a6c5f2075ee47520d0c4aa799cecea9c3e2c5a4a23a6 lib/core/revision.py 888daba83fd4a34e9503fe21f01fef4cc730e5cde871b1d40e15d4cbc847d56c lib/core/session.py -2259cd254a49009d258ba1aee0e6b3e07792264992cac11779767ef89915b59e lib/core/settings.py +b8ff39ed2acea39d472d81cfa78e4cfab62878e728059755eba928d3f4aee2aa lib/core/settings.py cd5a66deee8963ba8e7e9af3dd36eb5e8127d4d68698811c29e789655f507f82 lib/core/shell.py bcb5d8090d5e3e0ef2a586ba09ba80eef0c6d51feb0f611ed25299fbb254f725 lib/core/subprocessng.py d35650179816193164a5f177102f18379dfbe6bb6d40fbb67b78d907b41c8038 lib/core/target.py diff --git a/lib/core/option.py b/lib/core/option.py index 1fdb750c5..967163fcd 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1034,12 +1034,13 @@ def _setDNSCache(): """ def _getaddrinfo(*args, **kwargs): - if args in kb.cache.addrinfo: - return kb.cache.addrinfo[args] + key = (args, frozenset(kwargs.items())) - else: - kb.cache.addrinfo[args] = socket._getaddrinfo(*args, **kwargs) - return kb.cache.addrinfo[args] + if key in kb.cache.addrinfo: + return kb.cache.addrinfo[key] + + kb.cache.addrinfo[key] = socket._getaddrinfo(*args, **kwargs) + return kb.cache.addrinfo[key] if not hasattr(socket, "_getaddrinfo"): socket._getaddrinfo = socket.getaddrinfo diff --git a/lib/core/settings.py b/lib/core/settings.py index e3b1eeb97..281937549 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.1.61" +VERSION = "1.10.1.62" 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)