Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit af701cd

Browse files
committed
better way to handle that last commit problem
1 parent 5bc0742 commit af701cd

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/request/connect.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,14 @@ def getPage(**kwargs):
201201
else:
202202
try:
203203
page = e.read()
204+
responseHeaders = e.info()
204205
except socket.timeout:
205-
warnMsg = "connection timed out to the target url"
206-
raise sqlmapConnectionException, warnMsg
206+
warnMsg = "connection timed out while trying "
207+
warnMsg += "to get error page information"
208+
logger.warn(warnMsg)
209+
page, responseHeaders = None, None
207210
code = e.code
208211
status = e.msg
209-
responseHeaders = e.info()
210212

211213
debugMsg = "got HTTP error code: %d" % code
212214
logger.debug(debugMsg)

0 commit comments

Comments
 (0)