diff --git a/modules/exploits/unix/webapp/jira_hipchat_template.rb b/modules/exploits/unix/webapp/jira_hipchat_template.rb index bf9b58c67c..548113229a 100644 --- a/modules/exploits/unix/webapp/jira_hipchat_template.rb +++ b/modules/exploits/unix/webapp/jira_hipchat_template.rb @@ -78,14 +78,7 @@ class Metasploit3 < Msf::Exploit::Remote # # @return [Hash] def get_cookie_as_hash(cookie) - new_cookie = {} - - cookie.split(';').each do |c| - cookie_name, cookie_value = c.scan(/(.+)=(.+)/).flatten - new_cookie[cookie_name.strip] = cookie_value.strip - end - - new_cookie + Hash[*cookie.scan(/\s?([^, ;]+?)=([^, ;]*?)[;,]/).flatten] end @@ -252,7 +245,7 @@ class Metasploit3 < Msf::Exploit::Remote 'method' => 'POST', 'uri' => uri, 'headers' => { 'X-Requested-With' => 'XMLHttpRequest' }, - 'cooke' => "atlassian.xsrf.token=#{xsrf}; JSESSIONID=#{sid}", + 'cookie' => "atlassian.xsrf.token=#{xsrf}; JSESSIONID=#{sid}", 'vars_post' => { 'os_username' => jira_username, 'os_password' => jira_password, @@ -291,8 +284,6 @@ class Metasploit3 < Msf::Exploit::Remote # # @return [Hash] def get_login_prerequisites - prerequisites = {} - uri = normalize_uri(target_uri.path, 'secure', 'Dashboard.jspa') res = send_request_cgi({ 'uri' => uri })