In this shot, we are going to learn how to build a password estimator that will help you to determine if your password is secure.
We will be using the zxcvbn
package to build our password estimator. So, let’s get started.
To install the package, run the command below:
pip install zxcvbn
The zxcvbn
package is a Python implementation of the original JavaScript library that was written and implemented by the team at Dropbox.
The original library can be found here.
Below are some points that you should know before using this package:
Now, let’s move on to the code.
from zxcvbn import zxcvbnfirst_password = zxcvbn('cZh34Jlk@139')print(first_password)second_password = zxcvbn('JohnRay123', user_inputs = ['John', 'Ray'])print(second_password)
Explanation:
zxcvbn
.zxcvbn
. This time, we also pass the user_inputs
that are provided by the user while cracking the password.In this way, we can check the strength of our password using Python.