- 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
SmackMyBitchUp 10.06.2011 16:04 # 0
Cool.
AlexanderC 10.06.2011 16:05 # 0
AlexanderC 10.06.2011 16:10 # +1
Я тогда тоже могу неймить:
final function hujneaPolnaja( $figPojmiChto )
{
return $figPojmiChto=='h*nea'?true:false;
}
Lure Of Chaos 10.06.2011 16:51 # +1
ку!
AlexanderC 10.06.2011 17:18 # 0
bugmenot 10.06.2011 19:10 # 0
guest 10.06.2011 22:23 # 0
Lure Of Chaos 11.06.2011 18:37 # +2
guest 11.06.2011 20:25 # −1
AlexanderC 10.06.2011 23:20 # 0
guest8 08.04.2019 20:55 # −999
guest8 09.04.2019 10:55 # −999