downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Funciones de crack> <Constantes predefinidas
Last updated: Fri, 20 May 2011

view this page in

Ejemplos

Este ejemplo muestra cómo abrir un diccionario de CrackLib, testear una contraseña, recibir cualquier mensaje de diagnóstico, y cerrar el diccionario.

Example #1 Ejemplo CrackLib

<?php
// Abrir el diccionario de CrackLib
$diccionario crack_opendict('/usr/local/lib/pw_dict')
     or die(
'No se ha podido abrir el diccionario de CrackLib');

// Realizar la comprobación de la contraseña
$check crack_check($diccionario'gx9A2s0x');

// Retrieve messages
$diag crack_getlastmessage();
echo 
$diag// 'contraseña segura'

// Cerrar el diccionario
crack_closedict($diccionario);
?>

Note:

Si la función crack_check() devulve TRUE, la función crack_getlastmessage() devolverá el mensaje 'contraseña segura'.



add a note add a note User Contributed Notes Ejemplos
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites