cryptopals

https://cryptopals.com/
Log | Files | Refs

single_byte_xor_cipher.py (223B)


      1 hex = "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736"
      2 
      3 for plaintext in [''.join([chr(x ^ ord(a)) for a in hex.decode("hex")]) for x in range(256)]:
      4     if " a " in plaintext:
      5         print plaintext