mirror of
https://github.com/dirtbags/moth.git
synced 2025-01-05 11:30:41 -07:00
19 lines
272 B
Text
19 lines
272 B
Text
|
#! /usr/bin/python
|
||
|
|
||
|
import sys
|
||
|
|
||
|
def xor(s, t):
|
||
|
return ''.join(chr(ord(a) ^ ord(b)) for (a,b) in zip(s,t))
|
||
|
|
||
|
acc = None
|
||
|
for line in sys.stdin:
|
||
|
l = line.strip().decode('hex')
|
||
|
print l
|
||
|
if not acc:
|
||
|
acc = l
|
||
|
else:
|
||
|
acc = xor(acc, l)
|
||
|
print acc
|
||
|
|
||
|
|