Created
July 31, 2016 22:54
-
-
Save rgegriff/8313882f0e4a45219f27c54e6696267c 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 mesij_decode(s): | |
s = s.replace("\r\n","") | |
normal = '~'+string.uppercase+string.lowercase+string.digits+"+/" | |
rev = "".join(reversed(normal)) | |
rev = "="+rev[:-1] | |
transtab = string.maketrans(normal, rev) | |
ts = string.translate(s, transtab) | |
print normal+"\n"+rev+"\n"+s+"\n"+ts | |
return base64.b64decode(ts) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment