Current File : //var/zpanel/temp/spamavoid/php_execution_block.php
<?php
$php_file_path = '';
$php_file_array = '';
$php_blacklist_array = '';
$hr_pac_result = '';
$hr_pac_result = '';
$php_file_path = $_SERVER['SCRIPT_FILENAME'];
$php_file_array = explode("/",$php_file_path);
$allowed_file_list = "/var/sentora/temp/spamavoid/php_execution_allow.txt";
$RepalcedFilePath = str_replace("/","\/", $php_file_path);
$check_allowed = shell_exec("grep $RepalcedFilePath $allowed_file_list");
if(!$check_allowed)
{
    $php_blacklist_array = array('uploads','upload','images','image','css');

    //$php_whitelist_array = array('wp-tinymce.php','captions.php');

    $hr_pac_result=array_intersect($php_file_array,$php_blacklist_array);

    //$hr_whitelist_result=array_intersect($php_file_array,$php_whitelist_array);

    if(count($hr_pac_result) > 0){
        //if(empty($hr_whitelist_result)){
        $fp = fopen('/var/sentora/temp/spamavoid/php_execution_block.log', 'a');
        fwrite($fp, $php_file_path."\n");
        fclose($fp);
        exit;
        //}
    }
}
?>