cryptopals

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 1fad9e324e885a7f1f5730b6a891b92790d78116
parent a6339e4a62490d0ca5e2da2d3dd55e9874f59452
Author: mpizzzle <michael770211@gmail.com>
Date:   Fri,  6 Oct 2017 17:06:58 +0100

set 1 challenge 3 complete

Diffstat:
Aset1/single_byte_xor_cipher.py | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/set1/single_byte_xor_cipher.py b/set1/single_byte_xor_cipher.py @@ -0,0 +1,8 @@ +import sys + +hex = "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736" + +for x in range(128): + plaintext = ''.join([chr(x ^ ord(a)) for a in hex.decode("hex")]) + if " a " in plaintext: + print plaintext+ \ No newline at end of file