Results 1 to 6 of 6

Thread: What is the Cracklib in PHP?

  1. #1
    Join Date
    Apr 2009
    Posts
    745

    What is the Cracklib in PHP?

    Hello friends,
    I have doing some advanced coding in PHP programming language. Now I am learning about an extensions for the cryptography. In that I am getting confused with the cracklib. Actually I don't know anything about it. So please explain me what is the Cracklib in PHP? Hope that you got the point. Please reply me as soon as possible.!!

  2. #2
    Join Date
    Jul 2006
    Posts
    286

    Re: What is the Cracklib in PHP?

    I think that you should clear the concepts first. So, I am trying to explain you about the concepts. These functions allow you to use the CrackLib library to test the strength of a password. This strength is tested in relation to the length of the password, using uppercase or lowercase, and using the dictionary CrackLib. CrackLib also provides diagnostic messages very useful to help you in building a word going strong.
    IF you hate me, please don't mention it. I know who hates me and who doesn't. You really do not have to make fun of people....

  3. #3
    Join Date
    Jul 2006
    Posts
    289

    Re: What is the Cracklib in PHP?

    You should know that the extension PECL is not bundled with PHP. In PHP 4, the sources of this PECL extension may be found in the ext / directory within the PHP source or at the PECL link below. If you want to use these functions you must compile PHP with Crack support by using the 'configuration option with crack [= DIR]. Windows users must enable the library php_crack.dll in php.ini to use these functions. In PHP 4 this DLL resides in the extensions / directory within the PHP Windows binaries download.
    Signatures reduce available bandwidth

  4. #4
    Join Date
    Aug 2006
    Posts
    227

    Re: What is the Cracklib in PHP?

    The extension CrackLib defines a dictionary resource, returned by crack_opendict (). crack_opendict () opens the dictionary CrackLib dictionary for use with the function crack_check (). Only one dictionary can be open at once. The Parameters is the dictionary. The path to the dictionary CrackLib. The above parameter returns a resource identifier dictionary on success or FALSE on error.
    I do to dead flowers what people at morgues do to dead people. Suck all the moisture out, dip them in plastic, paint them up pretty and put them in a nice frame.

  5. #5
    Join Date
    Nov 2008
    Posts
    996

    Re: What is the Cracklib in PHP?

    I have provided you with a CrackLib example :
    PHP Code:
    <?php
    $dictionary 
    crack_opendict('/usr/local/lib/pw_dict')
         or die(
    'Unable to open CrackLib dictionary');
     
    $check crack_check($dictionary'gx9A2s0x');
     
    $diag crack_getlastmessage();
    echo 
    $diag

    crack_closedict($dictionary);
    ?>

  6. #6
    Join Date
    Apr 2008
    Posts
    1,948

    Re: What is the Cracklib in PHP?

    You should keep in mind that if crack_check() returns TRUE, crack_getlastmessage() will return 'strong password'. crack_check — Performs an obscure check with the given password. The following is the Description, bool crack_check ( resource $dictionary , string $password ).
    The crack lib dictionary. If not specified, the last opened dictionary is used. Returns TRUE if password is strong, or FALSE otherwise. In addition to the usual checks crack can also check for similarities between the password and a username and gecos field (the gecos field normally contains the person's full name on unix systems).

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,118,636.15934 seconds with 16 queries