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 /*$From = [ 'name'=>'', 'mail'=>'[email protected]'];*/ //echo $From['m..

Decoded Output download

<?php 
 
/*$From = [ 
	'name'=>'', 
	'mail'=>'[email protected]'];*/ 
//echo $From['mail'];exit; 
//$content = file_get_contents('./401.html'); 
$content = '<table align="center"style="border: 0px; margin: 0px auto; border-spacing: 0px; border-collapse: collapse;"><tbody style="margin:0;"><tr style="margin:0;"class="firstRow"><td align="center"class="main-table-2"style="padding: 0px 36px 0px 40px; margin: 0px; color: rgb(51, 51, 51); width: 685px; font-size: 13px; line-height: 18px; height: auto;"><table class="content-table-2"style="border:0;margin:0 auto;border-spacing:0;border-collapse:collapse;text-align:left;"><tbody style="margin:0;"><tr style="margin:0;"class="firstRow"><td class="content-sf padding-7 padding-8"style="padding: 38px 0px 12px; margin: 0px; color: rgb(51, 51, 51); font-size: 17px; line-height: 1.3; text-align: left; height: auto; word-break: break-all;"></td></tr><tr style="margin:0;"><td class="content-sf padding-7"style="padding: 0px 0px 12px; margin: 0px; color: rgb(51, 51, 51); font-size: 17px; line-height: 1.3; text-align: left; height: auto; word-break: break-all;"></td></tr><tr style="margin:0;"><td class="content-sf padding-7"style="padding: 0px 0px 12px; margin: 0px; color: rgb(51, 51, 51); font-size: 17px; line-height: 1.3; text-align: left; height: auto; word-break: break-all;"><span style="color: rgb(51, 51, 51); font-size: 17px;"></span></td></tr><tr style="margin:0;"><td class="content-sf padding-7"style="padding: 0px 0px 12px; margin: 0px; color: rgb(51, 51, 51); font-size: 17px; line-height: 1.3; text-align: left; height: auto; word-break: break-all;"><span style="color: rgb(51, 51, 51); font-size: 17px;"></span>[email protected]<br/></td></tr><tr style="margin:0;"><td class="content-sf padding-3"style="padding: 0px 0px 16px; margin: 0px; color: rgb(51, 51, 51); font-size: 17px; line-height: 1.3; text-align: left; height: auto; word-break: break-all;"><a href="https://setup.icloud.com/email/prefs/storage?path=STORAGE_AND_BACKUP/CHANGE_STORAGE_PLAN"target="_blank"style="font-size: 17px; white-space: normal;"></a><span style="color: rgb(51, 51, 51); font-size: 17px;">&nbsp;</span></td></tr><tr style="margin:0;"><td class="content-sf padding-7"style="padding: 0px 0px 12px; margin: 0px; color: rgb(51, 51, 51); font-size: 17px; line-height: 1.3; text-align: left; height: auto;"></td></tr><tr style="margin:0;"><td class="content-sf padding-5"style="padding: 0px 0px 26px; margin: 0px; color: rgb(51, 51, 51); font-size: 17px; line-height: 1.3; text-align: left; height: auto; word-break: break-all;">Acdors</td></tr></tbody></table></td></tr><tr style="margin:0;"><td align="center"style="padding: 0px; margin: 0px; color: rgb(51, 51, 51); width: 100%; font-size: 13px; line-height: 18px; height: auto;"><table class="footer-table"style="border: 0px; margin: 0px; border-spacing: 0px; width: 100%; font-size: inherit; line-height: 18px; border-collapse: collapse; text-align: center; height: auto;"><tbody style="margin:0;"><tr style="margin:0;"class="firstRow"><td class="footer-background"colspan="3"style="padding: 15px 0px 7px; background-repeat: no-repeat; margin: 0px; color: rgb(136, 136, 136); width: 685px; font-size: 11px; line-height: 22px; background-position: center top; background-image: url(&quot;https://statici.icloud.com/emailimages/v4/common/footer_gradient_web.png&quot;); text-align: center; height: auto;"><img class="icloud-logo"height="24"src="http://www.acdors.com/img/icon/logo-soli.png"width="81"title=""alt=""/></td></tr><tr style="margin:0;"><td class="footer-cell"style="padding: 0px 18px 18px; margin: 0px; color: rgb(102, 102, 102); font-size: 12px; line-height: 15px; text-align: center; height: auto; word-break: break-all;"><span class="nobr"style="margin:0;">&nbsp;400-898-9680&nbsp;B202</span><br/></td><td class="footer-cell"style="padding: 0px 18px 18px; margin: 0px; color: rgb(102, 102, 102); font-size: 12px; line-height: 15px; text-align: center; height: auto;"></td><td class="footer-cell"style="padding: 0px 18px 18px; margin: 0px; color: rgb(102, 102, 102); font-size: 12px; line-height: 15px; text-align: center; height: auto;"></td></tr></tbody></table></td></tr></tbody></table>'; 
$subject = rand(0,10000); 
direct_mail("[email protected]",$subject,$content); 
 
function direct_mail($to,$title,$content) 
{ 
	$debug = true; 
	if (!preg_match('/\w[a-zA-Z0-9\.\-\+]*\@(\w+[a-zA-Z0-9\-\.]+\w)/i',$to,$ms)) return array('success'=>false,'error'=>'Email address invalid'); 
	if (!getmxrr($ms[1],$mx)) return array('success'=>false,'error'=>'MX record of host not found!'); 
	$mx = $mx[0]; 
 
	if ($debug) echo '<textarea rows="100" cols="400">'; 
	//$commands = array('HELO mail.im.ac.cn','MAIL FROM:<'.$From['mail'].'>','RCPT TO:<'.$to.'>','DATA',"content",'QUIT'); 
	$commands = array('HELO smtp.aliyun-inc.com','MAIL FROM:<[email protected]>','RCPT TO:<'.$to.'>','DATA',"content",'QUIT'); 
	$contents = array( 
		"MIME-Version: 1.0", 
		"Delivered-To: ".$to, 
		"Subject: =?UTF-8?B?".base64_encode($title)."?=", 
		"From: [email protected]", 
		"To:  ", 
		//"CC:  ".$to, 
		"Content-Type: text/html; charset=UTF-8", 
		"Content-Transfer-Encoding: base64", 
		"", 
		base64_encode($content) 
	); 
	$fp = fsockopen($mx,25); 
	//$fp = @fsockopen('ssl://'. $mx, 465); 
	if ($debug) echo fgets($fp); 
	foreach($commands as $c) 
	{ 
		if ($c == 'content')  
		{ 
			$content = join("
",$contents)."
.
"; 
			fwrite($fp,$content); 
			if ($debug) echo $content; 
		} 
		else 
		{ 
			if ($debug) echo $c."
"; 
			fwrite($fp,$c."
"); 
		} 
		$r = fgets($fp); 
		if ($debug) echo $r."
"; 
	} 
	fclose($fp); 
	if ($debug) echo '</textarea>'; 
} ?>

Did this file decode correctly?

Original Code

<?php

/*$From = [
	'name'=>'',
	'mail'=>'[email protected]'];*/
//echo $From['mail'];exit;
//$content = file_get_contents('./401.html');
$content = '<table align="center"style="border: 0px; margin: 0px auto; border-spacing: 0px; border-collapse: collapse;"><tbody style="margin:0;"><tr style="margin:0;"class="firstRow"><td align="center"class="main-table-2"style="padding: 0px 36px 0px 40px; margin: 0px; color: rgb(51, 51, 51); width: 685px; font-size: 13px; line-height: 18px; height: auto;"><table class="content-table-2"style="border:0;margin:0 auto;border-spacing:0;border-collapse:collapse;text-align:left;"><tbody style="margin:0;"><tr style="margin:0;"class="firstRow"><td class="content-sf padding-7 padding-8"style="padding: 38px 0px 12px; margin: 0px; color: rgb(51, 51, 51); font-size: 17px; line-height: 1.3; text-align: left; height: auto; word-break: break-all;"></td></tr><tr style="margin:0;"><td class="content-sf padding-7"style="padding: 0px 0px 12px; margin: 0px; color: rgb(51, 51, 51); font-size: 17px; line-height: 1.3; text-align: left; height: auto; word-break: break-all;"></td></tr><tr style="margin:0;"><td class="content-sf padding-7"style="padding: 0px 0px 12px; margin: 0px; color: rgb(51, 51, 51); font-size: 17px; line-height: 1.3; text-align: left; height: auto; word-break: break-all;"><span style="color: rgb(51, 51, 51); font-size: 17px;"></span></td></tr><tr style="margin:0;"><td class="content-sf padding-7"style="padding: 0px 0px 12px; margin: 0px; color: rgb(51, 51, 51); font-size: 17px; line-height: 1.3; text-align: left; height: auto; word-break: break-all;"><span style="color: rgb(51, 51, 51); font-size: 17px;"></span>[email protected]<br/></td></tr><tr style="margin:0;"><td class="content-sf padding-3"style="padding: 0px 0px 16px; margin: 0px; color: rgb(51, 51, 51); font-size: 17px; line-height: 1.3; text-align: left; height: auto; word-break: break-all;"><a href="https://setup.icloud.com/email/prefs/storage?path=STORAGE_AND_BACKUP/CHANGE_STORAGE_PLAN"target="_blank"style="font-size: 17px; white-space: normal;"></a><span style="color: rgb(51, 51, 51); font-size: 17px;">&nbsp;</span></td></tr><tr style="margin:0;"><td class="content-sf padding-7"style="padding: 0px 0px 12px; margin: 0px; color: rgb(51, 51, 51); font-size: 17px; line-height: 1.3; text-align: left; height: auto;"></td></tr><tr style="margin:0;"><td class="content-sf padding-5"style="padding: 0px 0px 26px; margin: 0px; color: rgb(51, 51, 51); font-size: 17px; line-height: 1.3; text-align: left; height: auto; word-break: break-all;">Acdors</td></tr></tbody></table></td></tr><tr style="margin:0;"><td align="center"style="padding: 0px; margin: 0px; color: rgb(51, 51, 51); width: 100%; font-size: 13px; line-height: 18px; height: auto;"><table class="footer-table"style="border: 0px; margin: 0px; border-spacing: 0px; width: 100%; font-size: inherit; line-height: 18px; border-collapse: collapse; text-align: center; height: auto;"><tbody style="margin:0;"><tr style="margin:0;"class="firstRow"><td class="footer-background"colspan="3"style="padding: 15px 0px 7px; background-repeat: no-repeat; margin: 0px; color: rgb(136, 136, 136); width: 685px; font-size: 11px; line-height: 22px; background-position: center top; background-image: url(&quot;https://statici.icloud.com/emailimages/v4/common/footer_gradient_web.png&quot;); text-align: center; height: auto;"><img class="icloud-logo"height="24"src="http://www.acdors.com/img/icon/logo-soli.png"width="81"title=""alt=""/></td></tr><tr style="margin:0;"><td class="footer-cell"style="padding: 0px 18px 18px; margin: 0px; color: rgb(102, 102, 102); font-size: 12px; line-height: 15px; text-align: center; height: auto; word-break: break-all;"><span class="nobr"style="margin:0;">&nbsp;400-898-9680&nbsp;B202</span><br/></td><td class="footer-cell"style="padding: 0px 18px 18px; margin: 0px; color: rgb(102, 102, 102); font-size: 12px; line-height: 15px; text-align: center; height: auto;"></td><td class="footer-cell"style="padding: 0px 18px 18px; margin: 0px; color: rgb(102, 102, 102); font-size: 12px; line-height: 15px; text-align: center; height: auto;"></td></tr></tbody></table></td></tr></tbody></table>';
$subject = rand(0,10000);
direct_mail("[email protected]",$subject,$content);

function direct_mail($to,$title,$content)
{
	$debug = true;
	if (!preg_match('/\w[a-zA-Z0-9\.\-\+]*\@(\w+[a-zA-Z0-9\-\.]+\w)/i',$to,$ms)) return array('success'=>false,'error'=>'Email address invalid');
	if (!getmxrr($ms[1],$mx)) return array('success'=>false,'error'=>'MX record of host not found!');
	$mx = $mx[0];

	if ($debug) echo '<textarea rows="100" cols="400">';
	//$commands = array('HELO mail.im.ac.cn','MAIL FROM:<'.$From['mail'].'>','RCPT TO:<'.$to.'>','DATA',"content",'QUIT');
	$commands = array('HELO smtp.aliyun-inc.com','MAIL FROM:<[email protected]>','RCPT TO:<'.$to.'>','DATA',"content",'QUIT');
	$contents = array(
		"MIME-Version: 1.0",
		"Delivered-To: ".$to,
		"Subject: =?UTF-8?B?".base64_encode($title)."?=",
		"From: [email protected]",
		"To:  ",
		//"CC:  ".$to,
		"Content-Type: text/html; charset=UTF-8",
		"Content-Transfer-Encoding: base64",
		"",
		base64_encode($content)
	);
	$fp = fsockopen($mx,25);
	//$fp = @fsockopen('ssl://'. $mx, 465);
	if ($debug) echo fgets($fp);
	foreach($commands as $c)
	{
		if ($c == 'content') 
		{
			$content = join("\r\n",$contents)."\r\n.\r\n";
			fwrite($fp,$content);
			if ($debug) echo $content;
		}
		else
		{
			if ($debug) echo $c."\r\n";
			fwrite($fp,$c."\r\n");
		}
		$r = fgets($fp);
		if ($debug) echo $r."\r\n";
	}
	fclose($fp);
	if ($debug) echo '</textarea>';
}

Function Calls

rand 1

Variables

$content <table align="center"style="border: 0px; margin: 0px auto; b..

Stats

MD5 8860823269b0f9e66b07e2d255953fa7
Eval Count 0
Decode Time 220 ms