Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 18 lines (14 sloc) 549 Bytes
#!/usr/bin/env node
var complexify = require('./lib/complexify');
if (process.argv[2] == undefined) {
console.error("Evaluate password complexity using jquery.complexify.js.");
console.error("Exit with an error if complexity is below the threshold.");
console.error("Usage: " + __filename + " password");
process.exit(1);
}
complexify.evalPasswordComplexity(process.argv[2], function(err, valid, complexity) {
console.log(JSON.stringify({ err: err, valid: valid, complexity: complexity }));
if (!valid) {
process.exit(2);
}
});