tasburrfoot
Regular Member
- Dec 16, 2008
- 338
- 163
Got bored, and decided to make a C&C style php mass-mailer, that would utilize free webhosts by only sending 1000(adustable) emails from each host, with a sleep(8) after each mail, effective sending 240/hour. Shouldn't have a massive server impact, and because it would be utilizing such a wide-range of domain names/IP's your campaigns would be more consistantly inbox'd and less likely to get blacklisted..
Servers would just go into a seperate file, with just a basic array like:
Anyone with a bunch of 000host accounts(or any other free provider) want to demo this with me?
Here's what I've got for the C&C server script, the "zombie" server script is done too, but it's just a basic recieve POST data, and send mails so I'm not gunna put it in here.
Comments? Improvements?
EDIT/DISCLAIMER** This was for my entertainment purposes - do not use to spam the sh*t out of mailing lists. Just a cost-effective(free)/resource efficient way to send a large number of emails in "theory"
Servers would just go into a seperate file, with just a basic array like:
PHP:
global $servers[];
$servers = array(
'domain1',
'domain2',
'domain3'
);
Anyone with a bunch of 000host accounts(or any other free provider) want to demo this with me?
Here's what I've got for the C&C server script, the "zombie" server script is done too, but it's just a basic recieve POST data, and send mails so I'm not gunna put it in here.
PHP:
<?PHP
set_time_limit(0);
$domain = $_SERVER['SERVER_NAME'];
require_once('require/servers.php');
if(!isset($_REQUEST['submit'])){
echo('
<form method="POST" action="mymail.php" enctype="multipart/form-data">
List: <input type="file" name="file" id="file"><br>
Body(HTML Format): <input type="textarea" name="body"><br>
Subject: <input type="text" name="subject"><br>
Key: <input type="password" name="key" id="key"><br>
<input type="submit" value="Upload" name="submit">
');
} else {
$target_dir = 'lists/';
if(!file_exists($target_dir)){
mkdir($target_dir, 0777, true);
}
$file = $target_dir . basename($_FILES['file']['name']);
$ext = pathinfo($file);
$ext = $ext['extension'];
if($ext != 'txt'){
die();
}
move_uploaded_file($_FILES['file']['tmp_name'],$file);
if(!file_exists(date('Y-m-d/'))){
mkdir('elists/'.date('Y-m-d/'), 0777, true);
}
$handle = fopen($file,'r');
$f = 1;
while(!feof($handle)){
$newfile = fopen('elists/'.date('Y-m-d/') . $f . '.txt','w');
for($i = 1; $i <= 1000; $i++){
$import = fgets($handle);
fwrite($newfile,$import);
if(feof($handle))
{break;}
}
fclose($newfile);
$f++;
}
fclose($handle);
$lists = scandir('elists/'.date('Y-m-d/'));
$rest_stop = '/main.php';
$body = $_POST['body'];
$subject = $_POST['subject'];
$domain = $domain . dirname(__FILE__) .$file;
$domain = realpath($domain);
$postdata = "body={$body}&subject={$subject}&location={$domain}";
$postdata = urlencode($postdata);
$k = 0;
foreach($lists as $list){
if($k > count($servers)){break;}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $servers[$k].$rest_stop);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
curl_exec($ch);
curl_close($ch);
$k++;
}
}
?>
Comments? Improvements?
EDIT/DISCLAIMER** This was for my entertainment purposes - do not use to spam the sh*t out of mailing lists. Just a cost-effective(free)/resource efficient way to send a large number of emails in "theory"
Last edited: