Created
November 29, 2019 19:02
-
-
Save shreyansh26/391d4103c8175cd3484c286d7c51dfd7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
img = bytearray(open('matrix_modified.bmp', 'rb').read()) | |
key = "matrix" | |
new_f = [] | |
for i, x in enumerate(img): | |
new_f.append(hex(ord(key[i%6]) ^ x)) | |
result = bytes([int(x,0) for x in new_f]) | |
with open("image.bmp", "wb") as newFile: | |
newFile.write(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment