Re: [Release] Php Effective Anti Injection Script -> No symbol block
to add this to your web you need to add that scribt into EACH web file that connect with your DATABSE
if there is already a script tag just add it above it if not you need add a sript tag blablabla... like
<?
ADD SQL INJECTION SCRIPT HERE
?>
ok now some ppl may say just add it to index.php since it includes all other stuff (this helps only against total retards^^) but the point is ppl dont need to use index.php they can navigate in the website easy by using ip/characters.php blabla and so on so you need to add it to EACH and i like to repeat it EACH file with db connection to be sure that you are safe ^^
Re: Php Effective Anti Injection Script -> No symbol block
Rephrased:
PHP Code:
function xw_sanitycheck($str){ return strpos(str_replace('\'\'','',' '.$str),'\'') ? str_replace('\'', '\'\'', $str) : $str; }
function secure($str){
if (is_array($str))
foreach($str AS $id => $value)
$str["$id"] = secure($value);
else
$str = xw_sanitycheck($str);
return $str;
}
function secure2(&$str){
return secure($str);
}
secure2($_GET);
secure2($_POST);
secure2($_COOKIE);