Fix to use the Rex uri_encode method

unstable
David Maloney 2012-02-11 14:57:13 -06:00
parent 676a0c53a0
commit f4d768ca64
1 changed files with 2 additions and 2 deletions

View File

@ -445,8 +445,8 @@ module Exploit::Remote::VIMSoap
return :error
end
(ss_folder, ss_file) = screenshot_file.split('/').last(2)
ss_folder = URI.escape(ss_folder, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
ss_file = URI.escape(ss_file, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
ss_folder = Rex::Text.uri_encode(ss_folder)
ss_file = Rex::Text.uri_encode(ss_file)
ss_path = "#{ss_folder}/#{ss_file}"
datastore = vim_get_vm_datastore(vm['ref'])
user_pass = Rex::Text.encode_base64(user + ":" + pass)