mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-28 12:33:49 +03:00
Bug fix (SOCKS4 patch)
This commit is contained in:
parent
2f53014685
commit
557da5dee4
|
@ -1089,6 +1089,10 @@ def _setHTTPHandlers():
|
|||
if scheme in (PROXY_TYPE.SOCKS4, PROXY_TYPE.SOCKS5):
|
||||
proxyHandler.proxies = {}
|
||||
|
||||
if scheme == PROXY_TYPE.SOCKS4:
|
||||
warnMsg = "SOCKS4 does not support resolving (DNS) names (i.e. causing DNS leakage)"
|
||||
singleTimeWarnMessage(warnMsg)
|
||||
|
||||
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5 if scheme == PROXY_TYPE.SOCKS5 else socks.PROXY_TYPE_SOCKS4, hostname, port, username=username, password=password)
|
||||
socks.wrapmodule(_http_client)
|
||||
else:
|
||||
|
|
|
@ -17,7 +17,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
|||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.3.3.57"
|
||||
VERSION = "1.3.3.58"
|
||||
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)
|
||||
|
|
4
thirdparty/socks/socks.py
vendored
4
thirdparty/socks/socks.py
vendored
|
@ -109,6 +109,10 @@ def wrapmodule(module):
|
|||
"""
|
||||
if _defaultproxy != None:
|
||||
module.socket.socket = socksocket
|
||||
if _defaultproxy[0] == PROXY_TYPE_SOCKS4:
|
||||
# Note: unable to prevent DNS leakage in SOCKS4 (Reference: https://security.stackexchange.com/a/171280)
|
||||
pass
|
||||
else:
|
||||
module.socket.create_connection = create_connection
|
||||
else:
|
||||
raise GeneralProxyError((4, "no proxy specified"))
|
||||
|
|
Loading…
Reference in New Issue
Block a user