Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions PasswordStrengthChecker/password_strength_checker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import sys
import re

password = sys.argv[1]
regex = re.compile('[@_!#$%^&*()<>?/|}{~:]')

t1 = len(password) >= 8
t2 = not (regex.search(password) is None)
t3 = any(c.islower() for c in password)
t4 = any(c.isupper() for c in password)
t5 = any(c.isdigit() for c in password)

if t1 and t2 and t3 and t4 and t5:
print("Password is STRONG")
else:
print("Password is WEAK")
19 changes: 19 additions & 0 deletions PasswordStrengthChecker/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Password Strength Checker is a simple python scrpt to check if a given password is strong or not.

It checks the following things to decide the strength of a password
- at least characters in length
- at least one lowercase character
- at least one uppercase character
- at least one digit (0-9)
- at least one special character [@_!#$%^&*()<>?/\|}{~:]

**Requirements**
- python3

**Modules used**
- sys
- re

**HOW TO RUN IN TERMINAL**

> python3 password_strength_checker.py *sample_password*