diff --git a/lib/controller/checks.py b/lib/controller/checks.py index ad4643471..dac5d962c 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -335,19 +335,21 @@ def checkNullConnection(): page, headers = Request.getPage(method="HEAD") if not page and 'Content-Length' in headers: kb.nullConnection = "HEAD" + + infoMsg = "null connection is supported with HEAD header" + logger.info(infoMsg) else: page, headers = Request.getPage(auxHeaders={"Range":"bytes=-1"}) if page and len(page) == 1 and 'Content-Range' in headers: kb.nullConnection = "Range" + infoMsg = "null connection is supported with GET header " + infoMsg += "'%s'" % kb.nullConnection + logger.info(infoMsg) except sqlmapConnectionException, errMsg: errMsg = getUnicode(errMsg) raise sqlmapConnectionException, errMsg - if kb.nullConnection: - infoMsg = "method '%s' seems to be working" % kb.nullConnection - logger.info(infoMsg) - return kb.nullConnection is not None def checkConnection():