Thread: L2CP Reborn.
View Single Post
Old 24.12.2006, 16:29   #2
testdude
Архивный участник
 
Join Date: Nov 2005
Posts: 504
Default

lawl w/e i might aswell be the person to say this

you didnt fix the sql injection
Code:
function checkcookie($where, $cookieuser, $cookiepass, $dbname, $sqladdress, $sqluser, $sqlpass) {
	$cookieuser=antiinjection($cookieuser);
	$cookiepass=antiinjection($cookiepass);
	connectdb($dbname,$sqladdress, $sqluser, $sqlpass);
	if($where==0) {
		$result = mssql_query(sprintf(SELECT_USER_PASS, $cookieuser));
		$rows=mssql_num_rows($result);
		if ($rows>0) {
			$rows=mssql_fetch_assoc($result); 
			extract($rows);
			$password = '0x' . bin2hex($password);
			if(md5($password)==$cookiepass) {
				quickrefresh('home.php');
			} else {
				resetcookies();
			}
		} else {
		resetcookies();
		}
	} elseif($where==1) {
		$result = mssql_query(sprintf(SELECT_USER_PASS, $cookieuser));
		$rows=mssql_num_rows($result);
		if ($rows>0) {
			$rows=mssql_fetch_assoc($result); 
			extract($rows);
			$password = '0x' . bin2hex($password);
			if(md5($password)!=$cookiepass) {
				notloggedin();
			}
		} else {
			notloggedin();
		}
	}
}
that fixes the sql injection kthnx

<3 from l2e the practically ONLY server to have secured l2cp >.>
testdude is offline