lib/metasploit/framework/login_scanner/glassfish.rb
def attempt_login(credential)
          result_opts = { credential: credential }

          begin
            case self.version
            when /^[29]\.x$/
              status = try_glassfish_2(credential)
              result_opts.merge!(status: status[:status], proof:status[:proof])
            when /^[34]\./
              status = try_glassfish_3(credential)
              result_opts.merge!(status: status[:status], proof:status[:proof])
           else
              raise GlassfishError, "Glassfish version '#{self.version}' not supported"
            end
          rescue ::EOFError, Rex::ConnectionError, ::Timeout::Error
            result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT)
          end

          Result.new(result_opts)
        end
# Decides which login routine and returns the results
#
# @param credential [Metasploit::Framework::Credential] The credential object
# @return [Result]
Decides which login routine and returns the results
Decides which login routine and returns the results
def attempt_login(credential)
          result_opts = { credential: credential }
          begin
            case self.version
            when /^[29]\.x$/
              status = try_glassfish_2(credential)
              result_opts.merge!(status: status[:status], proof:status[:proof])
            when /^[34]\./
              status = try_glassfish_3(credential)
              result_opts.merge!(status: status[:status], proof:status[:proof])
           else
              raise GlassfishError, "Glassfish version '#{self.version}' not supported"
            end
          rescue ::EOFError, Rex::ConnectionError, ::Timeout::Error
            result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT)
          end
          Result.new(result_opts)
        end
def attempt_login ( credential ) result_opts = { credential : credential } begin case self . version when / ^[29] \. x$ / status = try_glassfish_2 ( credential ) result_opts . merge! ( status : status [ :status ] , proof : status [ :proof ] ) when / ^[34] \. / status = try_glassfish_3 ( credential ) result_opts . merge! ( status : status [ :status ] , proof : status [ :proof ] ) else raise GlassfishError , "Glassfish version '#{self.version}' not supported" end rescue :: EOFError , Rex :: ConnectionError , :: Timeout :: Error result_opts . merge! ( status : Metasploit :: Model :: Login :: Status :: UNABLE_TO_CONNECT ) end Result . new ( result_opts ) end
Decides which login routine and returns the results
Decides which login routine and returns the results
None
Result
credential
The credential object
The credential object