Created
August 6, 2012 13:28
-
-
Save brutus/3274466 to your computer and use it in GitHub Desktop.
tsw decode
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
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
import sys | |
import string | |
trans = string.maketrans( | |
string.lowercase, | |
string.lowercase[13:] + string.lowercase[:13] | |
) | |
def decode(text): | |
return string.translate(text.lower(), trans) | |
if __name__ == '__main__': | |
for filename in sys.argv[1:]: | |
with open(filename) as fh: | |
code = fh.read() | |
print "::", filename | |
print decode(code) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment