Last active
August 20, 2021 15:58
-
-
Save GordonOus/c5ee2b27c964201e60d2b8e84a3f1c97 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
import string | |
from binascii import unhexlify | |
encrypted = unhexlify(open('msg.enc','r').read()) | |
plaintext = [] | |
#brute force the encryption logic | |
for b in encrypted: | |
for ch in string.printable: | |
if ((123 * ord(ch) + 18) % 256 == b): | |
plaintext.append(ch) | |
break | |
print(''.join(plaintext)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment