grandfathermagic

common_passwords

Apr 27th, 2020
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.83 KB | None | 0 0
  1. common_passwords = """
  2. 123456
  3. password
  4. 123456789
  5. 12345678
  6. 12345
  7. 111111
  8. 1234567
  9. sunshine
  10. qwerty
  11. iloveyou
  12. princess
  13. admin
  14. welcome
  15. 666666
  16. abc123
  17. football
  18. 123123
  19. monkey
  20. 654321
  21. !@#$%^&*
  22. charlie
  23. aa123456
  24. donald
  25. password1
  26. qwerty123
  27. """
  28.  
  29. # common_passwords_file.seek(0) - will be deleted in the future
  30. # common_passwords = common_passwords_file.readlines() - will be deleted in the future
  31.  
  32.  
  33. password = input("Please Enter your password")
  34. i = 0
  35. common_passwords = common_passwords.split("\n")
  36. print(type(common_passwords))  # to make sure i am getting a list
  37. while i <= len(common_passwords):
  38.     if password in common_passwords[i]:
  39.         print("you should really think about changing your password")
  40. #       print(f"it's on the {i}")
  41.         i += 1
  42.     else:
  43.         print("It's a good password")
  44.         break
Advertisement
Add Comment
Please, Sign In to add comment