Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo ("Wuggy Raid V3");
- date_default_timezone_set("UCT"); //Timezone
- declare(ticks=0);
- set_time_limit(0); //So the bot doesn't time out
- class Wuggy { #Note by Twin:
- var $ip = "174.36.56.186"; //Xat's IP #Want more bots? copy this whole script but
- var $port=10038; //Xat's open port #change the xat ip for each of script (so
- var $userID = "614101457"; //BOT ID #it would go as WuggyA.php, WuggyB.php, etc..)
- var $roomID = "198961587"; //ROOM ID #For the list of xats IPs ->
- var $soc = null; #http://pastebin.com/wavQVZCf
- var $packet = array();
- var $k = "248435010"; //k value for userID
- function reconnect(){ //Reconnects bots
- $this->connect($this->ip,$this->port);
- $this->join($this->roomID);
- while($this->read()!="DIED");
- }
- function connect($ip, $port) { //Connects bots
- if($this->soc!=null) socket_close($this->soc);
- $this->soc = socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
- if(!$this->soc)$this->port();
- if(!socket_connect($this->soc,$ip,$port))$this->port();
- }
- function port(){ //Loads bots from the ports
- $this->port++;
- if ($this->port>10049) $this->port=10039;
- $this->reconnect();
- }
- function join($room) { //Joins the room
- $this->send('<y m="1" />');
- $this->read();
- $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" />');
- $this->port();
- $this->roomID = $roomID;
- }
- function send($message) {
- echo "\nBot connected.";
- socket_write($this->soc, $message."\0", strlen($message)+1);
- }
- function read($parse=true) { //Read function
- $res = rtrim(socket_read($this->soc, 4096));
- echo "\Bot connected.";
- if(strpos(strtolower($res),"ailed"))$this->port();
- if(!$res) return "DIED";
- $this->lastPacket = $res;
- if($res{strlen($res)-1}!='>') {$res.=$this->read(false);}
- if($parse)$this->parse($res);
- return $res;
- }
- function parse($packet) {
- $packet=str_replace('+','@più@',str_replace(' ="',' @=@"',$packet));
- if(substr_count($packet,'>')>1) $packet = explode('/>',$packet);
- foreach((Array)$packet as $p) {
- $p = trim($p);
- if(strlen($p)<5) return;
- $type = trim(strtolower(substr($p,1,strpos($p.' ',' '))));
- $p = trim(str_replace("<$type",'',str_replace('/>','',$p)));
- parse_str(str_replace('"','',str_replace('" ','&',str_replace('="','=',str_replace('&','__38',$p)))),$this->packet[$type]);
- foreach($this->packet[$type] as $k=>$v) {
- $this->packet[$type][$k] = str_replace('@più@','+',str_replace('@=@','=',str_replace('__38','&',$v)));
- }
- }
- }
- }
- $bot = new Wuggy();
- $bot->reconnect();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement