skip to main |
skip to sidebar
Name |
User |
Perms |
Com |
Modified |
Label |
Filename |
cách filter(lọc) ký tự để tránh bị khai thác Sqli(sql injection) |
Permission |
rw-r--r-- |
Author |
Unknown |
Date and Time |
09:40 |
Label |
hacker - Bảo Mật
|
Action |
|
function chong_loi_code($str){
$a = "/(\'|\"|\=|\(|\)|\-|union|select|from|order|group|by|tables?|\#|\s|or|and|\_|\/|\!|\*|\%|\+)/";
preg_match_all($a,$str,$kq);
if(isset($kq[0])){
foreach($kq[0] as $loi){
$str = strip_tags(preg_replace($loi,NULL,$str));
}
if (preg_match_all($a,$str,$kq)){
chong_loi_code($str);
}
else{
return $str;
}
}
}
0 nhận xét:
Đăng nhận xét