Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Decode Mac Open Firmware Password
# I forgot the firmware password on my MacBook Air and didn't want to take it in:
# http://support.apple.com/kb/TS2391
# info
# http://paulmakowski.blogspot.com/2009/03/apple-efi-firmware-passwords.html
# run the following command to retrieve your obfuscated firmware password:
# sudo nvram -p | grep security-password
security_password = "%..."
# take the complement of every second bit:
decode_byte = lambda byte: chr(int(byte, 16) ^ int('10101010',2))
# decode the security password, which contains %-prefixed hex values:
decode = lambda pwd: "".join([decode_byte(x) for x in pwd.split('%') if x != ''])
print(decode(security_password))
@nathany

This comment has been minimized.

Copy link
Owner Author

nathany commented Jun 16, 2011

As much as I appreciate being able to recover my password, Apple should really be using a one-way SHA digest so that it's actually secure.

@darkhelmet

This comment has been minimized.

Copy link

darkhelmet commented Jun 16, 2011

roflcopter

@darkhelmet

This comment has been minimized.

Copy link

darkhelmet commented Jun 16, 2011

ROFL:ROFL:LOL:ROFL:ROFL
_|
L /
LOL=== []
L ______________
| |
-------------/

@darkhelmet

This comment has been minimized.

Copy link

darkhelmet commented Jun 16, 2011

Well that roflcopter failed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.