Skip to content

Instantly share code, notes, and snippets.

@FoamyGuy
Created June 15, 2014 03:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FoamyGuy/d9b612f29063f82c4459 to your computer and use it in GitHub Desktop.
Save FoamyGuy/d9b612f29063f82c4459 to your computer and use it in GitHub Desktop.
import hashlib
import sys
# Our function to get the MD5 hash of a string
def getMD5Hash(textToHash=None):
return hashlib.md5(textToHash).hexdigest()
f = open(sys.argv[1], 'rb')
s = f.read()
f.close()
print getMD5Hash(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment