WWW.UNKNOWNS.RO
WWW.UNKNOWNS.RO
Lista Forumurilor Pe Tematici
WWW.UNKNOWNS.RO | Reguli | Inregistrare | Login

POZE WWW.UNKNOWNS.RO

Nu sunteti logat.
Nou pe simpatie:
simpatica_dorina la Simpatie.ro
Femeie
19 ani
Arad
cauta Barbat
32 - 44 ani
WWW.UNKNOWNS.RO / English [Guid's] / [Guide] Anti DB Injection Script Moderat de zerich25, zpetry
Autor
Mesaj Pagini: 1
VIRUS
WWW.UNKNOWNS.RO

Din: WWW.UNKNOWNS.RO
Inregistrat: acum 16 ani
Postari: 3176
Meny of you made a MuOnline server and have ben hacked ( DB Injection ) wich have destroyed account's and the site.
I have a script for protecting from DB injection's.
You can put the script in index.php and after you put it make run in ODBC and DONE.
Script

Code:

// Begin
/*
    The muonline xweb base injection filter script
        Mssql Injection Filter, Includes arrays
-----------------------------------------------------------------
           Changelog: mu.vachev.net?mod=xweb
*/

function xw_sanitycheck($str){
    if(strpos(str_replace("''",""," $str"),"'")!=false)
        return str_replace("'", "''", $str);
    else
        return $str;
}

function secure($str){
    // Case of an array
    if (is_array($str)) {
        foreach($str AS $id => $value) {
            $str[$id] = secure($value);
        }
    }
    else
        $str = xw_sanitycheck($str);

    return $str;
}

// Get Filter
$xweb_AI    = array_keys($_GET);
$i=0;
while($i<count($xweb_AI)) {
    $_GET[$xweb_AI[$i]]=secure($_GET[$xweb_AI[$i]]);
    $i++;
}
unset($xweb_AI);

// Request Filter
$xweb_AI    = array_keys($_REQUEST);
$i=0;
while($i<count($xweb_AI)) {
    $_REQUEST[$xweb_AI[$i]]=secure($_REQUEST[$xweb_AI[$i]]);
    $i++;
}
unset($xweb_AI);

// Post Filter
$xweb_AI    = array_keys($_POST);
$i=0;
while($i<count($xweb_AI)) {
    $_POST[$xweb_AI[$i]]=secure($_POST[$xweb_AI[$i]]);
    $i++;
}

// Cookie Filter (do we have a login system?)
$xweb_AI    = array_keys($_COOKIE);
$i=0;
while($i<count($xweb_AI)) {
    $_COOKIE[$xweb_AI[$i]]=secure($_COOKIE[$xweb_AI[$i]]);
    $i++;
}
// End



_______________________________________


pus acum 16 ani
   
Pagini: 1  

Mergi la