I 'm trying to create a password strength checker using Javascript. What I've done until now is checking the existance of both upper and lower case letters, existence of numbers, existence of at least one special character, length of password and existence of non printable characters.
I've done that by getting the password in the var "value" and using 'ifs' like that:
Language: javascript (GeSHi-highlighted)
if (!(value.match(/[A-Z]/))) {
errorMsg += "\nStrong passwords must include at least one uppercase letter.\n";
}
if (!(value.match(/[a-z]/))) {
errorMsg += "\nStrong passwords must include one or more lowercase letters.\n";
}
Is there a way to check if the password is similar to words from a dictionary which it would be in a txt file?
And also, can I check passwd/etc file by using javascript? If not how can I do that?