Skip to content

Commit

Permalink
Remove jsessionid parsing now that keep_cookies is being used
Browse files Browse the repository at this point in the history
  • Loading branch information
jheysel-r7 authored Sep 23, 2024
1 parent 30e6af7 commit e0e7c67
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions modules/exploits/linux/http/traccar_rce_upload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,6 @@ def prepare_setup
fail_with(Failure::Unreachable, 'Failed to receive a reply from the server.')
end

jsessionid = res.get_cookies.scan(/JSESSIONID=([^;]+)/).flatten[0]
fail_with(Failure::UnexpectedReply, 'JSESSIONID not found.') unless jsessionid
vprint_status("JSESSIONID: #{jsessionid}")

json = res.get_json_document
unless res.code == 200 && json['name'] == datastore['USERNAME'] && json['email'] == datastore['EMAIL']
print_status('Provide the correct password for the existing E-Mail address, or provide a new E-Mail address.')
Expand Down Expand Up @@ -178,10 +174,6 @@ def prepare_setup
fail_with(Failure::Unreachable, 'Failed to receive a reply from the server.')
end

jsessionid = res.get_cookies.scan(/JSESSIONID=([^;]+)/).flatten[0]
fail_with(Failure::UnexpectedReply, 'JSESSIONID not found.') unless jsessionid
vprint_status("JSESSIONID: #{jsessionid}")

json = res.get_json_document
unless res.code == 200 && json['name'] == datastore['USERNAME'] && json['email'] == datastore['EMAIL']
fail_with(Failure::UnexpectedReply, 'Received unexpected reply:\n' + json.to_s)
Expand Down

0 comments on commit e0e7c67

Please sign in to comment.