php-ntlm icon indicating copy to clipboard operation
php-ntlm copied to clipboard

NTLM v2 serverside - how ?

Open henrywood opened this issue 6 years ago • 1 comments

Hi !

You have an example of using NTLM v1 here https://loune.net/2007/10/simple-lightweight-ntlm-in-php/

Using this library, how would the code look that achieves the same ?

Thanks in advance !

henrywood avatar Aug 22 '18 16:08 henrywood

The NTLM v1 code linked above is not really recommended since it takes any username the browser supplies and doesn't verify the password hash. If you really want to do this, you could possibly have something like:

function insecure_verify() {
  return true;
}

$auth = ntlm_prompt("testwebsite", "testdomain", "mycomputer", "testdomain.local", "mycomputer.local", null, "insecure_verify");

print_r($auth);

$auth should contain the username/domain. Note I haven't tested the code above and is highly not recommended using this for any type of authentication.

loune avatar Sep 02 '18 12:09 loune