This commit is contained in:
2018-11-13 12:58:56 +01:00
parent 5e0faa3f52
commit c5e51424a1
52 changed files with 387457 additions and 7 deletions

View File

@@ -24,15 +24,22 @@ def main():
f.close()
#temp = bytes([0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0xc0, 0x03, 0x80, 0x02])
#eerste 10 bytes van voorbeeld afbeelding
temp = bytes([0x49,0x47, 0x38, 0x46, 0x61, 0x39, 0x03, 0xc0, 0x02, 0x80])
#temp = bytes([0x49,0x47, 0x38, 0x46, 0x61, 0x39, 0x03, 0xc0, 0x02, 0x80])
#en dan krijg je deze bytes list
#solution = bytes([0x47, 0x3b, 0x57, 0x2b, 0x07, 0xd0, 0x29, 0xdb, 0x3b, 0x82])
#dus blijkbaar was de eerste set van bytes verkerd van volgorde, dus dit is de key die we dan krijgen (met de tweede temp)
#07a70ffe4f233ffbf9dd
#solution = bytes([0xf7, 0xa3, 0x1b, 0x32, 0xb1, 0x56, 0x94, 0x38, 0x3c, 0x90])
#solution = bytes.fromhex("07a70ffe4f233ffbf9dd")
key = bytes.fromhex("0123456789")
key = temp
#4947 3846 6139 03c0 0280
#key = bytes("49473846613903c00280")
#key = bytes.fromhex("0123456789")
#4947 3846 6139 03c0 0280
key = bytes(b'\x49\x47\x38\x46\x61\x39\x03\xc0\x02\x80')
#key = bytes([0x49, 0x47, 0x38, 0x46, 0x61, 0x39, 0x03, 0xc0, 0x02, 0x80])
#key = bytes([0x6e, 0x66, 0x4e, 0x7b, 0x94, 0xae, 0xd2, 0x15, 0xb4, 0xec])
key = bytes(b'\x29\x2f\x08\x43\xad\xcf\x12\x16\x34\xee')
expanded_key = expand_key(key, len(data))
data_encrypted = xor(expanded_key, data)