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 Tk] 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 Tk] Exploit DB Helper 0.5  (Leído 1,703 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



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

Version Tk de esta tool para bajar exploits desde exploit-db

Una imagen



El codigo

Código
  1. #!usr/bin/perl
  2. #Exploit DB Helper 0.5
  3. #Version Tk
  4. #Coded By Doddy H
  5.  
  6. use Tk;
  7. use Tk::Dialog;
  8. use LWP::UserAgent;
  9. use Cwd;
  10.  
  11. my $nave = LWP::UserAgent->new();
  12. $nave->timeout(5);
  13. $nave->agent(
  14. "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12"
  15. );
  16.  
  17. #if ($^O eq 'MSWin32') {
  18. #use Win32::Console;
  19. #Win32::Console::Free();
  20. #}
  21.  
  22. my $color_texto = "yellow";
  23. my $color_fondo = "black";
  24.  
  25. my $newdaxz =
  26.  MainWindow->new( -background => $color_fondo, -foreground => $color_texto );
  27.  
  28. $newdaxz->title("Exploit DB Helper 0.5");
  29. $newdaxz->geometry("345x350+50+50");
  30. $newdaxz->resizable( 0, 0 );
  31.  
  32. $menula = $newdaxz->Frame(
  33.    -relief     => "sunken",
  34.    -bd         => 1,
  35.    -background => $color_fondo,
  36.    -foreground => $color_texto
  37. );
  38. my $menulnowaxm = $menula->Menubutton(
  39.    -text             => "Options",
  40.    -underline        => 1,
  41.    -background       => $color_fondo,
  42.    -foreground       => $color_texto,
  43.    -activebackground => $color_texto
  44. )->pack( -side => "left" );
  45. my $aboutnowaxm = $menula->Menubutton(
  46.    -text             => "About",
  47.    -underline        => 1,
  48.    -background       => $color_fondo,
  49.    -foreground       => $color_texto,
  50.    -activebackground => $color_texto
  51. )->pack( -side => "left" );
  52. my $exitnowaxm = $menula->Menubutton(
  53.    -text             => "Exit",
  54.    -underline        => 1,
  55.    -background       => $color_fondo,
  56.    -foreground       => $color_texto,
  57.    -activebackground => $color_texto
  58. )->pack( -side => "left" );
  59. $menula->pack( -side => "top", -fill => "x" );
  60.  
  61. $menulnowaxm->command(
  62.    -label      => "Find",
  63.    -background => $color_fondo,
  64.    -foreground => $color_texto,
  65.    -command    => \&findnow
  66. );
  67. $menulnowaxm->command(
  68.    -label      => "Logs",
  69.    -background => $color_fondo,
  70.    -foreground => $color_texto,
  71.    -command    => \&openlogs
  72. );
  73.  
  74. $aboutnowaxm->command(
  75.    -label      => "About",
  76.    -background => $color_fondo,
  77.    -foreground => $color_texto,
  78.    -command    => \&aboutxa
  79. );
  80.  
  81. $exitnowaxm->command(
  82.    -label      => "Exit",
  83.    -background => $color_fondo,
  84.    -foreground => $color_texto,
  85.    -command    => \&exitnow
  86. );
  87.  
  88. $newdaxz->Label(
  89.    -text       => "String : ",
  90.    -font       => "Impact",
  91.    -background => $color_fondo,
  92.    -foreground => $color_texto
  93. )->place( -x => 20, -y => 40 );
  94. my $string = $newdaxz->Entry(
  95.    -width      => 40,
  96.    -background => $color_fondo,
  97.    -foreground => $color_texto
  98. )->place( -x => 75, -y => 45 );
  99.  
  100. $newdaxz->Label(
  101.    -text       => "Exploits Found",
  102.    -font       => "Impact",
  103.    -background => $color_fondo,
  104.    -foreground => $color_texto
  105. )->place( -x => 120, -y => 80 );
  106. my $exploits = $newdaxz->Listbox(
  107.    -width      => 40,
  108.    -height     => 10,
  109.    -background => $color_fondo,
  110.    -foreground => $color_texto
  111. )->place( -x => 50, -y => 130 );
  112.  
  113. $newdaxz->Label(
  114.    -text       => "Status : ",
  115.    -font       => "Impact",
  116.    -background => $color_fondo,
  117.    -foreground => $color_texto
  118. )->place( -x => 63, -y => 300 );
  119. my $tatus = $newdaxz->Entry(
  120.    -width      => 25,
  121.    -background => $color_fondo,
  122.    -foreground => $color_texto
  123. )->place( -x => 120, -y => 305 );
  124.  
  125. MainLoop;
  126.  
  127. sub openlogs {
  128.    my $cosa = $string->get;
  129.    if ( -d $cosa ) {
  130.        system("start $cosa");
  131.    }
  132.    else {
  133.        $newdaxz->Dialog(
  134.            -title            => "Error",
  135.            -buttons          => ["OK"],
  136.            -text             => "Error",
  137.            -background       => $color_fondo,
  138.            -foreground       => $color_texto,
  139.            -activebackground => $color_texto
  140.        )->Show();
  141.    }
  142. }
  143.  
  144. sub findnow {
  145.    $exploits->delete( "0.0", "end" );
  146.    my $cosa = $string->get;
  147.    $tatus->configure( -text => "Searching ..." );
  148.    my %found = buscar($cosa);
  149.    $total = int( keys %found ) - 1;
  150.    $tatus->configure( -text => "$total exploits found" );
  151.    unless ( -d $cosa ) {
  152.        mkdir( $cosa, "777" );
  153.    }
  154.    $tatus->configure( -text => "Downloading exploits ..." );
  155.    for my $da ( keys %found ) {
  156.        my $tata = $da;
  157.        $tata =~ s/\<//;
  158.        $tata =~ s/(\s)+$//;
  159.        if ( download( $found{$da}, $cosa . "/" . $tata . ".txt" ) ) {
  160.            $newdaxz->update;
  161.            $exploits->insert( "end", $da );
  162.        }
  163.    }
  164.    $tatus->configure( -text => " " );
  165. }
  166.  
  167. sub buscar {
  168.    for my $n ( 1 .. 666 ) {
  169.        $newdaxz->update;
  170.        my $code =
  171.          toma( "http://www.exploit-db.com/search/?action=search&filter_page="
  172.              . $n
  173.              . "&filter_description="
  174.              . $_[0]
  175.              . "&filter_exploit_text=&filter_author=&filter_platform=0&filter_type=0&filter_lang_id=0&filter_port=&filter_osvdb=&filter_cve="
  176.          );
  177.        chomp $code;
  178.        if ( $code =~ /No results/ig ) {
  179.            return %busca;
  180.        }
  181.        %busca = getlinks($code);
  182.    }
  183. }
  184.  
  185. sub getlinks {
  186.  
  187.    my $test = HTML::Parser->new(
  188.        start_h => [ \&start, "tagname,attr" ],
  189.        text_h  => [ \&text,  "dtext" ],
  190.    );
  191.    $test->parse( $_[0] );
  192.  
  193.    sub start {
  194.        my ( $a, $b ) = @_;
  195.        my %e = %$b;
  196.        unless ( $a ne "a" ) {
  197.            $d = $e{href};
  198.            $c = $a;
  199.        }
  200.    }
  201.  
  202.    sub text {
  203.        my $title = shift;
  204.        chomp $title;
  205.        unless ( $c ne "a" ) {
  206.            if ( $d =~ /www.exploit-db.com\/exploits\/(.*)/ ) {
  207.                my $id  = $1;
  208.                my $url = "http://www.exploit-db.com/download/" . $id;
  209.                $links{$title} = $url;
  210.            }
  211.            $d = "";
  212.        }
  213.    }
  214.    return %links;
  215. }
  216.  
  217. sub toma {
  218.    return $nave->get( $_[0] )->content;
  219. }
  220.  
  221. sub repes {
  222.    my @limpio;
  223.    foreach $test (@_) {
  224.        push @limpio, $test unless $repe{$test}++;
  225.    }
  226.    return @limpio;
  227. }
  228.  
  229. sub download {
  230.    if ( $nave->mirror( $_[0], $_[1] ) ) {
  231.        if ( -f $_[1] ) {
  232.            return true;
  233.        }
  234.    }
  235. }
  236.  
  237. sub aboutxa {
  238.    $newdaxz->Dialog(
  239.        -title            => "About",
  240.        -buttons          => ["OK"],
  241.        -text             => "Coded By Doddy H",
  242.        -background       => $color_fondo,
  243.        -foreground       => $color_texto,
  244.        -activebackground => $color_texto
  245.    )->Show();
  246. }
  247.  
  248. sub exitnow {
  249.    exit 1;
  250. }
  251.  
  252. #The End ?
  253.  


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] Exploit DB Helper 0.5
Scripting
BigBear 0 1,463 Último mensaje 30 Septiembre 2012, 19:33 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,285 Último mensaje 20 Agosto 2013, 16:14 pm
por Stakewinner00
[Perl] LFI Image Helper 0.8
Scripting
BigBear 0 1,787 Último mensaje 8 Mayo 2015, 15:57 pm
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines