parameters: (self)
docstring: Test HTTP methods and log their status code
          and whether the method is allowed or not.
  
          Args:
              None
  
          Returns:
              None
  
          Raises:
              None
docstring_summary: Test HTTP methods and log their status code
          and whether the method is allowed or not.
docstring_tokens: Test HTTP methods and log their status code and whether the method is allowed or not .
function: def find_http_methods(self):
          """
          Test HTTP methods and log their status code
          and whether the method is allowed or not.
  
          Args:
              None
  
          Returns:
              None
  
          Raises:
              None
          """
          modes_list = ['GET',
                        'POST',
                        'PUT',
                        'DELETE',
                        'OPTIONS',
                        'TRACE',
                        'TEST']
  
          for mode in modes_list:
              resp = requests.request(mode, self.url)
              mode_msg = "{0}: {1} - {2}".format(mode,
                                               resp.status_code,
                                               resp.reason)
              self.logger.log(
                  mode_msg,
                  logtype="info"
              )
  
              if (mode == 'TRACE' and
                  'TRACE / HTTP/1.1' in resp.text):
                  self.logger.log(
                      "Cross Site Tracing vulnerability found.",
                      logtype="warning"
                  )
function_tokens: def find_http_methods ( self ) : modes_list = [ 'GET' , 'POST' , 'PUT' , 'DELETE' , 'OPTIONS' , 'TRACE' , 'TEST' ] for mode in modes_list : resp = requests . request ( mode , self . url ) mode_msg = "{0}: {1} - {2}" . format ( mode , resp . status_code , resp . reason ) self . logger . log ( mode_msg , logtype = "info" ) if ( mode == 'TRACE' and 'TRACE / HTTP/1.1' in resp . text ) : self . logger . log ( "Cross Site Tracing vulnerability found." , logtype = "warning" )