added functions to generate LM/NT password hashes

This commit is contained in:
Roland Gruber 2004-06-22 13:05:19 +00:00
parent fb0c424d88
commit 45e1686157
1 changed files with 20 additions and 0 deletions

View File

@ -159,4 +159,24 @@ function smbflag($input) {
return $flag;
}
/**
* Generates the LM hash of a password.
*
* @param string password original password
* @return string password hash
*/
function lmPassword($password) {
return exec(escapeshellarg($_SESSION['lampath'] . 'lib/createntlm.pl') . " lm " . escapeshellarg($password));
}
/**
* Generates the NT hash of a password.
*
* @param string password original password
* @return string password hash
*/
function ntPassword($password) {
return exec(escapeshellarg($_SESSION['lampath'] . 'lib/createntlm.pl') . " nt " . escapeshellarg($password));
}
?>