<?php
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 encrypt('Admin OR \'1\'=\'1');
- Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.26, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
- MjE5MTU5MDM5MDIxMDYxMjI2MTQ0MTgwMjI3MTk0MTA0MDk1MDcxMTMwMDI4
- Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33
- MDQyMjExMDE0MTgyMTQwMTY5MTc2MTA2MTMwMDM4MjM2MjE5MDIwMjMyMDc4
preferences:
112.34 ms | 402 KiB | 157 Q