changed if not to unless
parent
b56e171172
commit
4018d47b65
|
@ -96,7 +96,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
|
||||
if res && res.code == 200
|
||||
source_tokens = res.body.scan(/turba\/add\.php\?source=(.+)"/).flatten
|
||||
if not source_tokens.empty?
|
||||
unless source_tokens.empty?
|
||||
form_tokens = res.body.scan(/name="turba_form_addcontact_formToken" value="(.+)"/).flatten
|
||||
return source_tokens[0], form_tokens[0], res.get_cookies
|
||||
end
|
||||
|
@ -108,7 +108,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
vprint_status("Authenticating using #{username}:#{password}")
|
||||
|
||||
cookie = horde_login(username, password)
|
||||
fail_with(Failure::NoAccess, 'Unable to login. Verify USERNAME/PASSWORD or TARGETURI.') if cookie.nil?
|
||||
fail_with(Failure::NoAccess, 'Unable to login. Verify USERNAME/PASSWORD or TARGETURI.') if cookie.nil? || cookie.empty?
|
||||
vprint_good("Authenticated to Horde.")
|
||||
|
||||
tokens = get_tokens(cookie)
|
||||
|
|
Loading…
Reference in New Issue