Created
November 23, 2014 19:29
Revisions
-
Nikki McCavee created this gist
Nov 23, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ #!/usr/bin/env python3 import itertools import string from pprint import pprint from binascii import unhexlify, hexlify def cmp(a, b): xored_b = ''.join(['{:02x}'.format(b ^ 0xFF) for b in unhexlify(b)]) if a == xored_b: print('{}:{} matches'.format(a, b)) else: print('{}:{} x '.format(a, b)) def main(): cmp('29634d75', '8d91d162') cmp('25b14856', '107f0959') cmp('6d4e0fdc', '92b1f023') cmp('c3c36462', '3c3c9b9d') cmp('fc617adb', '260568f5') cmp('3a894ef6', '86d11f43') cmp('ddd87290', '22278d6f') cmp('91612be2', '6e9ed41d') cmp('9ef66c9f', '60692649') cmp('fb3549e8', 'a9a871d5') main()