mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Fix for a socks module - proper unwrapmodule (Issue #58)
This commit is contained in:
parent
23f2c5f166
commit
1d4e2d151d
5
thirdparty/socks/socks.py
vendored
5
thirdparty/socks/socks.py
vendored
|
@ -53,6 +53,7 @@ PROXY_TYPE_HTTP = 3
|
|||
|
||||
_defaultproxy = None
|
||||
_orgsocket = socket.socket
|
||||
_orgcreateconnection = socket.create_connection
|
||||
|
||||
class ProxyError(Exception): pass
|
||||
class GeneralProxyError(ProxyError): pass
|
||||
|
@ -113,8 +114,8 @@ def wrapmodule(module):
|
|||
raise GeneralProxyError((4, "no proxy specified"))
|
||||
|
||||
def unwrapmodule(module):
|
||||
module.socket.socket = socket.socket
|
||||
module.socket.create_connection = socket.create_connection
|
||||
module.socket.socket = _orgsocket
|
||||
module.socket.create_connection = _orgcreateconnection
|
||||
|
||||
class socksocket(socket.socket):
|
||||
"""socksocket([family[, type[, proto]]]) -> socket object
|
||||
|
|
Loading…
Reference in New Issue
Block a user