From 45e168615710cb8a11c3f3dd9c8c41a48a77e86c Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Tue, 22 Jun 2004 13:05:19 +0000 Subject: [PATCH] added functions to generate LM/NT password hashes --- lam/lib/account.inc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lam/lib/account.inc b/lam/lib/account.inc index c4839835..109876f9 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -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)); +} + ?>