from password_strength import PasswordPolicy
      
      policy = PasswordPolicy.from_names(
          length=8,  # min length: 8
          uppercase=2,  # need min. 2 uppercase letters
          numbers=2,  # need min. 2 digits
          special=2,  # need min. 2 special characters
          nonletters=2,  # need min. 2 non-letter characters (digits, specials, anything)
      )
      def password(p):
          res = policy.test(p)
          if (res):
              print("Strong Password")
          else:
              print("Weak Password")
          return 
      # Main method
      psw = input("Enter password: ")
      password(psw)
      

      Python language logo
      Password Strength Checker

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.