D
D
Danil Sysoev2015-04-29 00:38:46
Programming
Danil Sysoev, 2015-04-29 00:38:46

Why doesn't it fully decrypt the file?

Guys, please help. Here is the cashfall.in/test/inc/coding.php file with the following content:

<? 
 function decrypt($data,$filename='',$times=1)  
{  
    error_reporting(0);  

    function bulk($str)  
    {  
        $str = preg_replace('~^\?\>~','',$str);  
        return str_ireplace(array('<?php','<?','?>','eval','__FILE__'),array('','','/*','echo','$_FILE__'),$str);  
    }  

    $f = $data;  
    $_FILE__=$filename;  
      
    for ($i=0;$i<$times;$i++)  
    {  
        ob_start();  
        eval(bulk($f));  
        $f = ob_get_contents();  
        ob_end_clean();   
    }  
    return preg_replace(array('~^\?\>~','~\<\?$~'),'',$f);  
}  


$data = file_get_contents('function.inc.php'); 

echo decrypt($data, 'function.inc.php', 3); 
?>

Deciphers the norms, but is cut off half way. It's clear to me that this is not the end. There are no encrypted files left in the script. This is the last. Tell me what's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Martyanov, 2015-04-29
@vilgeforce

Look in the debugger

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question