-
Install the dependencies
$ pip install -r requirements.txt
-
Run and pass image directory as parameter using either relative or absolute path
The sample dir
sample_img
contains only one image,sample.png
, resulting in the below output:$ python -m main sample_img Your password password has been leaked 3730471 times! Your password secret123 has been leaked 17080 times! Your password hello has been leaked 253581 times! Password vr8lo9iPekJhBO6 has not been leaked!
To "obscure" the output, set
obscured
toTrue
formain
(main(IMAGE_NAMES, obscured=True)
) inmain.py
:Your password p*s*w*r*d has been leaked 3730471 times! Your password s*c*e*1*3 has been leaked 17080 times! Your password h*l*o has been leaked 253581 times! Password v*8*o*i*e*J*B*6 has not been leaked!
Note that white space is intentionally stripped from both input and output when reading passwords from an image.
- python >= 3.7 (Not tested with lower versions but will require at least 3.6 due to f-strings)
- requests - Requests
- Pillow - Pillow
- pytesseract - Python-tesseract
-
Using Pwned Passwords API to check passwords
-
Based on a project in the course Complete Python Developer in 2020: Zero to Mastery
The course teaches how to use the Pwned Passwords API to check if a password has been leaked. The code in this project is mainly my implementation and extension of the course project. I then added the read from image feature and have plans to improve it further by using a custom trained model.