Skip to content

Instantly share code, notes, and snippets.

@opshope
Created November 17, 2015 18:02
Show Gist options
  • Save opshope/32f65875d45215c3677d to your computer and use it in GitHub Desktop.
Save opshope/32f65875d45215c3677d to your computer and use it in GitHub Desktop.
Decrypt the auto-login password stored in /etc/kcpassword on OSX
sudo ruby -e 'key = [125, 137, 82, 35, 210, 188, 221, 234, 163, 185, 31]; IO.read("/etc/kcpassword").bytes.each_with_index { |b, i| break if key.include?(b); print [b ^ key[i % key.size]].pack("U*") }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment