Показать сообщение отдельно

  #5  
Старый 14.09.2009, 20:38
geforse
Постоянный
Регистрация: 02.03.2008
Сообщений: 893
С нами: 9574565

Репутация: 712


По умолчанию

Полуавтоматический регистратор Torrents.ru



PHP код:
<?php
@set_time_limit(0);
@
ignore_user_abort(1);
//-----------------//
$torrents 'torrents.txt';   // Файл с аккаунтами
$divider ':';              //  Разделитель
$sleep '30';              //   Задержка для проверки E-mail
$proxy '';               //    Можно через покси (127.0.0.1:8008)
$log '0';               //     1 - Если нужно писать логи
$log_txt 'log.txt';    //      Log-файл
//-----------------//
 
   
function post($url,$post,$refer,$proxy)
        {
       
$ch curl_init($url);
       
curl_setopt($chCURLOPT_USERAGENT"Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.4) Gecko/2008102920 AdCentriaIM/1.7 Firefox/3.0.4");
       
curl_setopt($chCURLOPT_POST1);
       
curl_setopt($chCURLOPT_POSTFIELDS$post);
       
curl_setopt($chCURLOPT_REFERER$refer);
       
curl_setopt($chCURLOPT_COOKIEJAR"./cook");
       
curl_setopt($chCURLOPT_COOKIEFILE"./cook");
       
curl_setopt($chCURLOPT_TIMEOUT10);  
       
curl_setopt($chCURLOPT_PROXY$proxy);
       
curl_setopt($chCURLOPT_FOLLOWLOCATION1);
       
curl_setopt($chCURLOPT_RETURNTRANSFER1);
       
$result  curl_exec($ch);
       return 
$result;
     }
 
    if (
$proxy == '')
      {
        
$proxy null;
      }    
 
    
/* Если нам передали капчу... */
    
if ($_POST['captcha'])
     { 
        
/* Регистрируем E-mail */
       
$result post('http://odnorazovoe.ru/inbox.php?mailbox='.$_POST['login'],null,'http://odnorazovoe.ru/',$proxy);
 
    
/* Массив с данными */
    
$postdata = array(
        
'method'    => 'post'
        
'mode'       => 'register'
        
'reg_agreed'      => '1',
        
'sid'    => '',
        
'username'    => $_POST['login'],
        
'email'    => $_POST['login'].'@odnorazovoe.ru',
        
'new_password'    => $_POST['password'],
        
'password_confirm'    => $_POST['password'],
    
'cap_sid'      => $_POST['cap_sid'],
        
'cap_code_'.$_POST['cap_code_']    => $_POST['captcha'],
        
'user_flag_id'    => '0',
    
'user_timezone_x2' => '6',
    
'submit' => 'Отправить',       
    );
 
       
/* Отправка данных */     
       
$result post('http://torrents.ru/forum/profile.php',$postdata,'http://torrents.ru/forum/profile.php?mode=register',$proxy);
 
      if(
$log == '1')
         {
            
$fh fopen($log_txt"a+");
            
$success fwrite($fh$login."Ждём URL-активации [".date("H:i")."]\r\n");
            
fclose($fh);
           }
 
         
/* Цикл проверки почты */
      
while($email[1] == null)
       {
         
$result_email post('http://odnorazovoe.ru/inbox.php?mailbox='.$_POST['login'],null,'http://odnorazovoe.ru/',$proxy);
         
preg_match('#eml.php(.*?)"#i',$result_email,$email);
         
sleep($sleep);
       }
 
       
/* Получаем URL-активации */
       
$result post('http://odnorazovoe.ru/eml.php'.$email[1],null,'http://odnorazovoe.ru/',$proxy);
       
preg_match('#activate(.*?)<#i',$result,$url);
       
$url str_replace("&amp;","&",$url[1]);
 
       
/* Отправляем данные */
       
$result post('http://torrents.ru/forum/profile.php?mode=activate'.$url,null,'http://odnorazovoe.ru/',$proxy);
 
       if(
preg_match('#активиз(.*?)\.#i',$result,$end))
        {
          
/* Сохраняем результат */
          
$fh fopen($torrents"a+");
          
$success fwrite($fh$_POST['login'].$divider.$_POST['password']."\r\n");
          
fclose($fh);
 
        if(
$log == '1')
             {
           
$fh fopen($log_txt"a+");
               
$success fwrite($fh"Зарегистрировались [".date("H:i")."]\r\n");
               
fclose($fh);
         }    
        
Header('Location: index.php');
        }
    }
    else
    {
    
/* ...если не передали капчу */
    
$letters 'abcdefghijklmopkqrstuvwxyz';
    for (
$i 0$i 20$i++)
      {
        
$login .= $letters{rand(0strlen($letters) - 1)};
      }
         
$password rand(123456,7777777);
         
$name rand(0,7777777);
 
      
/* Получаем страницу регистрации */
      
$result post('http://torrents.ru/forum/profile.php?mode=register','reg_agreed=1','http://torrents.ru/forum/profile.php?mode=register',$proxy);
 
             
/* Вытаскиваем нужные значения */
         
preg_match('#http://static.torrents.ru/captcha/(.*?)"#i',$result,$match);
             
preg_match('#cap_sid" value="(.*?)"#i',$result,$match_sid);
         
preg_match('#cap_code_(.*?)"#i',$result,$match_cap);
 
         
/* Регистрация на трекере ограничена */
         
if($match[1] == '')
          {
            echo 
'<script>alert(\'В данный момент регистрация закрыта!\')</script>';        
          }
    }
 
/* geforse.name */
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
<meta http-equiv="Content-Style-Type" content="text/css">
<title>torrents.ru | geforse.name</title>
 
 
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
 
<link rel="search" type="application/opensearchdescription+xml" title="Поиск на torrents.ru" href="http://static.torrents.ru/opensearch.xml">
 
<link rel="stylesheet" type="text/css" href="http://static.torrents.ru/templates/default/css/main.css?v=18" media="all">
</head><body>
 
<div id="preload" style="overflow: hidden; position: absolute; top: 0pt; left: 0pt; height: 1px; width: 1px;"></div>
 
<div id="body_container">
<div id="page_container">
<a name="top"></a>
 
<div id="page_header">
<div id="logo">
    <table cellpadding="0" cellspacing="0" width="100%">
    <tbody><tr>
        <td style="padding: 4px 0pt 5px;">
            <a href="http://torrents.ru/forum/index.php"><img src="http://static.torrents.ru/images/logo/logo.gif" alt="logo" height="85" width="320"></a>
        </td>
    </tr>
    </tbody></table>
</div>
 
<div class="topmenu">
<table cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
</tr>
</tbody></table>
</div>
<div id="page_content">
<table style="width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 
<td id="main_content">
<div id="main_content_wrap">
<h1 class="pagetitle">Регистрация</h1>
<form action="index.php" method="post">
 
<table class="forumline usercp_register">
<col class="row1" width="35%">
<col class="row2" width="65%">
<tbody class="pad_4">
<tr>
    <th colspan="2">Регистрационная информация</th>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>
</tr>
<tr>    
</tr>
<tr>    
</tr>
<tr>
    <td>Код подтверждения:</td>
    <td>
            <div><img src="http://static.torrents.ru/captcha/<?php echo $match[1]; ?>" alt="pic" height="72" width="120"></div>
            <div>
                <input name="captcha" value="" class="bold" type="text">
                <input type="hidden" name="cap_sid" value="<?php echo $match_sid[1]; ?>" />
                <input type="hidden" name="cap_code_" value="<?php echo $match_cap[1]; ?>" />
                <input type="hidden" name="name" value="<?php echo $name?>" />
                <input type="hidden" name="login" value="<?php echo $login?>" />
                <input type="hidden" name="password" value="<?php echo $password?>" />
            </div>
            <br>
          <a href="http://geforse.name/" target="_blank">geforse.name</a>
        </td>
</tr>
    <tr>
        <td class="row2" colspan="2">
        <div id="infobox-wrap" class="bCenter row1">            
        </div>
        </td>
    </tr>    
<tr>
    <td class="catBottom" colspan="2">
    <div id="submit-buttons">
        <input name="submit" value="Отправить" class="bold" type="submit">&nbsp;&nbsp;
            </div>
    </td>
</tr>
</tbody>
</table>
</form>
    </div>
    </td>
</tr></tbody></table>
    </div>
    </div>
    </div>
    </body></html>


P.S. регистрация доступна 16:00-18:00, поэтому не нужно пытаться запускать скрипт в другое время

/* geforse.name */
 
Ответить с цитированием