This program takes in 2 files:
- An
input file
that contains a list of passwords that you want to validate. - A
commonly used passwords file
that contains a list of passwords that are very common that it should not be used
The validation has the following criteria:
- Have an 8 character minimum
- Have a 64 character maximum
- Must be ASCII
- Must not be a commonly used password
- Follow the setup instruction to install
python
and cloning the repo - cd into the root of the program directory
cd NIST-Password-Validator
- run
python password_validator.py [input_file] [commonly_used_password_file]
while replacing
[input_file]
with the path to the file containing a list of passwords you want to check and[commonly_used_password_file]
with the path to the file containing a list of password you want to exclude because they are commonly used. If you need one, please use this Common Password List
- An example:
python password_validator.py input_password.txt commonly_used_password_file.txt
- Sample of successful output includes
--- Attempting to read in weak password validation file ---
--- Validating input password ---
Line [1]: 123456789 -> Error: Too Common
Line [8]: dewed -> Error: Too Short
Line [9]: kckwo -> Error: Too Short
Line [10]: 123456789 -> Error: Too Common
Line [11]: 支持多件包裹打包运输 -> Error: Invalid Characters
Line [14]: verylongtextblobwillexceed64charactersverylongtextblobwillexceed64charactersverylongtextblobwillexceed64charactersverylongtextblobwillexceed64characters -> Error: Too Long
Line [15]: password -> Error: Too Common
Line [16]: 123123 -> Error: Too Short
Line [17]: 多件 -> Error: Too Short, Invalid Characters
--- Printing summary ---
Number of bad password: 9
Number of good password: 10
Number of password found: 19
- Sample of failure output includes
- When command line is invalid
Please check that your input is in the correct format.
python password_validator.py input_password.txt commonly_used_password_file.txt
- When Files does not exist
File does-not-exist.txt is not found.
File does-not-exist2.txt is not found.
- Follow the setup instruction to install
python
and cloning the repo - cd into the root of the program directory
cd NIST-Password-Validator
- run
python password_validator_test.py
.............
----------------------------------------------------------------------
Ran 13 tests in 0.001s
OK
- Let install
homebrew
, a package manager that will help us install python
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install Python through brew
brew install python
- Clone the Repo
git clone https://github.com/Mr-Ming/NIST-Password-Validator.git