parameters: ()
return_statement: return kb.nullConnection is not None
docstring: Reference: http://www.wisec.it/sectou.php?id=472f952d79293
docstring_summary: Reference: http://www.wisec.it/sectou.php?id=472f952d79293
docstring_tokens: Reference : http : // www . wisec . it / sectou . php?id = 472f952d79293
function: def checkNullConnection():
      """
      Reference: http://www.wisec.it/sectou.php?id=472f952d79293
      """
  
      if conf.data:
          return False
  
      infoMsg = "testing NULL connection to the target URL"
      logger.info(infoMsg)
  
      pushValue(kb.pageCompress)
      kb.pageCompress = False
  
      try:
          page, headers, _ = Request.getPage(method=HTTPMETHOD.HEAD)
  
          if not page and HTTP_HEADER.CONTENT_LENGTH in (headers or {}):
              kb.nullConnection = NULLCONNECTION.HEAD
  
              infoMsg = "NULL connection is supported with HEAD header"
              logger.info(infoMsg)
          else:
              page, headers, _ = Request.getPage(auxHeaders={HTTP_HEADER.RANGE: "bytes=-1"})
  
              if page and len(page) == 1 and HTTP_HEADER.CONTENT_RANGE in (headers or {}):
                  kb.nullConnection = NULLCONNECTION.RANGE
  
                  infoMsg = "NULL connection is supported with GET header "
                  infoMsg += "'%s'" % kb.nullConnection
                  logger.info(infoMsg)
              else:
                  _, headers, _ = Request.getPage(skipRead = True)
  
                  if HTTP_HEADER.CONTENT_LENGTH in (headers or {}):
                      kb.nullConnection = NULLCONNECTION.SKIP_READ
  
                      infoMsg = "NULL connection is supported with 'skip-read' method"
                      logger.info(infoMsg)
  
      except SqlmapConnectionException, errMsg:
          errMsg = getUnicode(errMsg)
          raise SqlmapConnectionException(errMsg)
  
      kb.pageCompress = popValue()
  
      return kb.nullConnection is not None
function_tokens: def checkNullConnection ( ) : if conf . data : return False infoMsg = "testing NULL connection to the target URL" logger . info ( infoMsg ) pushValue ( kb . pageCompress ) kb . pageCompress = False try : page , headers , _ = Request . getPage ( method = HTTPMETHOD . HEAD ) if not page and HTTP_HEADER . CONTENT_LENGTH in ( headers or { } ) : kb . nullConnection = NULLCONNECTION . HEAD infoMsg = "NULL connection is supported with HEAD header" logger . info ( infoMsg ) else : page , headers , _ = Request . getPage ( auxHeaders = { HTTP_HEADER . RANGE : "bytes=-1" } ) if page and len ( page ) == 1 and HTTP_HEADER . CONTENT_RANGE in ( headers or { } ) : kb . nullConnection = NULLCONNECTION . RANGE infoMsg = "NULL connection is supported with GET header " infoMsg += "'%s'" % kb . nullConnection logger . info ( infoMsg ) else : _ , headers , _ = Request . getPage ( skipRead = True ) if HTTP_HEADER . CONTENT_LENGTH in ( headers or { } ) : kb . nullConnection = NULLCONNECTION . SKIP_READ infoMsg = "NULL connection is supported with 'skip-read' method" logger . info ( infoMsg ) except SqlmapConnectionException , errMsg : errMsg = getUnicode ( errMsg ) raise SqlmapConnectionException ( errMsg ) kb . pageCompress = popValue ( ) return kb . nullConnection is not None