24 lines
630 B
Python
24 lines
630 B
Python
import sys
|
|
import hashlib
|
|
|
|
passwordListFile = sys.argv[1]
|
|
passwords = [ ]
|
|
hashArr = []
|
|
hashDictonary = { }
|
|
index = 0
|
|
|
|
passwordFile = open(passwordListFile)
|
|
passwordList = passwordFile.readlines()
|
|
|
|
for password in passwordList:
|
|
if not password.startswith("#!comment:"):
|
|
passCleanEncoded = password.rstrip().lstrip().encode("utf_16_le")
|
|
hash = hashlib.new("md4")
|
|
hash.update(passCleanEncoded)
|
|
hashDictonary[hash.hexdigest()] = password
|
|
|
|
hashDictonarySorted = sorted(hashDictonary)
|
|
|
|
for hashEntry in hashDictonarySorted:
|
|
msg = hashEntry + ":" + hashDictonary[hashEntry]
|
|
print(msg.rstrip()) |