Add docstrings and avoid multiple returns

bug/bundler_fix
James Lee 2014-09-11 10:50:42 -05:00
parent 20e48a233a
commit 9151c2c79d
No known key found for this signature in database
GPG Key ID: 2D6094C7CEA0A321
2 changed files with 5 additions and 4 deletions

View File

@ -12,7 +12,7 @@ module Metasploit
DEFAULT_PORT = 4848
PRIVATE_TYPES = [ :password ]
# @!attribute version
# @!attribute [r] version
# @return [String] Glassfish version
attr_reader :version

View File

@ -35,6 +35,7 @@ module Metasploit
presence: true,
length: { minimum: 1 }
# (see Base#check_setup)
def check_setup
http_client = Rex::Proto::Http::Client.new(
host, port, {}, ssl, ssl_version
@ -48,10 +49,10 @@ module Metasploit
response = http_client._send_recv(request)
if !(response && response.code == 401 && response.headers['WWW-Authenticate'])
return "No authentication required"
"No authentication required"
else
false
end
false
end
# Attempt a single login with a single credential against the target.