elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
29 Mayo 2012, 09:17  


Tema destacado: Suscripción al boletín mensual de elhacker.net

+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting (Moderadores: Novlucker, Leo Gutiérrez., EleKtro H@cker)
| | |-+  [Perl] Finder Paths
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Perl] Finder Paths  (Leído 136 veces)
Doddy

Desconectado Desconectado

Mensajes: 220



Ver Perfil
[Perl] Finder Paths
« en: 14 Octubre 2011, 15:25 »

Hola hoy les traigo un programa para buscar los posibles directorios que no estan protegidos con index en una pagina

Código
#!usr/bin/perl
#Finder Paths
#(C) Doddy Hackman 2010
 
use WWW::Mechanize;
use HTTP::Response;
use URI::Split qw(uri_split);
 
if ($^O =~/Win32/ig) { system("cls"); } else { system("clear"); }
 
my $new = WWW::Mechanize->new(autocheck => 0);
$new->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12");
 
&head;
unless($ARGV[0]) {
&menu;
} else {
print "[Page] : $ARGV[0]\n\n";
&scan($ARGV[0]);
}
&finish;
 
sub menu {
print "[Page] : ";
chomp(my $pa = <STDIN>);
&scan($pa);
}
 
sub finish {
print "\n\n\n\n(C) Doddy Hackman 2010\n\n";
<STDIN>;
exit(1);
}
 
sub scan {
my @analizar;
toma($_[0]);
print "\n\n[Target confirmed] : $_[0]\n\n";
print "[Status] : Scanning\n";
@links = dame_link();
for my $junt(@links) {
my $com = $junt->url();
my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);
if ($path=~/\/(.*)$/) {
my $path1 = $1;
$_[0] =~s/$path1//ig;
my ($scheme, $auth, $path, $query, $frag)  = uri_split($com);
if ($path =~/(.*)\//) {
$code = toma($_[0].$1);
my $found = $1;
if ($code=~/Index Of (.*)<\/title>/ig) {
$ok = 1;
print "\n[Link] : ".$_[0].$found."\a";
savefile("indexs-found.txt",$_[0].$found);
}}}}
if ($ok ne 1) {
print "[Status] : Finish\n";
}}
 
sub repes {
foreach my $palabra ( @_ ) {
next if $repety{ $palabra }++;
push @revisado,$palabra;
}
return @revisado;
}
 
 
sub toma {
return $new->get($_[0])->content;
}
 
sub dame_link {
return $new->find_all_links();
}
 
sub savefile {
open (SAVE,">>logs/".$_[0]);
print SAVE $_[1]."\n";
close SAVE;
}
 
 
sub head {
print qq(
 
 
##########  #########  #########     #####   #   ##### ### ###  ###
#  # #  ##  #  #   #   #  # #  #     #  #   #   # # #  #   #  #  #
#    #  ##  #  #    #  #    #  #     #  #  # #    #    #   #  #  
###  #  # # #  #    #  ###  ###      ###   # #    #    #####   ##
#    #  # # #  #    #  #    # #      #    #####   #    #   #     #
#    #  #  ##  #   #   #  # #  #     #    #   #   #    #   #  #  #
###  ######  # #####   ########  #   ###  ### ### ###  ### ### ###
 
 
 
 
);
}
 
 
#The end
#Blog : doddy-hackman.blogspot.com
#Mail : lepuke[at]hotmail[com]
 


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Perl]Admin Control Panel Finder V1
Scripting
juh 1 2,384 Último mensaje 24 Septiembre 2010, 05:35
por [L]ord [R]NA
[Perl] Finder Pass 0.3
Scripting
Doddy 0 71 Último mensaje 31 Marzo 2012, 22:46
por Doddy
[Perl Tk] Finder Pass 0.4
Scripting
Doddy 0 78 Último mensaje 31 Marzo 2012, 22:47
por Doddy
[Perl] Finder Paths 0.6
Scripting
Doddy 0 77 Último mensaje 8 Abril 2012, 01:55
por Doddy
[Perl Tk] Finder Paths 0.7
Scripting
Doddy 0 99 Último mensaje 8 Abril 2012, 01:56
por Doddy
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines