elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Rompecabezas de Bitcoin, Medio millón USD en premios


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [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 1,456 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



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

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

Código
  1. #!usr/bin/perl
  2. #Finder Paths
  3. #(C) Doddy Hackman 2010
  4.  
  5. use WWW::Mechanize;
  6. use HTTP::Response;
  7. use URI::Split qw(uri_split);
  8.  
  9. if ($^O =~/Win32/ig) { system("cls"); } else { system("clear"); }
  10.  
  11. my $new = WWW::Mechanize->new(autocheck => 0);
  12. $new->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12");
  13.  
  14. &head;
  15. unless($ARGV[0]) {
  16. &menu;
  17. } else {
  18. print "[Page] : $ARGV[0]\n\n";
  19. &scan($ARGV[0]);
  20. }
  21. &finish;
  22.  
  23. sub menu {
  24. print "[Page] : ";
  25. chomp(my $pa = <STDIN>);
  26. &scan($pa);
  27. }
  28.  
  29. sub finish {
  30. print "\n\n\n\n(C) Doddy Hackman 2010\n\n";
  31. <STDIN>;
  32. exit(1);
  33. }
  34.  
  35. sub scan {
  36. my @analizar;
  37. toma($_[0]);
  38. print "\n\n[Target confirmed] : $_[0]\n\n";
  39. print "[Status] : Scanning\n";
  40. @links = dame_link();
  41. for my $junt(@links) {
  42. my $com = $junt->url();
  43. my ($scheme, $auth, $path, $query, $frag)  = uri_split($_[0]);
  44. if ($path=~/\/(.*)$/) {
  45. my $path1 = $1;
  46. $_[0] =~s/$path1//ig;
  47. my ($scheme, $auth, $path, $query, $frag)  = uri_split($com);
  48. if ($path =~/(.*)\//) {
  49. $code = toma($_[0].$1);
  50. my $found = $1;
  51. if ($code=~/Index Of (.*)<\/title>/ig) {
  52. $ok = 1;
  53. print "\n[Link] : ".$_[0].$found."\a";
  54. savefile("indexs-found.txt",$_[0].$found);
  55. }}}}
  56. if ($ok ne 1) {
  57. print "[Status] : Finish\n";
  58. }}
  59.  
  60. sub repes {
  61. foreach my $palabra ( @_ ) {
  62. next if $repety{ $palabra }++;
  63. push @revisado,$palabra;
  64. }
  65. return @revisado;
  66. }
  67.  
  68.  
  69. sub toma {
  70. return $new->get($_[0])->content;
  71. }
  72.  
  73. sub dame_link {
  74. return $new->find_all_links();
  75. }
  76.  
  77. sub savefile {
  78. open (SAVE,">>logs/".$_[0]);
  79. print SAVE $_[1]."\n";
  80. close SAVE;
  81. }
  82.  
  83.  
  84. sub head {
  85.  
  86.  
  87. ##########  #########  #########     #####   #   ##### ### ###  ###
  88. #  # #  ##  #  #   #   #  # #  #     #  #   #   # # #  #   #  #  #
  89. #    #  ##  #  #    #  #    #  #     #  #  # #    #    #   #  #  
  90. ###  #  # # #  #    #  ###  ###      ###   # #    #    #####   ##
  91. #    #  # # #  #    #  #    # #      #    #####   #    #   #     #
  92. #    #  #  ##  #   #   #  # #  #     #    #   #   #    #   #  #  #
  93. ###  ######  # #####   ########  #   ###  ### ### ###  ### ### ###
  94.  
  95.  
  96.  
  97.  
  98. );
  99. }
  100.  
  101.  
  102. #The end
  103. #Blog : doddy-hackman.blogspot.com
  104. #Mail : lepuke[at]hotmail[com]
  105.  


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 7,698 Último mensaje 24 Septiembre 2010, 05:35 am
por [L]ord [R]NA
[Perl] Finder Pass 0.3
Scripting
BigBear 0 1,483 Último mensaje 31 Marzo 2012, 22:46 pm
por BigBear
[Perl Tk] Finder Pass 0.4
Scripting
BigBear 0 1,445 Último mensaje 31 Marzo 2012, 22:47 pm
por BigBear
[Perl] Finder Paths 0.6
Scripting
BigBear 0 1,307 Último mensaje 8 Abril 2012, 01:55 am
por BigBear
[Perl Tk] Finder Paths 0.7
Scripting
BigBear 0 1,414 Último mensaje 8 Abril 2012, 01:56 am
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines