Advertisement
mateon1

Python MD5 dict bruter

Apr 4th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | None | 0 0
  1. MD5FILE="MDlist.txt"
  2. DICTFILE="Dict.txt"
  3. RESULTFILE="BruteRes.txt"
  4.  
  5. import _md5
  6.  
  7. mds=[]
  8. res={} #{MD5:crack,MD5:crack...}
  9. used=[]
  10.  
  11. #md=_md5.new(...)
  12. #z=md.digest()
  13.  
  14. with open(MD5FILE,"r") as mdf:
  15.     mds=mdf.read().split("\n")
  16.  
  17. with open(DICTFILE,"r") as df:
  18.     while True:
  19.         c=df.readline().strip("\n")
  20.         if c in used:
  21.             break
  22.         used.append(c)
  23.         md=_md5.new()
  24.         md.update(c)
  25.         curr=md.hexdigest()
  26.         if curr in mds:
  27.             mds.pop(mds.index(curr))
  28.             res[curr]=c
  29. cRes=""
  30. for k in res:
  31.     cRes+=k+" : "+res[k]+"\n"
  32.  
  33. if len(res)==0:
  34.     print "No results :("
  35. else:
  36.     print "Found "+str(len(res))+" hashes."
  37.  
  38. with open(RESULTFILE,"w") as rf:
  39.     rf.write(cRes)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement