implement feedback from @jlee-r7
parent
cc3ee5f97b
commit
bdd33d4daf
|
@ -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
|
||||
|
||||
#
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue