Skip to content

Instantly share code, notes, and snippets.

@MosheBerman
Last active June 20, 2018 08:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MosheBerman/8e06db9e34707a72883e to your computer and use it in GitHub Desktop.
Save MosheBerman/8e06db9e34707a72883e to your computer and use it in GitHub Desktop.
A Python script to hash domain names.
import hashlib
import sys
try:
website_name = sys.argv[1]
hash_value = hashlib.md5(website_name)
print(hash_value.hexdigest().upper() + ".png")
except Exception, e:
print "Usage: " + sys.argv[0] + " {domain.com}"
@MosheBerman
Copy link
Author

Save this script, then run:

python hash.py domain.com

This example gives us 7905D1C4E12C54933A44D19FCD5F9356.png.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment