Skip to content

Instantly share code, notes, and snippets.

@msm-code
Created June 1, 2017 16:29
Show Gist options
  • Save msm-code/952cff4c97d78eaee8f05adcef1e1216 to your computer and use it in GitHub Desktop.
Save msm-code/952cff4c97d78eaee8f05adcef1e1216 to your computer and use it in GitHub Desktop.
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