Una imagen
El codigo
Código
#!usr/bin/perl #Exploit DB Helper 0.5 #Version Tk #Coded By Doddy H use Tk; use Tk::Dialog; use LWP::UserAgent; use Cwd; my $nave = LWP::UserAgent->new(); $nave->timeout(5); $nave->agent( "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.12) Gecko/20080201Firefox/2.0.0.12" ); #if ($^O eq 'MSWin32') { #use Win32::Console; #Win32::Console::Free(); #} my $color_texto = "yellow"; my $color_fondo = "black"; my $newdaxz = MainWindow->new( -background => $color_fondo, -foreground => $color_texto ); $newdaxz->title("Exploit DB Helper 0.5"); $newdaxz->geometry("345x350+50+50"); $newdaxz->resizable( 0, 0 ); $menula = $newdaxz->Frame( -relief => "sunken", -bd => 1, -background => $color_fondo, -foreground => $color_texto ); my $menulnowaxm = $menula->Menubutton( -text => "Options", -underline => 1, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->pack( -side => "left" ); my $aboutnowaxm = $menula->Menubutton( -text => "About", -underline => 1, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->pack( -side => "left" ); my $exitnowaxm = $menula->Menubutton( -text => "Exit", -underline => 1, -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->pack( -side => "left" ); $menula->pack( -side => "top", -fill => "x" ); $menulnowaxm->command( -label => "Find", -background => $color_fondo, -foreground => $color_texto, -command => \&findnow ); $menulnowaxm->command( -label => "Logs", -background => $color_fondo, -foreground => $color_texto, -command => \&openlogs ); $aboutnowaxm->command( -label => "About", -background => $color_fondo, -foreground => $color_texto, -command => \&aboutxa ); $exitnowaxm->command( -label => "Exit", -background => $color_fondo, -foreground => $color_texto, -command => \&exitnow ); $newdaxz->Label( -text => "String : ", -font => "Impact", -background => $color_fondo, -foreground => $color_texto my $string = $newdaxz->Entry( -width => 40, -background => $color_fondo, -foreground => $color_texto $newdaxz->Label( -text => "Exploits Found", -font => "Impact", -background => $color_fondo, -foreground => $color_texto my $exploits = $newdaxz->Listbox( -width => 40, -height => 10, -background => $color_fondo, -foreground => $color_texto $newdaxz->Label( -text => "Status : ", -font => "Impact", -background => $color_fondo, -foreground => $color_texto my $tatus = $newdaxz->Entry( -width => 25, -background => $color_fondo, -foreground => $color_texto MainLoop; sub openlogs { my $cosa = $string->get; if ( -d $cosa ) { } else { $newdaxz->Dialog( -title => "Error", -buttons => ["OK"], -text => "Error", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } } sub findnow { $exploits->delete( "0.0", "end" ); my $cosa = $string->get; $tatus->configure( -text => "Searching ..." ); my %found = buscar($cosa); $tatus->configure( -text => "$total exploits found" ); unless ( -d $cosa ) { } $tatus->configure( -text => "Downloading exploits ..." ); my $tata = $da; $tata =~ s/\<//; $tata =~ s/(\s)+$//; if ( download( $found{$da}, $cosa . "/" . $tata . ".txt" ) ) { $newdaxz->update; $exploits->insert( "end", $da ); } } $tatus->configure( -text => " " ); } sub buscar { for my $n ( 1 .. 666 ) { $newdaxz->update; my $code = toma( "http://www.exploit-db.com/search/?action=search&filter_page=" . $n . "&filter_description=" . $_[0] . "&filter_exploit_text=&filter_author=&filter_platform=0&filter_type=0&filter_lang_id=0&filter_port=&filter_osvdb=&filter_cve=" ); if ( $code =~ /No results/ig ) { } %busca = getlinks($code); } } sub getlinks { my $test = HTML::Parser->new( start_h => [ \&start, "tagname,attr" ], text_h => [ \&text, "dtext" ], ); $test->parse( $_[0] ); sub start { my ( $a, $b ) = @_; my %e = %$b; unless ( $a ne "a" ) { $d = $e{href}; $c = $a; } } sub text { unless ( $c ne "a" ) { if ( $d =~ /www.exploit-db.com\/exploits\/(.*)/ ) { my $id = $1; my $url = "http://www.exploit-db.com/download/" . $id; $links{$title} = $url; } $d = ""; } } } sub toma { } sub repes { my @limpio; foreach $test (@_) { } } sub download { if ( $nave->mirror( $_[0], $_[1] ) ) { if ( -f $_[1] ) { return true; } } } sub aboutxa { $newdaxz->Dialog( -title => "About", -buttons => ["OK"], -text => "Coded By Doddy H", -background => $color_fondo, -foreground => $color_texto, -activebackground => $color_texto )->Show(); } sub exitnow { } #The End ?