ThirtySeven
Member
- Ağu
- 383
- 2
Merhaba arkadaşlar,
Bizzat bana aittir, güle güle kullanın.
Kullanımı :
Bizzat bana aittir, güle güle kullanın.
PHP:
// Anti SQL İnjection Function By SeveNStyLe
FUNCTION anti_sql_injection($text) {
$text=htmlspecialchars($text);
$text=str_replace("'", "SQL Denemesi", $text);
$text=str_replace("update", "SQL Denemesi", $text);
$text=str_replace("UPDATE", "SQL Denemesi", $text);
$text=str_replace("from", "SQL Denemesi", $text);
$text=str_replace("FROM", "SQL Denemesi", $text);
$text=str_replace("drop", "SQL Denemesi", $text);
$text=str_replace("DROP", "SQL Denemesi", $text);
$text=str_replace("select", "SQL Denemesi", $text);
$text=str_replace("SELECT", "SQL Denemesi", $text);
$text=str_replace("delete", "SQL Denemesi", $text);
$text=str_replace("DELETE", "SQL Denemesi", $text);
$text=str_replace("insert into", "SQL Denemesi", $text);
$text=str_replace("INSERT INTO", "SQL Denemesi", $text);
$text=str_replace("where", "SQL Denemesi", $text);
$text=str_replace("WHERE", "SQL Denemesi", $text);
$text=str_replace("procedure", "SQL Denemesi", $text);
$text=str_replace("PROCEDURE", "SQL Denemesi", $text);
$text=str_replace("exec", "SQL Denemesi", $text);
$text=str_replace("EXEC", "SQL Denemesi", $text);
$text=str_replace("--", "SQL Denemesi", $text);
return $text;
}
Kullanımı :
PHP:
$veri = "' delete from userdata --";
echo anti_sql_injection($veri); // Çıktısı SQL Denemesi SQL Denemesi SQL Denemesi userdata SQL Denemesi