Jump to content
xisto Community
Sign in to follow this  
itssami

Password Strength / User Availablity Scripts ?

Recommended Posts

many of u guys would already have noticed that now a days , on most of the websites , when some one sign in...as he puts his desired username in the textbox , the page shows that it is not available or it is available...without pushing any button etc..and the second thing , when some one writes the password , on the same screen , it shows that password is weak or password is strong... i think it is done with php ... can some one give me a link to any page where i can access these scripts ? or some one can help me regarding this ?? Thanks for helping always.

Share this post


Link to post
Share on other sites
AJAX is a reasonably new technique for developing web-based applications where they don't need to be refreshed all the time. Gmail is an example of utilizing AJAX - most of you who use the service would have noticed how whenver you click a link within Gmail's interface, it doesn't seem to load another page or anything. But what you want could be acheived with far simpler JavaScript events.

The strength of a password can be calculated using any programming language. There's not really any set rule as to what makes up a 'strong' password, so no two programs which calculate such values are going to produce identical results; however, users are generally advised to include mixed-case letters (both upper- and lower-case), as well as numbers, and aim for passwords longer than about 8 characters. So most programs which work out how strong a password is use simple rules similar to that.

Share this post


Link to post
Share on other sites

Hi!

For the srength of a password, you should have a look at the so called "crack"-functions. :angry: These are php functions, with which you can analyse passwords. You have to install the extension (since PHP 5 it is no longer bundled to php), than you can use the following code

<?php// Open CrackLib Dictionary$dictionary = crack_opendict('/usr/local/lib/pw_dict')	 or die('Unable to open CrackLib dictionary');// Perform password check$check = crack_check($dictionary, 'gx9A2s0x');// Retrieve messages$diag = crack_getlastmessage();echo $diag; // 'strong password'// Close dictionarycrack_closedict($dictionary);?>

The "crack_check" returns true if the password is OK, than the "crack_getlastmessage" returns "strong password".

You can find further information on this topic at

PHP reference

There you'll find the code from above along with a a little bit detailed explanation of what the functions are doing and a short text about installing the extension!

I hope this helps you!
Greets, Chris

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.