mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 04:31:30 +00:00
noticed little DoS behavior and lots of connections in netstat (best way to deal with zombie connections is to explicitly close them if not needed any more)
This commit is contained in:
@@ -231,6 +231,14 @@ class Connect:
|
||||
responseHeaders = conn.info()
|
||||
page = decodePage(page, responseHeaders.get("Content-Encoding"), responseHeaders.get("Content-Type"))
|
||||
|
||||
# Explicit closing of connection object
|
||||
if not conf.keepAlive:
|
||||
try:
|
||||
conn.close()
|
||||
except Exception, msg:
|
||||
warnMsg = "problem occured during connection closing ('%s')" % msg
|
||||
logger.warn(warnMsg)
|
||||
|
||||
except urllib2.HTTPError, e:
|
||||
code = e.code
|
||||
status = e.msg
|
||||
|
||||
Reference in New Issue
Block a user