mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
fix for a bug noticed when using --keep-alive --threads on IIS/MSSQL
This commit is contained in:
parent
b3859824d9
commit
a8fea8e4a8
|
@ -97,8 +97,8 @@ class HTTPHandler(urllib2.HTTPHandler):
|
||||||
"""return a list of connected hosts"""
|
"""return a list of connected hosts"""
|
||||||
retVal = []
|
retVal = []
|
||||||
currentThread = threading.currentThread()
|
currentThread = threading.currentThread()
|
||||||
for thread, host in self._connections.keys():
|
for name, host in self._connections.keys():
|
||||||
if thread == currentThread:
|
if name == currentThread.getName():
|
||||||
retVal.append(host)
|
retVal.append(host)
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ class HTTPHandler(urllib2.HTTPHandler):
|
||||||
del self._connections[key]
|
del self._connections[key]
|
||||||
|
|
||||||
def _get_connection_key(self, host):
|
def _get_connection_key(self, host):
|
||||||
return (threading.currentThread(), host)
|
return (threading.currentThread().getName(), host)
|
||||||
|
|
||||||
def _start_connection(self, h, req):
|
def _start_connection(self, h, req):
|
||||||
h.clearheaders()
|
h.clearheaders()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user