Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jan 2011
    Posts
    12

    Default binary plist AKA bplist viewing

    It would be nice if Beyond Compare had a way to view binary plists as XML. Is there any way to add such a viewer?

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,374

    Default

    Hello,

    As a binary file, we would need to run an external conversion to open it as plain text. We have other, similar formats for binary files for download here, but not plist:
    http://www.scootersoftware.com/downl...kb_moreformats

    If you are familiar with any command line utility that can take a plist input and output the xml you wish to compare, we can incorporate its use. We have an example of that here:
    http://www.scootersoftware.com/suppo...rnalconversion
    Aaron P Scooter Software

  3. #3
    Join Date
    Jan 2011
    Posts
    12

    Default

    Quote Originally Posted by Aaron View Post
    If you are familiar with any command line utility that can take a plist input and output the xml you wish to compare, we can incorporate its use.
    /usr/local/bin/PlistBuddy

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,374

    Default

    Hello,

    I believe we can use plutil. How does this work for you?:

    Go to the Beyond Compare menu, File Formats, and create a New (+) Text format. Assign the file mask of *.plist.

    In the Conversion tab, enable an External Conversion, and use this command line:
    plutil -convert xml1 -o %t %s

    Also enable "Disable Editing"
    Aaron P Scooter Software

  5. #5
    Join Date
    Oct 2011
    Posts
    31

    Default

    Quote Originally Posted by Aaron View Post
    Hello,

    I believe we can use plutil. How does this work for you?:

    Go to the Beyond Compare menu, File Formats, and create a New (+) Text format. Assign the file mask of *.plist.

    In the Conversion tab, enable an External Conversion, and use this command line:
    plutil -convert xml1 -o %t %s

    Also enable "Disable Editing"
    Trying this out as we speak.

    Should I be using ANSI or UNICODE here? The above command line you mentioned hold good?
    Loading:
    Code:
    Helpers\Json\plutil -convert xml1 -o %t %s
    Copied plutil.exe to \helpers\plist\ and a whole bunch of dependency .dlls from Apple\Common Files from iTunes install.
    http://forensicswiki.org/wiki/Converting_Binary_Plists

    I am wondering if it would be better to point to the existing file in original folders, if so how?

    Standard Default Output:
    Code:
    C:\Program Files (x86)\Beyond Compare 3\Helpers\plist>plutil
    No files specified.
    plutil.exe: [command_option] [other_options] file...
    The file '-' means stdin
    Command options are (-lint is the default):
     -help          show this message and exit
     -lint          check the property list files for syntax errors
     -convert fmt   rewrite property list files in format
                    fmt is one of: xml1 binary1 json
     -p             print property list in a human-readable fashion without attempting to convert the actual data
                    (not for machine parsing! this 'format' is not stable)
    There are some additional optional arguments:
     -s             be silent on success
     -o path        specify alternate file path name for result;
                    the -o option is used with -convert, and is only
                    useful with one file argument (last file overwrites);
                    the path '-' means stdout
     -e extension   specify alternate extension for converted files
     -r             if writing JSON, output in human-readable form
     --             specifies that all further arguments are file names
    2015-10-23 21:14:57.705 plutil.exe[6960:1364] Windows edition
    Last edited by crashnburn; 23-Oct-2015 at 11:05 AM.

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,374

    Default

    It looks like you setup the files in Helpers\since your Standard Out example looks like it is working.

    Before implementing into Beyond Compare, use the Windows Command line to define an input file and output.txt file, then check if the output is generated as expected. If so, then we should be able to to use the same command line, replacing the literal input and output.txt with %s and %t (source=input and target=output).

    Would this command line work?:
    C:\Program Files (x86)\Beyond Compare 3\Helpers\plutil -convert xml1 -o "c:\test\out.txt" "c:\original file to convert"
    Last edited by Aaron; 23-Oct-2015 at 03:21 PM. Reason: update command line
    Aaron P Scooter Software

  7. #7
    Join Date
    Oct 2011
    Posts
    31

    Default

    Got this working:

    Helpers\plist\plutil.exe -convert xml1 %s -o %t

    Using Unicode option as XML's are typically UTF8. I am wondering if ANSI vs UNICODE in BC is related to something else as it says File"Name". Thoughts?

    I've copied one to local helpers but I have added Apple folder to PATH so I am guessing/ wondering if I can make it run from there as well.. maybe without the helpers path?

  8. #8
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,374

    Default

    That option controls how the file path is passed to the conversion utility. If you expect Unicode characters or are using newer conversion utilities, you can use Unicode. If the conversion utility you are calling does not support Unicode text as parameters, then you would need to use ANSI.

    There are methods of calling items on the Path; if it is properly configured we can reference it outside of Helpers\. I would usually recommend placing the conversion into Helpers\, as our Export process can then gather up those files as well if they are in a subdirectory.
    Aaron P Scooter Software

  9. #9
    Join Date
    Apr 2006
    Location
    Cambridge, UK
    Posts
    37

    Default

    Any chance of getting this added to BeyondCompare? PLIST files are very common on Mac OS. I guess not many BeyonCompare developers are using a Mac.

  10. #10
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,374

    Default

    For which conversion utility? For us to host a tool, it would either need to be packed in the OS by default or have a license that allows us to redistribute it. Otherwise, we provide the instructions above as a customized File Format, which the user can configure with any software they have installed that can function from the command line.
    Aaron P Scooter Software

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •