Skip to content

cmccandless/safepass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build StatusPyPI versionUpdatesPython 3

safepass

Check passwords against https://haveibeenpwned.com/API/v2#PwnedPasswords

Usage

For humans

$ safepass
Password: <enter pwned password (masked)>
NOT SAFE!
$ echo $?
1
$ safepass
Password: <enter not-pwned password (masked)>
SAFE!
$ echo $?
0

For scripting

Note: scripting mode intended for situations where command history is not saved. Please use above interactive mode if checking directly in command line.

$ safepass $PASSWORD

API

>>> from safepass import safepass
>>> result=safepass(PWNED_PASSWORD)
NOT SAFE!
>>> result
False
>>> result=safepass(NOT_PWNED_PASSWORD)
SAFE!
>>> result
True