Guest User

Untitled

a guest
May 19th, 2018
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #test.py
  2. import hashlib
  3.  
  4. a = open("accounts.shh", "r")
  5. login1 = a.read()
  6. login2 = login1.split(":")
  7.  
  8.  
  9. user1 = raw_input("enter your username: ")
  10. passwd1 = raw_input("enter your password: ")
  11. md5 = hashlib.md5(passwd1).hexdigest()
  12. if (user1 == login2[0]):
  13. if (md5 == login2[1]):
  14. print "You are logged in."
  15. else:
  16. print "Your password is wrong."
  17. else:
  18. print "You entered wrong username."
  19.  
  20.  
  21.  
  22.  
  23. #accounts.ssh
  24. test:098f6bcd4621d373cade4e832627b4f6
Add Comment
Please, Sign In to add comment