Skip to content

Instantly share code, notes, and snippets.

@dpwiz
Created June 15, 2011 07:12
Show Gist options
  • Save dpwiz/1026627 to your computer and use it in GitHub Desktop.
Save dpwiz/1026627 to your computer and use it in GitHub Desktop.
Decode FAR password
def decode(pwd):
"""Decode FAR password"""
pwd = [int(pwd[i:i+2], 16) for i in xrange(0, len(pwd), 2)]
print 'bytes:', pwd
seed = (pwd[0] ^ pwd[1]) | 0x50
print 'password:', ''.join(chr(pwd[i] ^ seed) for i in xrange(2, len(pwd)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment