
04.08.2007, 22:47
|
|
Флудер
Регистрация: 20.11.2006
Сообщений: 3,316
Провел на форуме: 16641028
Репутация:
2371
|
|
Perlbot by iD
Код:
#!usr/bin/perl
use strict;
use IO::Socket;
################################################
# Perlbot by iD - uNkn0wn-Crew #
# iD@uNkn0wn.eu - www.uNkn0wn.eu #
# -------------------------------------------- #
# GREETINGZ; NOBODY, BECAUSE NOBODY HELPED ME! #
################################################
my $network = "irc.evil.com";
my $port = "6667";
my $nick = "Evilb0t";
my $ident = "evil";
my $name = "Perlbot by iD";
my $chan = "#evil";
my $author = "iD";
print qq(
#########################################
Perlbot by $author.
Starting...
-----------------------------------------
Connecting to $network
#########################################
);
my $socket = new IO::Socket::INET(PeerAddr =>$network,PeerPort =>$port,Proto => 'tcp') or die "Connection error\n";
print $socket "NICK $nick\r\n";
print $socket "USER $ident 8 * :$name\r\n";
while (my $input = <$socket>) {
if ($input =~ /004/) {
last;
}
elsif ($input =~ /433/) {
die "Nick in use";
}
elsif ($input =~ /PING/) {
print "$input";
my $pong = substr($input, index($input, ":") + 1, (length($input) - index($input, ":")));
print $socket "PONG $pong\r\n";
}
else {
print "$input\n";
}
if ($input =~ /This\sserver\swas\screated/) {
print $socket "join $chan\r\n";
}
}
while (my $input = <$socket>) {
chop $input;
if ($input =~ /^PING(.*)$/i) {
print $socket "PING $1\r\n";
}
elsif ($input =~ /PRIVMSG/) {
$input =~ s/:[^:]*://g;
print $socket "$input \n";
}
else {
print "$input\n";
}
}
################################################
# EOF - END OF FILE! #
# -------------------------------------------- #
# Perlbot by iD - uNkn0wn-Crew #
# iD@uNkn0wn.eu - www.uNkn0wn.eu #
################################################
#!usr/bin/perl
use strict;
use IO::Socket;
################################################
# Perlbot by iD - uNkn0wn-Crew #
# iD@uNkn0wn.eu - www.uNkn0wn.eu #
# -------------------------------------------- #
# GREETINGZ; NOBODY, BECAUSE NOBODY HELPED ME! #
################################################
my $network = "irc.evil.com";
my $port = "6667";
my $nick = "Evilb0t";
my $ident = "evil";
my $name = "Perlbot by iD";
my $chan = "#evil";
my $author = "iD";
my $process = 'Perlbot';
print qq(
#########################################
Perlbot by $author.
Starting...
-----------------------------------------
Connecting to $network
#########################################
);
$0="$process"."\0"x16;;
my $pid=fork;
exit if $pid;
my $socket = new IO::Socket::INET(PeerAddr =>$network,PeerPort =>$port,Proto => 'tcp') or die "Connection error\n";
print $socket "NICK $nick\r\n";
print $socket "USER $ident 8 * :$name\r\n";
while (my $input = <$socket>) {
if ($input =~ /433/) {
die "Nick in use";
}
elsif ($input =~ /PING/) {
my $pong = substr($input, index($input, ":") + 1, (length($input) - index($input, ":")));
print $socket "PONG $pong\r\n";
}
elsif ($input =~ /PING(.*)$/i) {
print $socket "PING $1\r\n";
}
if ($input =~ /This\sserver\swas\screated/) {
print $socket "join $chan\r\n";
}
}
################################################
# EOF - END OF FILE! #
# -------------------------------------------- #
# Perlbot by iD - uNkn0wn-Crew #
# iD@uNkn0wn.eu - www.uNkn0wn.eu #
################################################
|
|
|