Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. import crypt
  2. import os
  3. import sys
  4. import random
  5. import string
  6. from hashlib import *
  7. from base64 import *
  8. hac = ""
  9. with open("500_passwords.txt","r") as f:
  10. listPwd = f.read().splitlines()
  11. for testPwd in listPwd:
  12. hashPwd = "khoama1000:$6$RNA4tEKU$leYP6L7pGF1cZ3AhT4KSzw/aCjxStrkBn5.jKcv7OtDjG0htEBbHzcrogrLCb05wJ3x1oOVaRwFXguKm8fUST.:17820:0:99999:7:::"
  13. salt_SHA512 = []
  14. hash_SHA512 = []
  15. if "$6$" in hashPwd:
  16. temp1 = hashPwd.split(":")
  17. temp1 = temp1[1]
  18. salt_SHA512.append(temp1[:11])
  19. hash_SHA512.append(temp1)
  20. h = crypt.crypt(testPwd, salt_SHA512[0])
  21. if h in hashPwd:
  22. print("Password is : "+(testPwd))
  23. hac = h
  24. sys.exit(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement