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 DEFAULT_PORT = 4848
PRIVATE_TYPES = [ :password ] PRIVATE_TYPES = [ :password ]
# @!attribute version # @!attribute [r] version
# @return [String] Glassfish version # @return [String] Glassfish version
attr_reader :version attr_reader :version

View File

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