-
-
Save msm-code/952cff4c97d78eaee8f05adcef1e1216 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
def xor_deencrypt(data, key_struct): | |
key = key_struct["7-key"] | |
main_key = key_struct["main_key"] | |
res = "" | |
for c in data: | |
it = key_struct["iter"] | |
key[it % 7] += main_key[it % 128] | |
key[it % 7] &= 0xFF | |
res += chr(ord(c) ^ (key[it % 7])) | |
key_struct["iter"] += 1 | |
return res |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment