Posts

Create a Password Strength Checker in a Weekend

Introduction Weak passwords are one of the easiest ways hackers gain unauthorized access. Building your own password strength checker is not only fun — it reinforces important principles of secure authentication. 1. Define Strength Criteria Decide the minimum requirements: Length: at least 8–12 characters. Character diversity: uppercase, lowercase, numbers, symbols. Bonus points: no dictionary words, no repeated characters, etc. Example rule structure: python Copy Edit criteria = { "length" : 12 , "uppercase" : 1 , "lowercase" : 1 , "numbers" : 1 , "special" : 1 } 2. Create Check Function Write a Python function to check each criterion and score the password: python Copy Edit import re def check_password_strength ( password ): score = 0 if len (password) >= 12 : score += 1 if re.search( r"[A-Z]" , password): score += 1 if re.search( r"[a-z]...