Skip to content

Instantly share code, notes, and snippets.

@KyxRecon
Created March 14, 2017 05:43
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 KyxRecon/b838cdbb568863e5c24b9e5dc88c4b5a to your computer and use it in GitHub Desktop.
Save KyxRecon/b838cdbb568863e5c24b9e5dc88c4b5a to your computer and use it in GitHub Desktop.
hash4gen Playing around with the new hashlib, generates # 6 different hashes. md5,sha1,sha224,sha256,sha384,sha512
#!/usr/bin/python
# hash4gen Playing around with the new hashlib, generates
# 6 different hashes. md5,sha1,sha224,sha256,sha384,sha512
# Creat0r : Kyxrec0n
# visite site : www.kyxhack.blogspot.com for more tools
import sys
try:
import hashlib
except(ImportError):
print "\nYou need the hashlib module installed, try upgrading to python 2.5.\n"
sys.exit(1)
if len(sys.argv) != 2:
print "Usage: ./hash4gen.py <password>"
sys.exit(1)
pw = sys.argv[1]
#hash md5
hash = hashlib.md5(pw)
print "\nMD5:",hash.hexdigest(),"\n"
#hash SHA1
hash = hashlib.sha1(pw)
print "SHA1:",hash.hexdigest(),"\n"
#hash SHA224
hash = hashlib.sha224(pw)
print "SHA224:",hash.hexdigest(),"\n"
#hashSHA256
hash = hashlib.sha256(pw)
print "SHA256:",hash.hexdigest(),"\n"
#hashSHA384
hash = hashlib.sha384(pw)
print "SHA384:",hash.hexdigest(),"\n"
#hashSHA512
hash = hashlib.sha512(pw)
print "SHA512:",hash.hexdigest(),"\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment