From f4d768ca644639f8a283a8e65d7ebbfc5236abdf Mon Sep 17 00:00:00 2001 From: David Maloney Date: Sat, 11 Feb 2012 14:57:13 -0600 Subject: [PATCH] Fix to use the Rex uri_encode method --- lib/msf/core/exploit/vim_soap.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msf/core/exploit/vim_soap.rb b/lib/msf/core/exploit/vim_soap.rb index 3d641cf819..65ddb2bb75 100644 --- a/lib/msf/core/exploit/vim_soap.rb +++ b/lib/msf/core/exploit/vim_soap.rb @@ -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)