Minor patch for DNS cache

This commit is contained in:
Miroslav Stampar
2026-01-28 18:06:53 +01:00
parent 1a97d9e296
commit caccfe85ed
3 changed files with 9 additions and 8 deletions

View File

@@ -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

View File

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