- 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
function check_for_injection($_arr_check) {
$inj = 0;
foreach ($_arr_check as $n=>$v) {
$_text = "SELECT ";
if (strpos(strtoupper($v), $_text)!==false) $inj = 1;
$_text = " SELECT";
if (strpos(strtoupper($v), $_text)!==false) $inj = 1;
$_text = "DELETE ";
if (strpos(strtoupper($v), $_text)!==false) $inj = 1;
$_text = "UPDATE ";
if (strpos(strtoupper($v), $_text)!==false) $inj = 1;
$_text = "INSERT ";
if (strpos(strtoupper($v), $_text)!==false) $inj = 1;
$_text = "LOAD ";
if (strpos(strtoupper($v), $_text)!==false) $inj = 1;
$_text = "DROP ";
if (strpos(strtoupper($v), $_text)!==false) $inj = 1;
$_text = "INTO ";
if (strpos(strtoupper($v), $_text)!==false) $inj = 1;
$_text = "OUTFILE ";
if (strpos(strtoupper($v), $_text)!==false) $inj = 1;
$_text = "CALL ";
if (strpos(strtoupper($v), $_text)!==false) $inj = 1;
}
return $inj;
}
$dd = check_for_injection($_REQUEST);
if ($dd==1) die();