implement feedback from @jlee-r7

bug/bundler_fix
FireFart 2013-11-07 23:07:58 +01:00
parent cc3ee5f97b
commit bdd33d4daf
3 changed files with 8 additions and 8 deletions

View File

@ -312,12 +312,12 @@ module Exploit::Remote::HttpClient
end
end
# Returns the complete URI including the scheme and host
# Returns the complete URI as string including the scheme, port and host
def full_uri
uri_scheme = ssl ? 'https' : 'http'
# check if target_uri starts with a /
uri = target_uri.to_s =~ /^\// ? target_uri : "/#{target_uri}"
"#{uri_scheme}://#{rhost}#{uri}"
uri_port = rport.to_s == '80' ? '' : ":#{rport}"
uri = normalize_uri(target_uri.to_s)
"#{uri_scheme}://#{rhost}#{uri_port}#{uri}"
end
#

View File

@ -5,14 +5,14 @@ module Msf::HTTP::Typo3::URIs
#
# @return [String] Typo3 Login URL
def typo3_url_login
normalize_uri(target_uri.path, '/typo3/', 'index.php')
normalize_uri(target_uri.path, 'typo3', 'index.php')
end
# Returns the Typo3 backend URL
#
# @return [String] Typo3 Backend URL
def typo3_url_backend
normalize_uri(target_uri.path, '/typo3/', 'backend.php')
normalize_uri(target_uri.path, 'typo3', 'backend.php')
end
end

View File

@ -39,11 +39,11 @@ class Metasploit3 < Msf::Auxiliary
end
each_user_pass { |user, pass|
enum_user(user,pass)
try_login(user,pass)
}
end
def enum_user(user, pass)
def try_login(user, pass)
vprint_status("#{peer} - Trying username:'#{user}' password: '#{pass}'")
cookie = typo3_backend_login(user, pass)
if cookie