fix: URL encoding userdata

bug/bundler_fix
Javier Godinez 2017-03-17 09:07:22 -07:00
parent 26d344a0ef
commit 534ca8c5cb
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ class MetasploitModule < Msf::Auxiliary
opts['IamInstanceProfile.Name'] = datastore['ROLE_NAME'] unless datastore['ROLE_NAME'].blank?
unless datastore['USERDATA_FILE'].blank?
if File.exist?(datastore['USERDATA_FILE'])
opts['UserData'] = Base64.encode64(open(datastore['USERDATA_FILE'], 'r').read).strip
opts['UserData'] = URI.encode(Base64.encode64(open(datastore['USERDATA_FILE'], 'r').read).strip)
else
print_error("Could not open userdata file: #{datastore['USERDATA_FILE']}")
end