<?php spammer

Discussion in 'PHP' started by boortyhuhtyu, 1 Mar 2012.

  1. boortyhuhtyu

    boortyhuhtyu Member

    Joined:
    2 Feb 2011
    Messages:
    727
    Likes Received:
    26
    Reputations:
    -6
    Code:
    <?php
    
    $filename = '';
    $from = "";
    $postmessage['title'] = ''; 
    
    $postmessage['body'] = <<< MESSAGE
    MESSAGE;
    $countmesreload = 1; 
    $sleepcount = 0; 
    $sleepincount = 0; 
    $headers = "MIME-Version: 1.0\r\n"; 
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; 
    $headers .= "From: ".$from."\r\n";
    
    
    class mailer {
    	var $send_num;
    	var $senduntilcount;
    	var $url;
    	var $js_code;
    	var $mes_title;
    	var $mes_body;
    	var $from;
    	function __construct($filename,$mestitle,$mes,$from,$countmesreload,$sleepcount,$headers,$sleepincount) {
    		
    		if(isset($_GET['sendnum'])) { $this->send_num = $_GET['sendnum']; }
    		else { $this->send_num = 0; }
    		
    		$maillist = file($filename);
    		$this->senduntilcount = $this->send_num + $countmesreload; 
    		
    		for($i = $this->send_num; $i < $this->senduntilcount; $i++) {
    			$this->mes_title = $mestitle . '-' . rand(0,9999999); 
    			$this->mes_body = $mes . '<input type="hidden" name="mesid" value="' . rand(0,9999999) . '">'; 
    			
    			if(strlen($maillist[$i]) < 3) { print '<p>Достигнут конец базы мыл</p>'; $end = 'yes'; break; };
    			
    			if(mail($maillist[$i], $this->mes_title, $this->mes_body, $headers)) { print "<p>{$maillist[$i]} <font color='green'>Ok</font></p>"; }
    			else { print "<p>$maillist[$i] <font color='red'>Error</font></p>"; }
    			$this->mes_title = $mestitle; 
    			$this->mes_body = $mes; 
    			sleep($sleepincount); 
    			}
    		if($end != 'yes') {
    		
    		print '<p>Продолжаем...</p>';
    		$this->url = 'spammer.php?sendnum=' . $this->senduntilcount;
    		$sleepcount = $sleepcount * 1000; 
    		$js_code = <<< JSCODE
    <script>
        var URL = "$this->url"
        var speed = $sleepcount;
        function reload() {
        document.location = URL;
        }
        setTimeout('reload()', speed);
    </script>
    JSCODE;
    			print $js_code;
    		}
    	}
    }
    
    
    ?>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
    <title>php mail spammer</title>
    </head>
    <body>
    <?php $sendmails = new mailer($filename,$postmessage['title'],$postmessage['body'],$countmesreload,$sleepcount,$from,$headers,$sleepincount); ?>
    </body>
    </html>
    )нужно убрать конструкцию генерирующую рандом число.)
     
  2. DarkWave

    DarkWave New Member

    Joined:
    10 Oct 2011
    Messages:
    11
    Likes Received:
    2
    Reputations:
    0
    $this->mes_title = $mestitle . '-' . rand(0,9999999);
    заменить на
    $this->mes_title = $mestitle;
     
  3. qaz

    qaz Elder - Старейшина

    Joined:
    12 Jul 2010
    Messages:
    1,551
    Likes Received:
    173
    Reputations:
    75
    а ет спамер чего?
     
  4. sanya13579

    sanya13579 Member

    Joined:
    14 Dec 2010
    Messages:
    9
    Likes Received:
    6
    Reputations:
    0
    емайлов вроде ;)