diff --git a/modules/exploits/multi/http/horde_form_file_upload.rb b/modules/exploits/multi/http/horde_form_file_upload.rb index 594fbcd5b8..2c3a0d5aa8 100644 --- a/modules/exploits/multi/http/horde_form_file_upload.rb +++ b/modules/exploits/multi/http/horde_form_file_upload.rb @@ -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)