Created
January 9, 2018 12:38
-
-
Save chr15m/1620a2f4bb641284fb537e65c11a84c9 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
# two hex encoded strings coming in on stdin | |
# will get xored and output as a hex encoded string | |
import fileinput | |
lines = [l for l in fileinput.input()] | |
print hex(int(lines[0], 16) ^ int(lines[1], 16)).replace("0x", "").rstrip("L") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment