Properly Formatted Properties…

Some time last week I replied to telepati and mentioned that some of the device properties were broken in his setup.

The Problem

Sometimes you want (property name) Data <“desired text”> instead of (property name) Data <646573697265642074657874>. This is possible. If you know how to do it. I do as can be seen on the following screenshots:

Anyway. I happen to have a little script for it that I like to share with you today. Here it is:


# Script ( to convert a string to base64 data in a way that it can be
# used for properties as text instead of hex data.
# Version 1.1 - Copyright (c) 2013-2016 by Pike R. Alpha

# Get input from user.

read -p "Enter string to convert: " string

# Convert to postscript format.

data=$(echo -n "${string}"|xxd -ps|tr -d '\n')

# Add "00" to the data and convert it to base64 data.

echo -n "${data}00"|xxd -r -p|base64

You can get this script, which I called, from my Github repository. Run it. Fix your property string data like a pro. This way you won’t have to scratch your head when you see those funny hex characters 😉

Edit: You can also use my script for the following device-properties:


20 thoughts on “Properly Formatted Properties…

    • The problem is that Xcode doesn’t know when you need the trailing 00.

      I don’t know why you would want have an iOS App for, it but an App for OS X/MacOS X is probably simple and I am sure that someone will develop one, one day soon.

  1. Thank you Pike. But I am really stupid about this code thing.
    Which string I must to enter? on the model on the device_type? or I understand everything wrong again?

      • This is the last time to asking for you. I don’t know but It still doesn’t work for me. I entered “Intel HD Graphics 530” for string click to enter and check on the ioreg its still show model as hex data. Here is the terminal output;

        Last login: Mon Nov  7 23:44:38 on ttys000
        Murats-Hackintosh:~ muratozgul$ /Users/muratozgul/Desktop/ ; exit;
        Enter string to convert: Intel HD Graphics 530
        Saving session...
        ...copying shared history...
        ...saving history...truncating history files...
        [Process completed]
      • Running the script is not enough. All the script does is convert your input into a base64 data string. One that you need to use for the property that you want changed.

  2. Your screenshot shows (R) and (TM), but I’m not sure that is correct, as the IOJones dump I sent you from that MacbookPro13,1 has the model without (R) and (TM).

  3. Hello piker, not sure if this is the best place to share this, but I don’t see another way. I just learned about a interesting tool, you may know it already but just wanted to share it with you just in case… Facebook’s new open source wonder app, osquery Allows you to list anything in your OS, even acpi tables and tons of other cool stuff with an SQL syntax..

  4. Hi Piker! I couldn’t help but notice that you have the Iris Pro 580 working in Mac OS Sierra. What did you do to make it work? Mine worked fine in El Capitan, but when I upgraded to Sierra, I get “graphics driver failed to load could not register with framebuffer driver” when booting in verbose mode. System profiler says “Intel Iris Pro Graphics 580 6 MB” and “Kernel Extension Info: No Kext Loaded”. This make the screen flicker with artefacts…

    It’s an Intel NUC Skull Canyon (NUC6i7KYK).

    I have done everything according to Rehabman’s guide for the NUC over at tonymacx86, and it worked great until Sierra came along. I have used your to make my SSDT.aml file. My ig-platform-id is set to 0x193b0000 and Intel inject is set to YES. SMBIOS is set to iMac 17,1.

    I am clueless as what to do next… and then I saw the screenshot above. I was hoping that you may have a tip as what to try next?

    Thank you for the great work you are doing for the hacker community!

  5. I create a test named test.plist by xcode for testing. I convert a string via your script, for example: display->ZGlzcGxheQA=,then add new item in test.plist which type is data and value ZGlzcGxheQA=,

    New item

    at last, reopen it with xcode, the item is show . not ,what wrong with me??

    • You clearly don’t understand the meaning of the script, and what you can/should do with the generated output. I mean what you have there (ZGlzcGxheQA=) is “display” with a trailing NULL character. Or is the name property showing an incorrect value?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s