- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
class sqlinj
{
...
public $liste=array("=","\'","\"","*","\-","declare","char","set","cast","convert","drop","exec","meta","script","select","truncate","insert","delete","union","update","create","where","join","information_schema","table_schema","into");
...
private function tumsorgular($yapilacak){
switch ($yapilacak){
case "post":
$this->islet=array("POST");
break;
case "get":
$this->islet=array("GET");
break;
case "request":
$this->islet=array("REQUEST");
break;
case "aio":
$this->islet=array("POST","GET","REQUEST");
break;
}
foreach($this->islet as $islem){
eval('foreach($_'.$islem.' as $ad=>$deger){
$_'.$islem.'[$ad]=$deger;
foreach($this->liste as $bul){
$_'.$islem.'[$ad]=str_replace($bul,"\\\".$bul."\\\",$_'.$islem.'[$ad]);
}
}
...
}
[url=http://www.phpclasses.org/browse/file/35305.html]Basic SQL Injection Protection[/url]
Cleanup harmful text from request parameters
Взято с phpclasses.org.
Новый тип говнокода- турецкий(описание: расходится по швам при первой носке)
А чё, ... не попортим так хакнем ;D
Cool.
Я тогда тоже могу неймить:
final function hujneaPolnaja( $figPojmiChto )
{
return $figPojmiChto=='h*nea'?true:false;
}
ку!