antiblock
Rodnia | Alpha & Omega
  • Chatbox

    Did you check out our Discord? https://discord.gg/FFdvMjk9xA
    You don't have permission to chat.
    Load More
Sign in to follow this  
Cђ๏รєPєтภคร

[Tutorial]Proteger Contra Sql Injection (Ihush)

3 posts in this topic

Boas comunidade,venho postar umas coisas para proteger o habbo.

Proteger contra SQL INJECTION (iHusH)

1º - Ir no ficheiro index.php e procurar por isto :

if(isset($_GET["user"]))
{
$query = mysql_query("SELECT * FROM bans WHERE value = '".$_GET["user"]."' AND expire > UNIX_TIMESTAMP() ORDER BY expire DESC LIMIT 1");
}
elseif(isset($_GET["ip"]))
{
$query = mysql_query("SELECT * FROM bans WHERE value = '".$_GET["ip"]."' AND expire > UNIX_TIMESTAMP() ORDER BY expire DESC LIMIT 1");
}

e trocar por isto :

if(isset($_GET["user"]))

{
$query = mysql_query("SELECT * FROM bans WHERE value = '".$core->EscapeString($_GET["user"])."' AND expire > UNIX_TIMESTAMP() ORDER BY expire DESC LIMIT 1");
}
elseif(isset($_GET["ip"]))
{
$query = mysql_query("SELECT * FROM bans WHERE value = '".$core->EscapeString($_GET["ip"])."' AND expire > UNIX_TIMESTAMP() ORDER BY expire DESC LIMIT 1");
}

Cumprimentos,ChosePetras

Share this post


Link to post
Share on other sites
antiblock
diamwall

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this