Jump to content

Recommended Posts

Full Path Disclosure:

http://76.98.141.11/game/index.php?act[]

Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in H:\xampp\htdocs\game\functions.php on line 125

 

Full Path Disclosure - SQL Error:

http://76.98.141.11/game/index.php?act=profile&id='

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\\\\\\\'' at line 1

 

Full Path Disclosure:

http://76.98.141.11/game/index.php?act=profile&id[]

Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in H:\xampp\htdocs\game\functions.php on line 125

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

 

SQL:

http://76.98.141.11/game/index.php?act=profile&id=a

Unknown column 'a' in 'where clause'

 

Full Path Disclosure:

http://76.98.141.11/game/index.php?act=report&id[]

Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in H:\xampp\htdocs\game\functions.php on line 125

 

Full Path Disclosure:

http://76.98.141.11/game/admin.php

Fatal error: Call to undefined function errorbox() in H:\xampp\htdocs\game\admin.php on line 125

Ok, I think I got most of it fixed? Also, you get that error on the admin page because it don't allow direct access.  Most of the files don't.  :P

 

Should add

if( basename( __FILE__ ) == basename( $_SERVER['PHP_SELF'] ) )
{
  exit();
}

 

or

 

defined('DIRECT_ACCESS') || die("Don't access this file directly.");

 

At the top of admin.php.

CAPTCHA:

The solution for the CAPTCHA is on the page.

 

SQL Error:

http://76.98.141.11/game/index.php?act=profile&id=1'

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\\\\\\\'' at line 1

 

SQL Injection:

http://76.98.141.11/game/index.php?act=profile&id=16 AND 1=1

http://76.98.141.11/game/index.php?act=profile&id=16 AND 1=2

Ok, How do I stop a SQL injection. I read guides but they don't seem to help.  I made a protect command but I guess it don't work. lol

 

    $string = mysql_real_escape_string($string);
    $string = strip_tags($string);
    $string = addslashes($string);
    $string = htmlspecialchars($string, ENT_QUOTES);
    $IP = $_SERVER['REMOTE_ADDR'];
    return $string;

		if (get_magic_quotes_gpc())
	{
  		$string = stripslashes($string);
	} 
    $string = mysql_real_escape_string($string);
    $string = strip_tags($string);
    $string = htmlspecialchars($string, ENT_QUOTES);
    $IP = $_SERVER['REMOTE_ADDR'];
    return $string;

 

I'm still able to do injects it seems...

<?php

/* safe_sql($p)
**
** Argument type
**  - String 
**  - Array
**
** Return value
**  - String if string was passed
**  - Array if array was passed
*/
function safe_sql($params) {
$safe = array();

if( is_array($params) ) {
	foreach( $params as $p ) {
		$safe[] = safe_sql($p);
	}
} else {
	if( get_magic_quotes_gpc() ) {
		$params = stripslashes($params);
	}

	$safe = "'".mysql_real_escape_string($params)."'";
}

return $safe;
}

$safe = safe_sql("Bad input ' hax ");
$_GET = safe_sql($_GET); // Get is now SQL safe, ( not recommended, sanitize individual values )

 

Try that out, you need to wrap your values in quotes.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.