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

 

 


Tema destacado: Recopilación Tutoriales y Manuales Hacking, Seguridad, Privacidad, Hardware, etc


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


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Perl] Exploit DB Helper 0.5
« en: 30 Septiembre 2012, 19:33 pm »

Version mejorada de este script para buscar exploits en la pagina exploit-db

Código
  1. #!usr/bin/perl
  2. #Exploit DB Helper 0.5
  3. #Coded By Doddy H
  4.  
  5. use LWP::UserAgent;
  6. use HTML::Parser;
  7. use Data::Dumper;
  8. use Time::HiRes "usleep";
  9.  
  10. my $nave = LWP::UserAgent->new;
  11. $nave->agent(
  12. "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
  13. );
  14. $nave->timeout(5);
  15.  
  16. head();
  17. print "\n\n[String] : ";
  18. chomp( my $cosa = <stdin> );
  19. if ( $cosa eq "" ) { menu(); }
  20. print "\n\n[+] Searching ...\n\n";
  21. my %found = buscar($cosa);
  22. $total = int( keys %found ) - 1;
  23. print "[+] Exploits Found : " . $total . "\n\n";
  24.  
  25. unless ( -d $cosa ) {
  26.    mkdir( $cosa, "777" );
  27. }
  28. for my $da ( keys %found ) {
  29.    my $tata = $da;
  30.    $tata =~ s/\<//;
  31.    $tata =~ s/(\s)+$//;
  32.    if ( download( $found{$da}, $cosa . "/" . $tata . ".txt" ) ) {
  33.        print "[Exploit Found] : " . $da . "\n";
  34.    }
  35. }
  36. copyright();
  37.  
  38. sub buscar {
  39.    for my $n ( 1 .. 666 ) {
  40.        my $code =
  41.          toma( "http://www.exploit-db.com/search/?action=search&filter_page="
  42.              . $n
  43.              . "&filter_description="
  44.              . $_[0]
  45.              . "&filter_exploit_text=&filter_author=&filter_platform=0&filter_type=0&filter_lang_id=0&filter_port=&filter_osvdb=&filter_cve="
  46.          );
  47.        chomp $code;
  48.        if ( $code =~ /No results/ig ) {
  49.            return %busca;
  50.        }
  51.        %busca = getlinks($code);
  52.    }
  53. }
  54.  
  55. sub getlinks {
  56.  
  57.    my $test = HTML::Parser->new(
  58.        start_h => [ \&start, "tagname,attr" ],
  59.        text_h  => [ \&text,  "dtext" ],
  60.    );
  61.    $test->parse( $_[0] );
  62.  
  63.    sub start {
  64.        my ( $a, $b ) = @_;
  65.        my %e = %$b;
  66.        unless ( $a ne "a" ) {
  67.            $d = $e{href};
  68.            $c = $a;
  69.        }
  70.    }
  71.  
  72.    sub text {
  73.        my $title = shift;
  74.        chomp $title;
  75.        unless ( $c ne "a" ) {
  76.            if ( $d =~ /www.exploit-db.com\/exploits\/(.*)/ ) {
  77.                my $id  = $1;
  78.                my $url = "http://www.exploit-db.com/download/" . $id;
  79.                $links{$title} = $url;
  80.            }
  81.            $d = "";
  82.        }
  83.    }
  84.    return %links;
  85. }
  86.  
  87. sub toma {
  88.    return $nave->get( $_[0] )->content;
  89. }
  90.  
  91. sub repes {
  92.    my @limpio;
  93.    foreach $test (@_) {
  94.        push @limpio, $test unless $repe{$test}++;
  95.    }
  96.    return @limpio;
  97. }
  98.  
  99. sub download {
  100.    if ( $nave->mirror( $_[0], $_[1] ) ) {
  101.        if ( -f $_[1] ) {
  102.            return true;
  103.        }
  104.    }
  105. }
  106.  
  107. sub head {
  108.  
  109.    my @logo = (
  110.        "#=============================================#", "\n",
  111.        "#            Exploit DB 0.5                   #", "\n",
  112.        "#---------------------------------------------#", "\n",
  113.        "# Written By Doddy H                          #", "\n",
  114.        "# Email: lepuke[at]hotmail[com]               #", "\n",
  115.        "# Website: doddyhackman.webcindario.com       #", "\n",
  116.        "#---------------------------------------------#", "\n",
  117.        "# The End ?                                   #", "\n",
  118.        "#=============================================#", "\n"
  119.    );
  120.  
  121.    print "\n";
  122.    marquesina(@logo);
  123.  
  124. }
  125.  
  126. sub marquesina {
  127.  
  128.    #Effect based in the exploits by Jafer Al Zidjali
  129.  
  130.    my @logo = @_;
  131.  
  132.    my $car = "|";
  133.  
  134.    for my $uno (@logo) {
  135.        for my $dos ( split //, $uno ) {
  136.  
  137.            $|++;
  138.  
  139.            if ( $car eq "|" ) {
  140.                mostrar( "\b" . $dos . $car, "/" );
  141.            }
  142.            elsif ( $car eq "/" ) {
  143.                mostrar( "\b" . $dos . $car, "-" );
  144.            }
  145.            elsif ( $car eq "-" ) {
  146.                mostrar( "\b" . $dos . $car, "\\" );
  147.            }
  148.            else {
  149.                mostrar( "\b" . $dos . $car, "|" );
  150.            }
  151.            usleep(40_000);
  152.        }
  153.        print "\b ";
  154.    }
  155.  
  156.    sub mostrar {
  157.        print $_[0];
  158.        $car = $_[1];
  159.    }
  160.  
  161. }
  162.  
  163. sub copyright {
  164.  
  165.    print "\n\n";
  166.  
  167.    marquesina("-- == (C) Doddy Hackman 2012 == --");
  168.  
  169.    print "\n\n";
  170.  
  171.    <stdin>;
  172.    exit(1);
  173. }
  174.  
  175. #The End ?
  176.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Perl] FSD Exploit Manager
Scripting
BigBear 0 1,844 Último mensaje 7 Octubre 2011, 01:14 am
por BigBear
[Perl Tk] Exploit DB Helper 0.5
Scripting
BigBear 0 1,703 Último mensaje 30 Septiembre 2012, 19:34 pm
por BigBear
Flickr CC Attribution Helper
Noticias
wolfbcn 0 1,186 Último mensaje 3 Noviembre 2012, 14:57 pm
por wolfbcn
SQLI Helper para mac
Hacking
Warslayer 1 2,286 Último mensaje 20 Agosto 2013, 16:14 pm
por Stakewinner00
[Perl] LFI Image Helper 0.8
Scripting
BigBear 0 1,788 Último mensaje 8 Mayo 2015, 15:57 pm
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines