Created
June 15, 2011 07:12
-
-
Save dpwiz/1026627 to your computer and use it in GitHub Desktop.
Decode FAR password
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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