diff --git a/modules/auxiliary/admin/aws/aws_launch_instances.rb b/modules/auxiliary/admin/aws/aws_launch_instances.rb index c5f6641bc6..457e286a39 100644 --- a/modules/auxiliary/admin/aws/aws_launch_instances.rb +++ b/modules/auxiliary/admin/aws/aws_launch_instances.rb @@ -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