From 702ca22d54d455679a3a97d56f15ecd999e1d3a0 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Fri, 12 Aug 2011 14:48:44 +0000 Subject: [PATCH] Minor bug fix for URI injections --- lib/request/connect.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/request/connect.py b/lib/request/connect.py index 01b9d9b69..008208adc 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -399,9 +399,15 @@ class Connect: errMsg = "not authorized, try to provide right HTTP " errMsg += "authentication type and valid credentials (%d)" % code raise sqlmapConnectionException, errMsg - elif e.code == 404 and raise404: - errMsg = "page not found (%d)" % code - raise sqlmapConnectionException, errMsg + elif e.code == 404 + if raise404: + errMsg = "page not found (%d)" % code + raise sqlmapConnectionException, errMsg + else: + debugMsg = "page not found (%d)" % code + logger.debug(debugMsg) + processResponse(page, responseHeaders) + return page, responseHeaders elif e.code == 504: if ignoreTimeout: return None, None