Advertisement
Stosswalkinator

Password Strength Checker

Feb 9th, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. from re import compile, search
  2.  
  3. upperRegex = compile(r'[A-Z]')
  4. lowerRegex = compile(r'[a-z]')
  5. digRegex = compile(r'\d')
  6.  
  7. def strongPassword(text):
  8.     if len(text) >= 8 and upperRegex.search(text) and lowerRegex.search(text) and digRegex.search(text):
  9.         return True
  10.     else:
  11.         return False
  12.  
  13. testPass = input()
  14. print(strongPassword(testPass))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement