Skip to content

Instantly share code, notes, and snippets.

@brutus
Created August 6, 2012 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brutus/3274466 to your computer and use it in GitHub Desktop.
Save brutus/3274466 to your computer and use it in GitHub Desktop.
tsw decode
#!/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)
print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment