Skip to content

Instantly share code, notes, and snippets.

@bruienne
Created November 29, 2017 07:37
Show Gist options
  • Save bruienne/40976d9cbada0e9a201930c57da6a8dc to your computer and use it in GitHub Desktop.
Save bruienne/40976d9cbada0e9a201930c57da6a8dc to your computer and use it in GitHub Desktop.
sudo /usr/libexec/PlistBuddy -x -c 'Print :ShadowHashData' /var/db/dslocal/nodes/Default/users/root.plist | awk '/\t[^\<]/{print $1}' | base64 -D | plutil -convert xml1 -o - -- - | python -c 'import plistlib; import sys; plist = plistlib.readPlistFromString(sys.stdin.read()); print plist["SALTED-SHA512-PBKDF2"]["iterations"]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment