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

 

 


Tema destacado: Introducción a Git (Primera Parte)


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [Perl] GenWordlist 0.2
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Perl] GenWordlist 0.2  (Leído 1,166 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Perl] GenWordlist 0.2
« en: 1 Diciembre 2011, 22:12 pm »

Simple programa en perl para generar diccionarios

Código
  1. #!usr/bin/perl
  2. #Gen Wordlist 0.2
  3. #By Doddy H
  4. #ppm install http://www.bribes.org/perl/ppm/HTML-Strip.ppd
  5.  
  6. use LWP::UserAgent;
  7. use HTML::Strip;
  8.  
  9. my $nave = LWP::UserAgent->new();
  10. $nave->timeout(5);
  11. $nave->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12");
  12.  
  13. head();
  14. unless($ARGV[0]) {
  15. sintax();
  16. } else {
  17. start($ARGV[0]);
  18. }
  19. copyright();
  20.  
  21. sub start {
  22.  
  23. print "\n[+] Getting source code of the page\n";
  24.  
  25. my @contenido = toma($_[0]);
  26. my $uno = HTML::Strip->new(emit_spaces => 1);
  27. for my $tengo(@contenido) {
  28. my @parteuno = $uno->parse($tengo);
  29. push(@palabras,@parteuno);
  30. }
  31.  
  32. for(@palabras) {
  33. push @palabrasx, split q[ ];
  34. }
  35.  
  36. my @final = repes(@palabrasx);
  37.  
  38. print "\n[+] Words Found : ".int(@final)."\n\n";
  39.  
  40. for my $aca(@final) {
  41. print "[+] Word : $aca\n";
  42. }
  43.  
  44. }
  45.  
  46. sub sintax {
  47. print "\n[+] sintax : $0 <web>\n";
  48. }
  49.  
  50. sub head {
  51. print "\n\n-- == Gen Wordlist == --\n\n";
  52. }
  53.  
  54. sub copyright {
  55. print "\n\n(C) Doddy Hackman 2011\n\n";
  56. }
  57.  
  58. sub repes {
  59. foreach $test(@_) {
  60. push @limpio,$test unless $repe{$test}++;
  61. }
  62. return @limpio;
  63. }
  64.  
  65. sub toma {
  66. return $nave->get( $_[0] )->content;
  67. }
  68.  
  69. # The End ?
  70.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
perl
Scripting
nobo 0 3,198 Último mensaje 22 Febrero 2005, 07:49 am
por nobo
Perl
Scripting
zhynar_X 2 2,226 Último mensaje 12 Enero 2008, 04:36 am
por GroK
-=PERL=-
Scripting
D4RIO 1 5,714 Último mensaje 25 Febrero 2008, 17:27 pm
por D4RIO
MSN Perl y PHP
Scripting
isseu 0 2,674 Último mensaje 30 Diciembre 2008, 14:36 pm
por isseu
Libros de Perl online [PERL]
Scripting
madpitbull_99 0 3,836 Último mensaje 18 Mayo 2011, 21:49 pm
por madpitbull_99
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines