password-blacklist
v1.1.1
Published
Check passwords against a blacklist
Downloads
386
Maintainers
Readme
Password Blacklist
Checks a password against lists of passwords found at https://github.com/danielmiessler/SecLists.
API
Async Version
The async version is better for memory management because it scans the file for the filter, but it is slower. Use this if you are worried about memory usage.
const isPasswordBlacklisted = require('password-blacklist')
isPasswordBlacklisted('123456').then((blacklisted) => {
if (blacklisted) console.error('this password is blacklisted')
})
Synchronous Version
The synchronous version stores the entire list of passwords in memory and is faster.
const isPasswordBlacklisted = require('password-blacklist/in-memory')
const blacklisted = isPasswordBlacklisted('123456')
if (blacklisted) console.error('this password is blacklisted')