Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
217 lines (210 sloc) 5.67 KB
# -*- coding: cp1252 -*-
from Crypto.Hash import *
import hashlib
import zlib
def md2(x):
h = MD2.new()
h.update(x)
print "MD2: "+str(h.hexdigest())
def md4(x):
h = MD4.new()
h.update(x)
print "MD4: "+str(h.hexdigest())
def md5(x):
m=MD5.new()
m.update(x)
print "MD5: " +str(m.hexdigest())
def sha1(x):
m=SHA.new()
m.update(x)
print "SHA1 : " +str(m.hexdigest())
def sha224(x):
m=SHA224.new()
m.update(x)
print "SHA224 : " +str(m.hexdigest())
def sha256(x):
m=SHA256.new()
m.update(x)
print "SHA256 : " +str(m.hexdigest())
def sha384(x):
m=SHA384.new()
m.update(x)
print "SHA384 : " +str(m.hexdigest())
def sha512(x):
m=SHA512.new()
m.update(x)
print "SHA512 : " +str(m.hexdigest())
def ripemd160(x):
m=RIPEMD.new()
m.update(x)
print "RIPEMD160: " +str(m.hexdigest())
def crc32b(x):
h = zlib.crc32(x)
x='%08X' % (h & 0xffffffff,)
print "CRC32b: "+x.lower()
def adler32(x):
h = zlib.adler32(x)
x='%08X' % (h & 0xffffffff,)
print "ADLER32: "+x.lower()
def des(x):
from passlib.hash import des_crypt
hash = des_crypt.encrypt(x)
print "DES Crypt: "+hash
def bsdicrypt(x):
from passlib.hash import bsdi_crypt
hash = bsdi_crypt.encrypt(x)
print "BSDi Crypt: "+hash
def bigcrypt(x):
from passlib.hash import bigcrypt
hash = bigcrypt.encrypt(x)
print "BIGCrypt: "+hash
def crypt16(x):
from passlib.hash import crypt16
hash = crypt16.encrypt(x)
print "Crypt16: "+hash
def md5crypt(x):
from passlib.hash import md5_crypt as mc
hash = mc.encrypt(x)
print "MD5 Crypt: "+hash
def sha1crypt(x):
from passlib.hash import sha1_crypt as mc
hash = mc.encrypt(x)
print "SHA-1 Crypt: "+hash
def sha256crypt(x):
from passlib.hash import sha256_crypt as mc
hash = mc.encrypt(x)
print "SHA-256 Crypt: "+hash
def sha512crypt(x):
from passlib.hash import sha512_crypt as mc
hash = mc.encrypt(x)
print "SHA-512 Crypt: "+hash
def sunmd5(x):
from passlib.hash import sun_md5_crypt as mc
hash = mc.encrypt(x)
print "Sun MD5 Crypt: "+hash
def apachemd5crypt(x):
from passlib.hash import apr_md5_crypt as mc
hash = mc.encrypt(x)
print "Apache's MD5 Crypt: "+hash
def phpass(x):
from passlib.hash import phpass as mc
hash = mc.encrypt(x)
print "PHPass Portable Hash: "+hash
def ctapbkdf2sha1(x):
from passlib.hash import cta_pbkdf2_sha1 as mc
hash = mc.encrypt(x)
print "Cryptacular's PBKDF2 Hash: "+hash
def dlitzpbkdf2sha1(x):
from passlib.hash import dlitz_pbkdf2_sha1 as mc
hash = mc.encrypt(x)
print "Dwayne Litzenberger’s PBKDF2 Hash: "+hash
def apbkdf2sha1(x):
from passlib.hash import cta_pbkdf2_sha1 as mc
hash = mc.encrypt(x)
print "Atlassian’s PBKDF2 Hash: "+hash
def scram(x):
from passlib.hash import scram as mc
hash = mc.encrypt(x)
print "SCRAM Hash: "+hash
def bsdnthash(x):
from passlib.hash import bsd_nthash as mc
hash = mc.encrypt(x)
print "FreeBSD nthash: "+hash
def mysql323(x):
from passlib.hash import mysql323
hash=mysql323.encrypt(x)
print "MySQL 3.2.3: "+hash
def mysql41(x):
from passlib.hash import mysql41
hash=mysql41.encrypt(x)
print "MySQL 4.1: "+hash
def mssql2000(x):
from passlib.hash import mssql2000 as m20
h = m20.encrypt(x)
print "MSSQL 2000: "+h
def mssql2005(x):
from passlib.hash import mssql2005 as m25
h = m25.encrypt(x)
print "MSSQL 2005: "+h
def oracle11(x):
from passlib.hash import oracle11 as m25
h = m25.encrypt(x)
print "Oracle 11g password Hash: "+h
def lmhash(x):
from passlib.hash import lmhash as m25
h = m25.encrypt(x)
print "LanManager Hash: "+h
def nthash(x):
from passlib.hash import nthash as m25
h = m25.encrypt(x)
print "Windows NT-Hash: "+h
def cisco(x):
from passlib.hash import cisco_type7 as m25
h = m25.encrypt(x)
print "Cisco Type 7 Hash: "+h
def djangopsha1(x):
from passlib.hash import django_pbkdf2_sha1 as m25
h = m25.encrypt(x)
print "Django PBKDF2-HMAC-SHA1: "+h
def djangopsha256(x):
from passlib.hash import django_pbkdf2_sha256 as m25
h = m25.encrypt(x)
print "Django PBKDF2-HMAC-SHA256: "+h
def grubpsha512(x):
from passlib.hash import grub_pbkdf2_sha512 as m25
h = m25.encrypt(x)
print "Grub's PBKDF2 Hash: "+h
def fshp(x):
from passlib.hash import fshp as m25
h = m25.encrypt(x)
print "Fairly Secure Hashed Password: "+h
def main():
while(True):
print """
=======================================
Xenotix Hash Calculator | Ajin Abraham
=======================================
"""
x=raw_input("Enter the String:")
if x=="":
x=" "
md2(x)
md4(x)
md5(x)
sha1(x)
sha224(x)
sha256(x)
sha384(x)
sha512(x)
ripemd160(x)
crc32b(x)
adler32(x)
des(x)
bsdicrypt(x)
bigcrypt(x)
crypt16(x)
md5crypt(x)
sha1crypt(x)
sha256crypt(x)
sha512crypt(x)
sunmd5(x)
apachemd5crypt(x)
phpass(x)
ctapbkdf2sha1(x)
dlitzpbkdf2sha1(x)
scram(x)
bsdnthash(x)
mysql323(x)
mysql41(x)
mssql2000(x)
mssql2005(x)
oracle11(x)
lmhash(x)
nthash(x)
cisco(x)
djangopsha256(x)
djangopsha1(x)
grubpsha512(x)
fshp(x)
apbkdf2sha1(x)
main()
You can’t perform that action at this time.