top of page

Ever wondered if your password is strong enough? Consider this password strength checker written in python!
Jan 3
1 min read
0
16
0

Consider the password: terry
Seems weak, but how do we know?
Running the code at the bottom of the page - if we input the term terry we get the following back from python:

If we try tErry - we get:

if we try tE9rry - we get:

And finally if we try tE9rry^ - we get:

Python is using the re library to search initially for lower case letters, then upper case letters, then numbers and finally special characters. If it finds the requisite search item a 1 is returned instead of a zero and the 1s are added together to generate a score from 0-4. An elif statement then just translates the numerical information into something meaningful for the user.

Related Posts
Comments
Share Your ThoughtsBe the first to write a comment.
bottom of page