The little things give you away... A collection of various small helper stuff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

17 lines
224 B

  1. #!/usr/bin/env python3
  2. import sys
  3. def decode(s):
  4. s = bytes.fromhex(s)
  5. return ''.join(chr(i ^ s[0]) for i in s[1:])
  6. if len(sys.argv) > 1:
  7. it = sys.argv[1:]
  8. else:
  9. it = sys.stdin
  10. for s in it:
  11. print(decode(s.strip()))