nouveau challenges
This commit is contained in:
1126
rootme/challenges/cryptanalyse/clair-connu-xor/ch3.bmp
Normal file
1126
rootme/challenges/cryptanalyse/clair-connu-xor/ch3.bmp
Normal file
File diff suppressed because one or more lines are too long
BIN
rootme/challenges/cryptanalyse/clair-connu-xor/ch3.out.bmp
Normal file
BIN
rootme/challenges/cryptanalyse/clair-connu-xor/ch3.out.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 484 KiB |
16
rootme/challenges/cryptanalyse/clair-connu-xor/decode.py
Normal file
16
rootme/challenges/cryptanalyse/clair-connu-xor/decode.py
Normal file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
key = "fallen"
|
||||
keysz = len(key)
|
||||
|
||||
f = open("ch3.bmp", mode="rb")
|
||||
data = f.read()
|
||||
f.close()
|
||||
|
||||
out = bytearray()
|
||||
for i in range(len(data)):
|
||||
out.append(data[i] ^ ord(key[(i) % keysz]))
|
||||
|
||||
f = open("ch3.out.bmp", mode="wb")
|
||||
f.write(out)
|
||||
f.close()
|
||||
Reference in New Issue
Block a user