Skip to content

Instantly share code, notes, and snippets.

@mre
Created January 23, 2014 00:05
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 mre/8570188 to your computer and use it in GitHub Desktop.
Save mre/8570188 to your computer and use it in GitHub Desktop.
Leetspeak is the ultimate weapon of every hacker. Join the force, yeah!
#!/usr/bin/python
"""
Usage from commandline:
python l33t.py "Can i haz cheezburgerz"
"""
from string import maketrans # Required to call maketrans function.
from sys import argv
def to_l33t(string):
n00b = "abeghilost"
l33t = "48364!1057"
to_l33t = maketrans(n00b, l33t)
return string.translate(to_l33t).upper()
try:
print to_l33t(argv[1])
except:
print to_l33t("all your base are belong to us")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment