Php Effective Anti Injection Script -> No symbol block

Page 3 of 3 FirstFirst 123
Results 51 to 52 of 52
  1. #51
    {{ {{ {{ d[-_-]b }} }} }} Hacke is offline
    MemberRank
    Feb 2007 Join Date
    G to the ERMANYLocation
    318Posts

    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 ^^

  2. #52
    Account Upgraded | Title Enabled! themad is offline
    MemberRank
    Dec 2004 Join Date
    BulgariaLocation
    1,018Posts

    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); 
    Last edited by themad; 04-07-10 at 11:03 AM.



Page 3 of 3 FirstFirst 123

Advertisement