XML/Plist Error



Ruby newbie here. I am trying to use the "ios_config" gem. And when trying to run the sample file the XML/Plist generated doesn't look anything like XML.


I am using the current code:



require 'ios_config'

vpn_payload = IOSConfig::Payload::VPN.new connection_name: "My VPN",
authentication_type: :password,
connection_type: :pptp,
encryption_level: :auto,
proxy_type: :none,
send_all_traffic: true,
server: "example.org",
username: "macdemarco",
password: "viceroy"

payloads = [vpn_payload.build]


profile = IOSConfig::Profile.new type: "Configuration",
display_name: "A Profile Name",
identifier: "org.example.examplemdmservice.exampleprofile",
organization: "A Company Name",
uuid: SecureRandom.uuid,
allow_removal: false,
payloads: payloads

unsigned_profile = profile.unsigned

puts unsigned_profile


And when I run this script it generates this:



bplist00?☺☻♥♦
♫☼►_►↕PayloadDisplayName^PayloadVersion[PayloadUUID_►◄PayloadIdentifier[PayloadT
ype_►↑PayloadRemovalDisallowed_►‼PayloadOrganization^PayloadContent^A Profile Na
me►☺_►$b70bbd3b-7ac6-4c6d-af71-1328d8f4a4e3_►,org.example.examplemdmservice.exam
pleprofile]Configuration ^A Company Name?◄?♣☻♥♦↕‼¶§▬↨↑↓→←∟↔▲▼ "#)01_►↕Pay
loadDescription_►☼UserDefinedNameTIPv4WVPNTypeUIPSecSPPP_►☼OverridePrimaryWProxi
es_►§com.apple.vpn.managed►☺_►$076197a5-667e-4fe5-a13e-a56c04bdc79a_► 076197a566
7e4fe5a13ea56c04bdc79aPVMy VPN?↑!►☺TL2TP?$%&&'(_►¶AuthenticationMethod_►‼LocalId
entifierType\SharedSecretUKeyIDDTest?*+,-./_►◄CommRemoteAddressXAuthName\AuthPas
sword[example.orgZmacdemarcoWviceroy►☺ ↓ . = I ] i ? ? ? ? ? ?☺►☺▲☺▼☺.☺0☺I☺^☺p☺u
☻►☻↕☻↨☻▲☻5☻K☻X☻^☻c☻j☻~☻?☻?☻?☻?☻?☻? ☻☺ 2 ☻?


What am I doing wrong? Sorry if this is a total noob question.


Thank you.


No comments:

Post a Comment