Fix cookie parsing, typo, and unused var
parent
682a41af2e
commit
0e21265ecc
|
@ -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 })
|
||||
|
||||
|
|
Loading…
Reference in New Issue