module Pliney

Note this implementation only works with little-endian mach-o binaries such as ARM and X86. Older PPC mach-o files are big-endian. Support could be pretty easily added just by conditionally swapping in the IOHelper addons for read_uintXXbe instead of read_uintXXle where appropriate

Constants

VERSION

Public Class Methods

parse_plist(rawdat) click to toggle source
# File lib/pliney/util.rb, line 6
def self.parse_plist(rawdat)
    plist = CFPropertyList::List.new(data: rawdat)
    return CFPropertyList.native_types(plist.value)
end
write_plist(data, outpath, format = CFPropertyList::List::FORMAT_XML) click to toggle source
# File lib/pliney/util.rb, line 11
def self.write_plist(data, outpath, format = CFPropertyList::List::FORMAT_XML)
    plist = CFPropertyList::List.new
    plist.value = CFPropertyList.guess(data)
    plist.save(outpath, format)
end