mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
Fixes #2231
This commit is contained in:
parent
c293a6a25a
commit
d6255de205
|
@ -1041,7 +1041,7 @@ def _setSocketPreConnect():
|
|||
return
|
||||
|
||||
def _():
|
||||
while kb.threadContinue and not conf.disablePrecon:
|
||||
while kb.get("threadContinue") and not conf.get("disablePrecon"):
|
||||
try:
|
||||
for key in socket._ready:
|
||||
if len(socket._ready[key]) < SOCKET_PRE_CONNECT_QUEUE_SIZE:
|
||||
|
@ -1776,6 +1776,17 @@ def _cleanupOptions():
|
|||
threadData = getCurrentThreadData()
|
||||
threadData.reset()
|
||||
|
||||
def _cleanupEnvironment():
|
||||
"""
|
||||
Cleanup environment (e.g. from leftovers after --sqlmap-shell).
|
||||
"""
|
||||
|
||||
if issubclass(urllib2.socket.socket, socks.socksocket):
|
||||
socks.unwrapmodule(urllib2)
|
||||
|
||||
if hasattr(socket, "_ready"):
|
||||
socket._ready.clear()
|
||||
|
||||
def _dirtyPatches():
|
||||
"""
|
||||
Place for "dirty" Python related patches
|
||||
|
@ -2620,6 +2631,7 @@ def init():
|
|||
_saveConfig()
|
||||
_setRequestFromFile()
|
||||
_cleanupOptions()
|
||||
_cleanupEnvironment()
|
||||
_dirtyPatches()
|
||||
_purgeOutput()
|
||||
_checkDependencies()
|
||||
|
|
Loading…
Reference in New Issue
Block a user