Crack functions

Crack functions

Crack functions allow to use the CrackLib library to test the ’strength’ of a password.
The ’strength’ of a password is tested by that checks length, use of upper and lower case and checked against the specified CrackLib dictionary.
CrackLib will also give helpful diagnostic messages that will help ’strengthen’ the password.

crack_opendict:
————————
Opens a new CrackLib dictionary

Syntax:
————
resource crack_opendict ( string dictionary)

crack_closedict:
———————–
Closes an open CrackLib dictionary.

Syntax:
———–
bool crack_closedict ( [resource dictionary])

crack_check :
———————
Performs an obscure check with the given password

Syntax:
————
bool crack_check ( [resource dictionary, string password])

crack_getlastmessage:
—————————————
Returns the message from the last obscure check

Syntax:
———-
string crack_getlastmessage ( void)

<?php

$dict = crack_opendict(’/usr/local/lib/pw_dict’)
or die(’Unable to open dictionary’);

$check = crack_check($dict, ‘PassWord123′);

$diag = crack_getlastmessage();
echo $diag;

crack_closedict($dict);
?>

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.