Example #1
0
 public function setUp()
 {
     $_SERVER['HTTP_AUTHORIZATION'] = 'NTLM TlRMTVNTUAADAAAAGAAYAG4AAAASARIBhgAAAAYABgBYAAAACgAKAF4AAAAGAAYAaAAAAAAAAACYAQAABQKAAgYDgCUAAAAP5VQScilF+FdimsHOnQS7fk4AQgBMAGEAZABtAGkAbgBOAEIATAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPXUvNaz0xMZF9AAySpcl2AQEAAAAAAAB1+1LJ507QAeCrR1SzQl4pAAAAAAIAAAABABQAbQB5AGMAbwBtAHAAdQB0AGUAcgAEACAAdABlAHMAdABkAG8AbQBhAGkAbgAuAGwAbwBjAGEAbAADACAAbQB5AGMAbwBtAHAAdQB0AGUAcgAuAGwAbwBjAGEAbAAIADAAMAAAAAAAAAABAAAAACAAAKZQUgL77gVAvoZTBPma52m1ag8i/CLRhvKkIk0MQSZBCgAQAAAAAAAAAAAAAAAAAAAAAAAJACoASABUAFQAUAAvAG4AdABsAG0ALgBsAGkAYgByAGEAcgB5AC4AZABlAHYAAAAAAAAAAAAAAAAA';
     $_SESSION['_ntlm_server_challenge'] = 'test';
     $ntlm = new \InterExperts\NTLM\NTLM();
     $verify_hash = function () {
         return true;
     };
     $get_user_hash = function ($user) {
         return true;
     };
     $ntlm->setVerifyHashMethod($verify_hash);
     $ntlm->setGetUserHashMethod($get_user_hash);
     $this->ntlmObject = $ntlm;
 }
Example #2
0
 public function testPhaseThreeDetectsInvalidNTLM()
 {
     $_SERVER['HTTP_AUTHORIZATION'] = 'NTLM TlRMTVNTUAADAAAAGAAYAG4AAAASARIBhgAAAAYABgBYAAAACgAKAF4AAAAGAAYAaAAAAAAAAACYAQAABQKAAgYDgCUAAAAP5VQScilF+FdimsHOnQS7fk4AQgBMAGEAZABtAGkAbgBOAEIATAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPXUvNazAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
     $ntlm = new \InterExperts\NTLM\NTLM();
     $verify_hash = function () {
         return true;
     };
     $get_user_hash = function ($user) {
         return true;
     };
     $ntlm->setVerifyHashMethod($verify_hash);
     $ntlm->setGetUserHashMethod($get_user_hash);
     $ntlm->sessionManager->set('_ntlm_post_data', 'test');
     $ntlm->prompt("testwebsite", "testdomain", "mycomputer", "testdomain.local", "mycomputer.local");
     $this->assertFalse($ntlm->is_authenticated);
 }