[Perl] FinderShells 0.3

Iniciado por BigBear, 1 Diciembre 2011, 22:11 PM

0 Miembros y 1 Visitante están viendo este tema.

BigBear

Simple programa para buscar phpshells activas usando google

Código (perl) [Seleccionar]
#!/usr/bin/perl
#Finder Shells 0.3 (c) Doddy Hackman 2011

use LWP::UserAgent;
use HTTP::Request::Common;

installer();

my $nave = LWP::UserAgent->new();
$nave->timeout(3);
$nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");

&head;

print "\n[Pages] : ";
chomp(my $pa = <stdin>);

$option = men();

if ($option eq 1) {
@pages = google("www.google.com.ar","intitle:\"- c99shell\"",$pa);
print "\n[+] Count Pages : ".int(@pages)."\n\n";
for my $pax(@pages) {
$code = toma($pax);
if ($code=~/--\[ c99shell/ig) {
print "\a[Link] : ".$pax."\n";
savefile("shells.txt",$pax);
}
}
}
elsif ($option eq 2) {
@pages = google("www.google.com.ar","intitle:\"r57shell\"",$pa);
print "\n[+] Count Pages : ".int(@pages)."\n\n";
for my $pax(@pages) {
$code = toma($pax);
if ($code=~/o---\[ r57shell - http-shell by RST/ig) {
print "\a[Link] : ".$pax."\n";
savefile("shells.txt",$pax);
}
}
}
elsif ($option eq 3) {
@pages = google("www.google.com.ar","intitle:\"--= DxShell 1.0 - by o_O Tync =--\"",$pa);
print "\n[+] Count Pages : ".int(@pages)."\n\n";
for my $pax(@pages) {
$code = toma($pax);
if ($code=~/--= DxShell 1.0 - by o_O Tync =--/ig) {
print "\a[Link] : ".$pax."\n";
savefile("shells.txt",$pax);
}
}
}
elsif ($option eq 4) {
@pages = google("www.google.com.ar","o--\[ heroes1412 \]--",$pa);
print "\n[+] Count Pages : ".int(@pages)."\n\n";
for my $pax(@pages) {
$code = toma($pax);
if ($code=~/o--\[ heroes1412 \]--/ig) {
print "\a[Link] : ".$pax."\n";
savefile("shells.txt",$pax);
}
}
}
elsif ($option eq 5) {
@pages = google("www.google.com.ar","Locus7Shell",$pa);
print "\n[+] Count Pages : ".int(@pages)."\n\n";
for my $pax(@pages) {
$code = toma($pax);
if ($code=~/--\[ x2300 Locus7Shell/ig) {
print "\a[Link] : ".$pax."\n";
savefile("shells.txt",$pax);
}
}
}
else {
print "\n\n[-] Bad Option\n\n";
}
print "\n\n[+] Finish\n\n";
copyright();
<stdin>;


sub men {
print "\n\n[+] Shells to find : \n\n";
print "[1] : c99\n";
print "[2] : r57\n";
print "[3] : Dxshell\n";
print "[4] : heroes1412\n";
print "[5] : Locus7Shell\n\n";
print "\n[Options] : ";
chomp(my $option = <STDIN>);
return $option;
}


sub head {
print "\n\n -- == Finder Shells == --\n\n\n";
}

sub copyright {
print "\n\n(C) Doddy Hackman 2010\n\n";
}

sub toma {
return $nave->request (GET $_[0])->content;
}

sub google {
print "\n[Dork] : $_[1]\n[Paginas] : $_[2]\n\n[+] Searching pages..\n";
for ($pages=0;$pages<=$_[2];$pages=$pages+10) {
$response = toma("http://$_[0]/search?hl=&q=$_[1]&start=$pages");
while ($response=~m/<h3 class=.*?<a href="([^"]+).*?>(.*?)<\/a>/g) {
push(@founds,$1);
}}
print "[+] Erasing repeated\n";
for(@founds) {
$t = $_;
push(@r,$t);
}
return(repes(@r));
}


sub repes {
foreach my $palabra ( @_ ) {
next if $repety{ $palabra }++;
push @revisado,$palabra;
}
return @revisado;
}


sub clean {
if ($_[0] =~/\=/) {
my @sacar= split("=",$_[0]);
return(@sacar[0]."=");
}
}

sub savefile {
open(SAVE,">>logs/".$_[0]);
print SAVE $_[1]."\n";
close SAVE;
}

sub installer {
unless (-d "/logs") {
mkdir("logs/",777);
}
}

# ¿ The End ?