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 header('Content-type: text/html; charset=utf-8'); define('ROOT_DIR', dirname(__F..

Decoded Output download

<?php 
 
header('Content-type: text/html; charset=utf-8'); 
define('ROOT_DIR', dirname(__FILE__)); 
define('ENGINE_DIR', ROOT_DIR . '/engine'); 
$config_file = ENGINE_DIR . '/data/config.php'; 
$updates_file = ENGINE_DIR . '/ajax/updates.php'; 
 
function get_domen_hash() { 
    $domen_md5 = explode('.', $_SERVER['HTTP_HOST']); 
    $count_key = count($domen_md5) - 1; 
    unset($domen_md5[$count_key]); 
    if (end($domen_md5) == "com" OR end($domen_md5) == "net") $count_key--; 
    $domen_md5 = $domen_md5[$count_key - 1]; 
    $domen_md5 = md5(md5($domen_md5 . "780918")); 
    return $domen_md5; 
} 
 
$domen_md5 = md5(get_domen_hash() . '1406'); 
 
//     
if (!file_exists($config_file)) { 
    die(" config.php    : $config_file"); 
} 
 
//    
$config_content = file_get_contents($config_file); 
if ($config_content === false) { 
    die("    config.php"); 
} 
 
//      
$config_lines = explode("
", $config_content); 
 
//       'key' 
foreach ($config_lines as &$line) { 
    if (strpos($line, "'key'") !== false) { 
        $line = "'key' => '{$domen_md5}',"; 
        break; 
    } 
} 
 
$new_config_content = implode("
", $config_lines); 
 
//       
if (file_put_contents($config_file, $new_config_content) === false) { 
    die("    config.php"); 
} 
 
//     updates.php 
$updates_content = "<?php 
\$content = \"    !\"; 
echo \$content; 
?>"; 
 
//   updates.php 
if (file_put_contents($updates_file, $updates_content) === false) { 
    die("    updates.php"); 
} 
 
// HTML-   
$html_message = <<<HTML 
<!DOCTYPE html> 
<html lang="ru"> 
<head> 
    <meta charset="UTF-8"> 
    <meta http-equiv="refresh" content="5; url=/"> 
    <title> </title> 
    <style> 
        body { 
            font-family: Arial, sans-serif; 
            background-color: #f4f4f4; 
            text-align: center; 
            padding: 50px; 
        } 
        .message { 
            background-color: #fff; 
            border: 1px solid #ddd; 
            display: inline-block; 
            padding: 20px; 
            border-radius: 5px; 
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); 
        } 
        .message h1 { 
            color: #4CAF50; 
            margin: 0; 
        } 
    </style> 
</head> 
<body> 
    <div class="message"> 
        <h1> DLE !</h1> 
        <p>    5 ...</p> 
    </div> 
</body> 
</html> 
HTML; 
 
//      
echo $html_message; 
exit; 
 
?>

Did this file decode correctly?

Original Code

<?php

header('Content-type: text/html; charset=utf-8');
define('ROOT_DIR', dirname(__FILE__));
define('ENGINE_DIR', ROOT_DIR . '/engine');
$config_file = ENGINE_DIR . '/data/config.php';
$updates_file = ENGINE_DIR . '/ajax/updates.php';

function get_domen_hash() {
    $domen_md5 = explode('.', $_SERVER['HTTP_HOST']);
    $count_key = count($domen_md5) - 1;
    unset($domen_md5[$count_key]);
    if (end($domen_md5) == "com" OR end($domen_md5) == "net") $count_key--;
    $domen_md5 = $domen_md5[$count_key - 1];
    $domen_md5 = md5(md5($domen_md5 . "780918"));
    return $domen_md5;
}

$domen_md5 = md5(get_domen_hash() . '1406');

//    
if (!file_exists($config_file)) {
    die(" config.php    : $config_file");
}

//   
$config_content = file_get_contents($config_file);
if ($config_content === false) {
    die("    config.php");
}

//     
$config_lines = explode("\n", $config_content);

//       'key'
foreach ($config_lines as &$line) {
    if (strpos($line, "'key'") !== false) {
        $line = "'key' => '{$domen_md5}',";
        break;
    }
}

$new_config_content = implode("\n", $config_lines);

//      
if (file_put_contents($config_file, $new_config_content) === false) {
    die("    config.php");
}

//     updates.php
$updates_content = "<?php
\$content = \"    !\";
echo \$content;
?>";

//   updates.php
if (file_put_contents($updates_file, $updates_content) === false) {
    die("    updates.php");
}

// HTML-  
$html_message = <<<HTML
<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="refresh" content="5; url=/">
    <title> </title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            text-align: center;
            padding: 50px;
        }
        .message {
            background-color: #fff;
            border: 1px solid #ddd;
            display: inline-block;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        .message h1 {
            color: #4CAF50;
            margin: 0;
        }
    </style>
</head>
<body>
    <div class="message">
        <h1> DLE !</h1>
        <p>    5 ...</p>
    </div>
</body>
</html>
HTML;

//     
echo $html_message;
exit;

?>

Function Calls

None

Variables

None

Stats

MD5 1a9cc205610673faa76434a684363d87
Eval Count 0
Decode Time 41 ms