Home > Perl Stuff, Software Development > Check password quality with Perl

Check password quality with Perl

When you manage some serious system where users can change their passwords you’ll face with problem of quality of those passwords. There is a Perl module – Data::Password, which may do all work to check user passwords: length or the number of character groups. Also, it’s possible to make more complicated checking: the password does not contain the same chars repeatedly or ascending or descending characters, or charcters close to each other in the keyboard. You can use system dictionary files (/usr/share/dict/words for Fedora Core 5, for example) or create you own. The module has only two methods and six variable which can be imported into your script/module to customize checking. Here is a small example of using Data::Password:

  1. use Data::Password qw(:all);
  2.         $DICTIONARY = 0;
  3.         $GROUPS = 0;
  4.         # Will print "Bad password – contains the word ‘clear’, only lowercase"
  5.         print IsBadPassword("clearant");

  1. No comments yet.
  1. No trackbacks yet.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes