PDA

View Full Version : [DHTML] Password Strength



File
07-08-2007, 03:53 PM
Sorry if my English isn't very good and contains orthographic errors ;)

1) CODE TITLE: Password Strength

2) AUTHOR NAME/NOTES: Albert Filella

3) DESCRIPTION:
"Password Strenght" script displays an attractive strenght password bar. It indicates if a password is safe considering the following tips for create a secure password:

Include punctuation marks or symbols
Mix capital and lowercase letters.
Include numbers.


The zip contains the .js & .html demo file.

thetestingsite
07-08-2007, 04:09 PM
I set up the demo on my home server if anyone wants to check it out without downloading the zip file. The demo can be found here:

http://phphost.smackum.com/dd/pwstrength/

The script is nice, and I could see a use for it in the future on one of the projects that I plan to start within the next few months. So far I have tested it in IE7 and FF2. Not sure about any other browsers yet.

File
07-08-2007, 04:12 PM
i tested it in Safari

thnx for upload it in your site :)

jscheuer1
07-09-2007, 05:34 AM
Works in Opera.

djr33
07-09-2007, 06:17 AM
I like this script. Just added it to a project I'm working on.

There is a major inaccuracy in its calculation, though, in that the length of a password is a major consideration. According to this, aaaaaa and aaaaaaaaaaaaaaaa are there same strength, when this is definitely not the case, especially when talking about brute force, which is likely what this is guarding against.

To fix this, I added a couple lines that, to me, approximate well the influence of the length.
The existing lines before and after are also included. New lines in bold:

if (isSymbol(value) == false) security_level+=1;
if (size-min_length>=2&&security_level<3) security_level++;
if (size-min_length>=5&&security_level<3) security_level++;
if (size-min_length>=8&&security_level<3) security_level++;
if (size<min_length) final_status = minimum;
if (size>=min_length) final_status = security_status[security_level];

File
07-09-2007, 10:13 PM
yes, if password is longer the strength must be higher, but adding these lines the script indicates that (example) "kkkkkkkkkkkkkk" password strength is Strong.


In the next revision i need to merge the size & strength for accurate the result

thnx for all