if (!$data) {
            return false;
        }
        $crypt = base64_decode($data);
        //Optional Part, only necessary if you use other encryption mode than ECB
        $iv_size = mcrypt_get_iv_size($this->Algo, MCRYPT_MODE_ECB);
        $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
        $decrypt = mcrypt_decrypt($this->Algo, $this->Key, $crypt, MCRYPT_MODE_ECB, $iv);
        return trim($decrypt);
    }
}
//Creating a new instance of the crypter with RIJNDAEL_256 encryption
$userPost = $_POST["user"];
$crypter = new Crypter($passphrase, MCRYPT_RIJNDAEL_256);
$foo = new Foo();
$foo->foo1();
$foo->foo2();
class foo
{
    public function foo1()
    {
        $i = 0;
        $userCount = $GLOBALS["userCount"];
        while ($i < $userCount) {
            $data = "user" . $i;
            $export = "safeUser" . $i;
            $data = $GLOBALS[$data];
            $GLOBALS[$export] = $GLOBALS["crypter"]->Encrypt($data);
            $i = $i + 1;
        }
    }
示例#2
0
<?php

//
// simple static methods: wrappers around sinks
Foo::foo1($evil, "ok");
class Foo extends Bar
{
    function foo1($fp1, $fp2)
    {
        echo $fp1;
        echo $fp2;
        echo $_GET['x'];
    }
}
示例#3
0
<? //

// simple methods: wrappers around sinks

$f = new Foo;
$f->foo1($evil, "ok");

class Foo extends Bar {
    function foo1($fp1, $fp2) {
        echo $fp1;
        echo $fp2;
        echo $_GET['x'];
    }
}



?>