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

Signing you up...

Thank you for signing up!

PHP Decode

function test($string) { $key = "\x00\x00\x00\x00\x00\x00\x00\x00"; $key[0] = chr(or..

Decoded Output download

<?  function test($string) { 
  $key = ""; 
  $key[0] = chr(ord($string[0]) & 254); 
  $key[1] = chr((ord($string[0]) << 7) | (ord($string[1]) >> 1)); 
  $key[2] = chr((ord($string[1]) << 6) | (ord($string[2]) >> 2)); 
  $key[3] = chr((ord($string[2]) << 5) | (ord($string[3]) >> 3)); 
  $key[4] = chr((ord($string[3]) << 4) | (ord($string[4]) >> 4)); 
  $key[5] = chr((ord($string[4]) << 3) | (ord($string[5]) >> 5)); 
  $key[6] = chr((ord($string[5]) << 2) | (ord($string[6]) >> 6)); 
  $key[7] = chr(ord($string[6]) << 1); 
  return openssl_encrypt('KGS!@#$%', 'des-ecb', $key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING); 
} 
 
$ret = test('THE QUI');//The quick brown fox jumps over the lazy dog.'); 
var_dump($ret); ?>

Did this file decode correctly?

Original Code

function test($string) {
  $key = "\x00\x00\x00\x00\x00\x00\x00\x00";
  $key[0] = chr(ord($string[0]) & 254);
  $key[1] = chr((ord($string[0]) << 7) | (ord($string[1]) >> 1));
  $key[2] = chr((ord($string[1]) << 6) | (ord($string[2]) >> 2));
  $key[3] = chr((ord($string[2]) << 5) | (ord($string[3]) >> 3));
  $key[4] = chr((ord($string[3]) << 4) | (ord($string[4]) >> 4));
  $key[5] = chr((ord($string[4]) << 3) | (ord($string[5]) >> 5));
  $key[6] = chr((ord($string[5]) << 2) | (ord($string[6]) >> 6));
  $key[7] = chr(ord($string[6]) << 1);
  return openssl_encrypt('KGS!@#$%', 'des-ecb', $key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING);
}

$ret = test('THE QUI');//The quick brown fox jumps over the lazy dog.');
var_dump($ret);

Function Calls

chr 1
ord 3
test 1

Variables

$key T
$string THE QUI

Stats

MD5 bfc9718b309ae7cb5379d228cab4e960
Eval Count 0
Decode Time 72 ms