Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save matthw/3869bc7e41ecee80e752cff816dcba1f to your computer and use it in GitHub Desktop.
Save matthw/3869bc7e41ecee80e752cff816dcba1f to your computer and use it in GitHub Desktop.
from base64 import b64decode
from Crypto.Cipher import ARC4
#s = "mpntingadxedMTBjMDc2NGZiNDNiOTYzMjk3NjhkZTRmM2ZlOWMyMGE5NDAwMGUwMzFmMmQ0ZGIxMDdlOGY3ODE4ZWJlMGVhNzlhNTQ="
s = "wfycyqhbrwfxMWFjMWYxOGM1MjljZDI1M2UxNjUzNDY2ZTRlNDYwNDk5MWUxYjc2OTVjODc2YWYxOTI0YTgxYzUwMWQ4NGUzZGIxZjYwMGVjZWViNDhkYTYyMTkyNjQ0MjllYzhhMDUyZjg2MGM3NGEyYjZkYmU="
def decrypt_string(s):
key = s[:12].encode()
data = bytes.fromhex(b64decode(s[12:]).decode())
c = ARC4.new(key=key)
return c.decrypt(data)
print(decrypt_string(s))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment