Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 19:16

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



PHP: SQL Auto Escape

Discussion on PHP: SQL Auto Escape within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1

 
Synatex's Avatar
 
elite*gold: 25
Join Date: Apr 2010
Posts: 1,019
Received Thanks: 331
PHP: SQL Auto Escape

Hi Leute,

paar mal wurde ich nun schon gefragt.. Escaped die MySQLi oder die PDO Funktion denn jetzt wirklich die Werte? Und erst Recht die Leute die noch die älteren Versionen nutzen haben öfter probleme mit SQLi und es ist nervig die ganzen Werte immer zu escapen.. Deshalb hab ich ein Script geschrieben, was Abhilfe schafft. Es zieht sich alle Parameter aus den Queries und checkt diese, unabhängig von dem SQL Server auf dem die laufen, durch.

Mit allen Standard-Queries getestet. Wie es mit größeren umfangreichen aussieht, weiß ich leider noch nicht.

Das Skript:

Benutzung:
PHP Code:
<?php

 
include 'query.secure.class.php';
 
 
$query "SELECT * FROM test WHERE id=$id AND name = $name";

 
$query Query::Secure($query);
 
 
// Weiterverarbeitung

?>
Optional kann man als zweiten Parameter auch noch TRUE übergeben. Damit werden dann alle Zeichen auch noch auf HTML Tags geprüft und diese ebenfalls raus genommen.

Bugs, Verbesserungsvorschläge oder Feedback sind gerne gesehen!
Synatex is offline  
Reply


Similar Threads Similar Threads
Shaiya MultiBot v1.6#Auto potion,auto collection,auto stroke,auto skill
06/01/2012 - Shaiya Hacks, Bots, Cheats & Exploits - 12 Replies
http://d1205.hizliresim.com/x/5/5bjkl.jpg Hello everyone friends. I took off and I wanted to share the new version of Hilemizin. Other editions, a new difference: * Layout option 2.Skill. One trick from Image; http://c1205.hizliresim.com/x/4/59sgl.jpg Use the same fashion as yet. Slot {1} / Flat Beat Flat Beat Talent = 1 you put in the game. That it is the other options we.



All times are GMT +2. The time now is 19:16.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.